Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp1519169lqm; Thu, 2 May 2024 19:04:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWLv1U+mra4cAElJTvw1LnMh6hM4LAQH8xTruKPlek10E4Z1NWvGaP8jFTCP2FIudv8aAlZMD5I9SL93gabWqZWox9jl8QtTdbT+MEvrQ== X-Google-Smtp-Source: AGHT+IEGYAZYq+hC3Jg6u5fFMJXdO3B040XnDIPm0s+4PyfRCinrRvm5SQ/f/DIgfZuFpxEplU6+ X-Received: by 2002:a05:6a00:2e99:b0:6f4:4319:4cea with SMTP id fd25-20020a056a002e9900b006f443194ceamr1717639pfb.33.1714701839998; Thu, 02 May 2024 19:03:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714701839; cv=pass; d=google.com; s=arc-20160816; b=ufte23M32TgCWOH38w8wsUWBf/Ow/2VRA4nB1x6QUvUunjBi7iB0cDreXJXYQvBdEH vcwzlBwvfQXxJTS/SE5l0Ub8Gpf9TRUxh/xUmxOhc1a8zyglQE/hKXc8vSCn/m6tX1kI cWMrnx9yXDz52cOzqJFWeWx63x7M0zAqIUQe3fMyQfvrooUeyatxvvPLVYKlgszKBWF5 X8KIx4Hbld85uElrdeCntj4+LhGkuAFnKKKHEwLFJwH2ykUpSoRFImIBdvaLp8Ul+oL3 Tvarz+2rOu4wUpnLladWeekru+Pj3iiF5qb5rOfrR1gjXYv3PFZga/SrA26L32F0ajmE kjGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=O2rIImNa5eTX5JMS2gK4B5+p9DQZTIlWwqfyVhLPEjs=; fh=EX8Z4KmGwikRnDgHY1h9QJXmzk9OLcY4H2DP9Xady38=; b=qLaaIo6Xd0+4RkKxYw9BaC6CztWcdtmDMEfHESgffzlY3nMa7WSrzepZobbe3PhtCq 4Fws/ouM2h6mtqSPZN1o9C35AX0YoK29lb9hvNcafQRnjC4WmSPOvN2wdcs+s5WDkWed EmZXEDKao/bJwz4gQIwDjZ7NfdRdUWbEwhc7jZorOd24r+9mnZ/pLrxgq29vNBRCqJi7 WpxXuuOOmqqZB7j2Z2F0nxF9drdMHg71uY28mOXhJvjYS9/RCJRVE/GsNpzaR6alpUs4 tB4nEzIQK1hFGlWfBCP7zmOXORFESuovD8firDBXuvLJZBycMgobfjByetztV3svEhe6 WtIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=H5k68sDS; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au dkim=pass dkdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-167166-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167166-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z12-20020a056a00240c00b006f3eba999besi2089870pfh.139.2024.05.02.19.03.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 19:03:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-167166-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=H5k68sDS; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au dkim=pass dkdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-167166-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-167166-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9D3E3283CD0 for ; Fri, 3 May 2024 02:03:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B625B1C6A7; Fri, 3 May 2024 02:03:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="H5k68sDS" Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.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 A3E791BC49; Fri, 3 May 2024 02:03:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=150.107.74.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714701808; cv=none; b=BFyqd/OPozzUPnkHimSlAAKZVsFLA4DKeWn30JnWsH4SnldqizXi+Jx3A2gMiLTgwAIguCFVQainE4+9oMFlbUHej9gWZAt+UMpnENIZrAYnrBtZTBzL2E1k2butw7dFiE8ckw73S9pH6jHdBA70hiNK91b6UU2gY0PZpqoC3Fg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714701808; c=relaxed/simple; bh=SVHHtn8OKM9t8LE9cQrAjdRlkmcsVzh9eDpnFhbnTjM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=rDEi1uiSSeRmN80X/gonpOMQT+871Z7pleq0lwga4K6KFiteHNsXWMZdIyqKjr+UwXrlvtBMyoFU+w+MkPyDpf7bKP/J+KDcXnoyvUZlDJ0skQwEeMN3DRCMwF/FAVnJc1FkFIjc+1oSMhGPypYpU+/gCbq/113e5UNIS764WLk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au; spf=pass smtp.mailfrom=ellerman.id.au; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b=H5k68sDS; arc=none smtp.client-ip=150.107.74.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ellerman.id.au DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1714701803; bh=O2rIImNa5eTX5JMS2gK4B5+p9DQZTIlWwqfyVhLPEjs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=H5k68sDSmC2DbJz+33czp8ldQxidcRYZnKOy5boIYRoBRouyDG78TxydSwEUPk+U+ r94Agvp8BLRxLOGOxj0MJqqQpKPbOMfZvdphYSpPBx9pRTF+IMCS7niDPzXn7kS2oL dgc4JJf3xI+wurpAbKMqW8pO2nHH8MLpdFB7zfdG5YzGF8c9bkNZf2Gpz6V3477v1W VN5Zb1r8ULqYPNlMJxgWijx4y+2uOSwomPntynB4Wvd1EtESkKyKAnCUWCfbRZSYuE vxFEbobYnEYwZmCzp70+QVJfXaf3SBBXJ4utTr0l5UTHcUr3ceJKDCmXJmLV4BcZkN knTSkRFwnTSDw== Received: from authenticated.ozlabs.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 mail.ozlabs.org (Postfix) with ESMTPSA id 4VVvGc44T2z4wcg; Fri, 3 May 2024 12:03:20 +1000 (AEST) From: Michael Ellerman To: Allen Pais , linux-scsi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, target-devel@vger.kernel.org, megaraidlinux.pdl@broadcom.com, jejb@linux.ibm.com, hare@suse.com, martin.petersen@oracle.com, linuxdrivers@attotech.com, tyreld@linux.ibm.com, npiggin@gmail.com, christophe.leroy@csgroup.eu, aneesh.kumar@kernel.org, naveen.n.rao@linux.ibm.com, artur.paszkiewicz@intel.co, kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, shivasharan.srikanteshwara@broadcom.com, chandrakanth.patil@broadcom.com, jinpu.wang@cloud.ionos.com Subject: Re: [PATCH] [RFC] scsi: Convert from tasklet to BH workqueue In-Reply-To: <20240502203433.15811-2-apais@linux.microsoft.com> References: <20240502203433.15811-1-apais@linux.microsoft.com> <20240502203433.15811-2-apais@linux.microsoft.com> Date: Fri, 03 May 2024 12:03:20 +1000 Message-ID: <87ikzv3b4n.fsf@mail.lhotse> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Allen Pais writes: > The only generic interface to execute asynchronously in the BH context is > tasklet; however, it's marked deprecated and has some design flaws. To > replace tasklets, BH workqueue support was recently added. A BH workqueue > behaves similarly to regular workqueues except that the queued work items > are executed in the BH context. > > This patch converts drivers/scsi/* from tasklet to BH workqueue. > > Based on the work done by Tejun Heo > Branch: https://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git for-6.10 > > Signed-off-by: Allen Pais > --- > drivers/scsi/aic7xxx/aic7xxx_osm.c | 2 +- > drivers/scsi/aic94xx/aic94xx_hwi.c | 14 ++-- > drivers/scsi/aic94xx/aic94xx_hwi.h | 5 +- > drivers/scsi/aic94xx/aic94xx_scb.c | 36 +++++----- > drivers/scsi/aic94xx/aic94xx_task.c | 14 ++-- > drivers/scsi/aic94xx/aic94xx_tmf.c | 34 ++++----- > drivers/scsi/esas2r/esas2r.h | 12 ++-- > drivers/scsi/esas2r/esas2r_init.c | 14 ++-- > drivers/scsi/esas2r/esas2r_int.c | 18 ++--- > drivers/scsi/esas2r/esas2r_io.c | 2 +- > drivers/scsi/esas2r/esas2r_main.c | 16 ++--- > drivers/scsi/ibmvscsi/ibmvfc.c | 16 ++--- > drivers/scsi/ibmvscsi/ibmvfc.h | 3 +- > drivers/scsi/ibmvscsi/ibmvscsi.c | 16 ++--- > drivers/scsi/ibmvscsi/ibmvscsi.h | 3 +- > drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 15 ++-- > drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.h | 3 +- Something there is giving me a build failure (ppc64le_guest_defconfig): + make -s 'CC=ccache powerpc64le-linux-gnu-gcc' -j 4 /linux/drivers/scsi/ibmvscsi/ibmvscsi.c: In function 'ibmvscsi_init_crq_queue': Error: /linux/drivers/scsi/ibmvscsi/ibmvscsi.c:370:331: error: 'ibmvscsi_work' undeclared (first use in this function) /linux/drivers/scsi/ibmvscsi/ibmvscsi.c:370:331: note: each undeclared identifier is reported only once for each function it appears in /linux/scripts/Makefile.build:244: recipe for target 'drivers/scsi/ibmvscsi/ibmvscsi.o' failed /linux/scripts/Makefile.build:485: recipe for target 'drivers/scsi/ibmvscsi' failed /linux/scripts/Makefile.build:485: recipe for target 'drivers/scsi' failed /linux/scripts/Makefile.build:485: recipe for target 'drivers' failed /linux/drivers/scsi/ibmvscsi/ibmvscsi.c: In function 'ibmvscsi_probe': Error: /linux/drivers/scsi/ibmvscsi/ibmvscsi.c:2255:78: error: passing argument 1 of 'kthread_create_on_node' from incompatible pointer type [-Werror=incompatible-pointer-types] In file included from /linux/drivers/scsi/ibmvscsi/ibmvscsi.c:56:0: /linux/include/linux/kthread.h:11:21: note: expected 'int (*)(void *)' but argument is of type 'int (*)(struct work_struct *)' struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), ^ /linux/drivers/scsi/ibmvscsi/ibmvscsi.c: At top level: Warning: /linux/drivers/scsi/ibmvscsi/ibmvscsi.c:212:13: warning: 'ibmvscsi_task' defined but not used [-Wunused-function] static void ibmvscsi_task(void *data) ^ Warning: cc1: warning: unrecognized command line option '-Wno-shift-negative-value' Warning: cc1: warning: unrecognized command line option '-Wno-stringop-overflow' cc1: some warnings being treated as errors make[6]: *** [drivers/scsi/ibmvscsi/ibmvscsi.o] Error 1 make[5]: *** [drivers/scsi/ibmvscsi] Error 2 make[4]: *** [drivers/scsi] Error 2 make[3]: *** [drivers] Error 2 make[3]: *** Waiting for unfinished jobs.... Full log here: https://github.com/linuxppc/linux-snowpatch/actions/runs/8930174372/job/24529645923 Cross compile instructions if you're keen: https://github.com/linuxppc/wiki/wiki/Building-powerpc-kernels cheers