Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp553384pxb; Thu, 21 Oct 2021 05:06:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoj6bPHPQYMSzp57lkoE1flRkPOwS2oFnvsrON2oNj6O6k3FWk+POQyHKp0F6tuMbdp2JW X-Received: by 2002:a62:1408:0:b0:44d:1f0b:49be with SMTP id 8-20020a621408000000b0044d1f0b49bemr5632880pfu.28.1634817961847; Thu, 21 Oct 2021 05:06:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634817961; cv=none; d=google.com; s=arc-20160816; b=Ah7ReIuHO5T1r9BWg7DyWUczmu7jnvPFCUJArH/QegJRLBmX8RvERGzi6RwPKpwUmh 8MjVJm4yj8tVhqxmN4w9uKwwDLMWlg3M/jXzM6PMgcZ+2kLd5bw8CrcrWgAtyfYsKbTO nGc+HCemKK1FMzWosPwWjqK0DFEpHykDoLzRiifue2NO9YYJOLu59dhNa63hZX2T3vl3 zcUk3TtiDFd4FASGGPlQmsuuH+foTr2jGRJBYAY6S1EF6MzRAoNaSTTKDeZy3C3i6i/L 2PtczdXi29KQEtFEnQx2OMB9Dpfus+KwEF66i+vAyLYUdTOYo8DKQE3Bc5/USjX4iMCn GORA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=rrZZPm261ErkUhdXFVOWuxkBcCPC5ustghWFxZCLYGA=; b=uOa8TnsLNdflBXt0fxPEhF3CQJCXbWamrweagLaAM4ihEb6OtOU81UOaDR6pWD8vP4 /rQfhovDtzRPeoz61KC8Mgp5mXcH0bJmH3cqS+m+/YvoWYY93xIcKq3/QJM0TKAlHifP L5UaIuCWXbmDOBhOgO6UTno5BMmlrmvAiSzBrewLl684PlbMPgb/b/YDqIzpbcYiJGbV IZt23aYZFU3SWZ0S/MyCWDhg60IMPbj4zzYJVfs4GbDIu379cxU2TW8/GJhe3VYjBer3 iKQAxs62XDvFWrJaOwTJxn6woqnb9DhQLh5nxsFGqSJxAbx55IgwKrS3hYxid2catpYf Tjiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si7850406plg.216.2021.10.21.05.05.46; Thu, 21 Oct 2021 05:06:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231309AbhJUMEP (ORCPT + 99 others); Thu, 21 Oct 2021 08:04:15 -0400 Received: from mx22.baidu.com ([220.181.50.185]:42438 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230340AbhJUMEO (ORCPT ); Thu, 21 Oct 2021 08:04:14 -0400 Received: from BC-Mail-Ex11.internal.baidu.com (unknown [172.31.51.51]) by Forcepoint Email with ESMTPS id 475B8CE06595590FD3EB; Thu, 21 Oct 2021 20:01:56 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex11.internal.baidu.com (172.31.51.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Thu, 21 Oct 2021 20:01:55 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Thu, 21 Oct 2021 20:01:54 +0800 From: Cai Huoqing To: CC: Bernard Metzler , Doug Ledford , Jason Gunthorpe , Davidlohr Bueso , "Paul E. McKenney" , Josh Triplett , "Steven Rostedt" , Mathieu Desnoyers , Lai Jiangshan , Joel Fernandes , Ingo Molnar , Daniel Bristot de Oliveira , , , Subject: [PATCH 2/6] RDMA/siw: Make use of the helper macro kthread_run_on_cpu() Date: Thu, 21 Oct 2021 20:01:31 +0800 Message-ID: <20211021120135.3003-3-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211021120135.3003-1-caihuoqing@baidu.com> References: <20211021120135.3003-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-EX04.internal.baidu.com (172.31.51.44) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Repalce kthread_create/kthread_bind/wake_up_process() with kthread_run_on_cpu() to simplify the code. Signed-off-by: Cai Huoqing --- drivers/infiniband/sw/siw/siw_main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/sw/siw/siw_main.c b/drivers/infiniband/sw/siw/siw_main.c index 9093e6a80b26..e5c586913d0b 100644 --- a/drivers/infiniband/sw/siw/siw_main.c +++ b/drivers/infiniband/sw/siw/siw_main.c @@ -98,15 +98,14 @@ static int siw_create_tx_threads(void) continue; siw_tx_thread[cpu] = - kthread_create(siw_run_sq, (unsigned long *)(long)cpu, - "siw_tx/%d", cpu); + kthread_run_on_cpu(siw_run_sq, + (unsigned long *)(long)cpu, + cpu, "siw_tx/%u"); if (IS_ERR(siw_tx_thread[cpu])) { siw_tx_thread[cpu] = NULL; continue; } - kthread_bind(siw_tx_thread[cpu], cpu); - wake_up_process(siw_tx_thread[cpu]); assigned++; } return assigned; -- 2.25.1