Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp574182pxb; Thu, 21 Oct 2021 05:30:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwX7ToqBIqun0tH2aXQnT8C2T8yr2NiozYZWMf9au0ReSjO3M9d0EdOojcrktXFUoY1AsS X-Received: by 2002:a50:bf4a:: with SMTP id g10mr7446340edk.11.1634819436101; Thu, 21 Oct 2021 05:30:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634819436; cv=none; d=google.com; s=arc-20160816; b=M2eUpvnWza3cuYTQUpVGRLKe1RW1PfLVld58fNfkN60mWa7jz19zPixJ6C7uZZC9p+ Xp5LINKB0W62YH6NyyutnQzGHT6cXpdloo8sDWLCjfPlp1RETbg6ToVNfcDPL7mFoE3i XmYlShPYp5F1VD/BQODDrS2LbrXUABm9VuhNAsgWuow3KW79YTKcfyg9rHJwuso1lmA6 rNmz0P5dpugAQw74f0RS00tZZobGbhkGRaCzVBF1obWVTZavEdPj79qA8kvPu8AHeNUI ke5Fq7SrlBIKNVOJK8z1GqIkTvQ0Vufzy15XHWqyZ6aFAiDDINiMflpKEk45VpoSqVfh /BQw== 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=I+68caunBHQIozZ6MtEsXhJ+SyhEb6N5d2ztFVNE8c3CKqg/rmW0M3wDa+UcRdLIXf IoNg5/MGA1hsKWI+V/KpmqjdcYPXHnG+8bW9QMjSot2fIeYnOpKRBVdffg80Lc9/7zAv IPrd/3DtjtCAfQKUTYto8C7Zxo2X5xy1u2l6SerERYN0D5P/3FkgYIqnn4WKx8Yyy4n+ lhzv/96ic5JHWQa0i9fP/hMzRAX9eLc6STk82De+9uh/UHnneVIc5YInqczfpz7rMqw+ /8a62S2magxqg7D4505mxNpw/Vhp5Zm6lp2ikG0aQ2FDqYLTTqDqWBqnv1xGG04lpL49 1IZQ== 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 ji21si9540360ejc.604.2021.10.21.05.30.11; Thu, 21 Oct 2021 05:30:36 -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 S231657AbhJUMaj (ORCPT + 99 others); Thu, 21 Oct 2021 08:30:39 -0400 Received: from mx22.baidu.com ([220.181.50.185]:41958 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230231AbhJUMaf (ORCPT ); Thu, 21 Oct 2021 08:30:35 -0400 Received: from BC-Mail-Ex27.internal.baidu.com (unknown [172.31.51.21]) by Forcepoint Email with ESMTPS id 3F6F534FBF30B5CA697B; Thu, 21 Oct 2021 20:28:18 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex27.internal.baidu.com (172.31.51.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 21 Oct 2021 20:28:18 +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:28:17 +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 v2 2/6] RDMA/siw: Make use of the helper macro kthread_run_on_cpu() Date: Thu, 21 Oct 2021 20:27:53 +0800 Message-ID: <20211021122758.3092-3-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211021122758.3092-1-caihuoqing@baidu.com> References: <20211021122758.3092-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex10.internal.baidu.com (172.31.51.50) 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