Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1154333lql; Tue, 12 Mar 2024 08:43:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWFWVbSBj6YUouvXnoFLuEr4vts8xOC2nSruPTcR0jLR2F4jBe6SgqdyNhaN2rgB0e4AM+Lrp8U6RTZWIfyycBCqPcz6eLdcMDSMFJHGg== X-Google-Smtp-Source: AGHT+IEJFE90giF57sc8PRGtstX6hGi7DMqkpwtfO67c4mw77WNvHJBhgJTxU2zm+/8oaprYhU1m X-Received: by 2002:a05:6359:7c20:b0:17e:4b00:843b with SMTP id xm32-20020a0563597c2000b0017e4b00843bmr11349175rwb.6.1710258226922; Tue, 12 Mar 2024 08:43:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710258226; cv=pass; d=google.com; s=arc-20160816; b=zvcyjx5AwLDzV2F8wQgxUaT1DzeXty8XUug/JRCG6l2C1w5S7xCg3RMOnhoSFmvJx4 n6/AKFbuX2H8xqdF5IyH9xlB6wZEVzweOTfIFBwUH77T6rrrdEEOJlyTeFFMRG4JzJmb QAyy4PLM+Ds7yjfJ2xyUwVENkbqEQkkd33HZOy3Y1rA7oPuUKyTKOIzZ6kciAa5lRgFe ex5pF0F/njBdY8rdk82jdXVQZNeU3GGr7zrr3DbdNT8bm92va+WR3KozLtfVRqorFbbq e+7hPk9nVXC9kDrsSTWEUr3oliJfGYmSgDb1taiNZr9WHNNLPEXTv8M0Mx6xtA7NLrB4 azZQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=MxMCO7m1BqLHAdWjRpimBphRzT5LTi1+wc4cMFUyHT4=; fh=TZgSdbBIgydApdVTFTscfXSJdcwBWaPw4IRulu6plIc=; b=ivAlMuc6kmQMGlVPdm66l3DmasCBQFt67gM+AY4oSOVc7AfzH5IkKi8I8RW+RMGhxH K7P+PS5Q4cKPzk7bN39+UeqmpKVHKR5EY1JPPc8HIFbvpk4etgZaob6zTdzRfiiq0ext aHDXFyxQX2vj9kn9sNNOiqdd29Vc3aYXxxxNi5VBbJ8xRGEyEwGVpGIEIRkcItKjd2FU rzZuE20srGpvqX688gcZgk+Z4Vd+aPOcdVTmaN0xUfILOw1Qqb8JXeKPepnjmx2Gw03L MojmLvBXRS8FG4WgUJdI5VBXNZLBreC7sabMK8uQXHUEL77DSN+6BW7nMKK5kjJr9eEG xE6Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d8hUP6JI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-100450-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100450-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 71-20020a63004a000000b005dc34078517si7009502pga.538.2024.03.12.08.43.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 08:43:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100450-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=@kernel.org header.s=k20201202 header.b=d8hUP6JI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-100450-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100450-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 250FA28955E for ; Tue, 12 Mar 2024 15:37:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 40D837CF09; Tue, 12 Mar 2024 15:37:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="d8hUP6JI" 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 583977C0B2; Tue, 12 Mar 2024 15:37: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=1710257828; cv=none; b=KTuI5JWNyS5kHJOkKrUg+2avYUiNLjz2LxNad8YG3RO5m9aWdzqPprtEbZhkBKt/8kKKT6PlI3FieN/pTMYVvrqmrI6QviZH+NcWkuYBgTt2zHiERW1Txq8rYJdObrV9AJSeqgmb9QY91h9RaYlZWszcE4umAaZ54I5LrtELxCo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710257828; c=relaxed/simple; bh=W30M/6SE7BKh9U1huPbKGcpVKwBjwlhhTiOxGjXQktQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gbykxdt6ry5KSFPz+XbcDIT9tBsii83xn487KUcYN3SZKs1f2CZ5QxCoPdAISVOvowZg8aaLZTtskiB0ndhCOOeezqL3K2Spy1av8mD9ELOKc5hDYP5pm3fguQKwvPUVkTEkEAZdsjEyUl6kEVCDDQvXxt5TNwk+f5noLwUsqXc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=d8hUP6JI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2021C433C7; Tue, 12 Mar 2024 15:37:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710257827; bh=W30M/6SE7BKh9U1huPbKGcpVKwBjwlhhTiOxGjXQktQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=d8hUP6JIjXohPvBv6NPFZi0JrrhFfeA1Mt75eFhrHGf3un72QrgosFPDbu31HeoS4 N0Vv5mWQnqEEUp182QYq1mPGf47b8/4I4i4l7pN808iPlvXOe7twHESd3j6rSkvEbz BJKptL9zDn2vAC8P4rluHRyfZEwycTJmS0dt1CaveubPiIIebW+N5NpcACCamP/GBo bVS2EX7maUSEQf6GFtcZPANfCtZ/E80Va8LitP35CkE9X14tz7eLKuV8dW1i8zBvZ3 bmcreJSfHSX+tKcqiGaY71n1LNHSrwlBpcexH+yVbXfLYgWGIuvVRC4GufOwbzByVi /q4fqX2xoHfwg== Date: Tue, 12 Mar 2024 16:37:01 +0100 From: Niklas Cassel To: Damien Le Moal Cc: Igor Pylypiv , John Garry , Jason Yan , "James E.J. Bottomley" , "Martin K. Petersen" , Jack Wang , Hannes Reinecke , Xiang Chen , Artur Paszkiewicz , Bart Van Assche , TJ Adams , linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 1/7] ata: libata-sata: Factor out NCQ Priority configuration helpers Message-ID: References: <20240307214418.3812290-1-ipylypiv@google.com> <20240307214418.3812290-2-ipylypiv@google.com> <35801735-1e6a-43ef-8687-06ff04d53619@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <35801735-1e6a-43ef-8687-06ff04d53619@kernel.org> On Tue, Mar 12, 2024 at 03:17:43PM +0900, Damien Le Moal wrote: > On 2024/03/08 19:03, Niklas Cassel wrote: > > > > Anyway, like you said, as you are now creating helper functions: > > ata_ncq_prio_supported(), ata_ncq_prio_enabled(), ata_ncq_prio_enable() > > these function might no longer only be called from sysfs code, > > so it is probably a bad idea to let these functions use spin_lock_irq(). > > > > However, can't ata_ncq_prio_supported() and ata_ncq_prio_enabled() > > still use a simple spin_lock(), why would they need to disable irqs? > > > > Damien, you are the author of ata_ncq_prio_supported_show(), thoughts? > > See above. The spin lock irq-disabling variant is needed because the port lock > is taken from command completion context. Yes of course, I don't know what I was thinking...