From mboxrd@z Thu Jan 1 00:00:00 1970 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 9870E3914ED for ; Sun, 31 May 2026 17:06:29 +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=1780247193; cv=none; b=f8yLl/Jm7M05nhBzhq3ycqrGKmcahkPhfsy5orwKP33+UpMdC7ofxAE/CvgyZjPmjqs4iV/b6vRxaKSRvHL0ZsJnBR2lqvx9QMpTXTMbxB7C+DeYdH1NSEl3EvrYXoY2cgvwLyKmVWE8w/k3lLU2PrgEVPyjhAibtZB2OamKTTY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780247193; c=relaxed/simple; bh=YjiDVVzZWacAL/M5Ubr5olPaoNX77xqsVgKjn5ZivrQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=no7DdtuXRYQ5ajTM4E/LoGU1iZvpwVW4tQHKdhMXmNvU5hv3z0F58t/cpxWMgqUQ91bYjiwd1Uaf94PtAI4ojtsgWmqnh/5y7A2Xt7PQ6RBdgTIAami05+W9yiHV6zcyYywriamIsWgPQciR0oLHAXUl0godzfDh17XLK579mfw= 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=Ym3S6tHQ; arc=none smtp.client-ip=209.85.214.177 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Ym3S6tHQ" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2bf2d865383so1065ad.1 for ; Sun, 31 May 2026 10:06:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1780247189; x=1780851989; 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=BmuO3W1I2r8igx3GUMilp2TWl+RQ7oW1rVuzlsosPns=; b=Ym3S6tHQwvZqH0peQAmekER+z0u9eVK+3xQXx6RXGtSblOPonEvPHWn1z7JGjsYxsm zKq0h9CwdrtO97jp2d9q9VoyvDYnUqES+b0W1aJxUOmEhSDfJZs3yBn5wVyKoPwM/y9S HINa5tQl4OWcI2cYXYWISVCGCzYFhLigBhbZqbLG053lis1/Tp/LxhZ+P0z/gaJdPTSB 6Ixnn8jLWhqv8W0C6WNO616QgdEAPQhlZ6wHvGyCIoy39pWD6oR7imlvBrB1mw2rEYb8 ijTCmE1n0hFKLbXZkA5exhgMcZfnUxgA3fuZ67j8h11wChVSdhcpFKnOXyyWLWvxzTs2 Ue7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780247189; x=1780851989; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BmuO3W1I2r8igx3GUMilp2TWl+RQ7oW1rVuzlsosPns=; b=ENBuF+rFXV5ftYerM4eu/5Op1ZOLnB9lUGKH0DGVCyFD0v/bg97BqsIil24/o9AILu +h6qd+qawhj/Cx+yZV6NabFOlWv+QHdRlVwYFVP5y8UUfWuqZTF3ssH/50X7IPb1nUnE JRVR4qRsZzBRSbjmCkfb/bYrdPPatIWoGuZgkZkuKVP6qgaZrYH5N6RQ+8aJCG05JfTe Vzgp8SdWcdgJO2rA+rcQ7njvE91ys88FSEJZzUn+fF2i5d/+ehDHLOeLxCVwPouttUHu VyYX7HX/8ZvHWhFliXbO5vwoPlR02/STDyKcHTVA7KVbqRVTGShlcNU63qeKGlTnwomz +NtA== X-Forwarded-Encrypted: i=1; AFNElJ+f+8B9MfkmteAIJ+NhFIdrq8ZVtzkBqhlQ5MQ3RXdKkv6bOMR4pTB1Ns8kkYSdCs9nYRkaMgFc8fT/mcA=@vger.kernel.org X-Gm-Message-State: AOJu0YwikZEgSx1lQDwi5TCGGAzYzqbttvMecWV1mBk25KCMo/OoL4de IVH9MbuC6FJNMkkh4pTTRxwJf5TqrQQYxUs1WYA1Cj6HRt9TYzPujpL5V6xOO+XHCQ== X-Gm-Gg: Acq92OGy/9N4sh2GdefkPZK6cblrNIaK/38tOJDpYuYGIn74wTKw8+Iz/r1iF2eU/it GcMCapOugPfvNUHHN3IUtcB07EsPxA+z7nKQedN0Y7GpyCSxxy2u/HyuDCI4Ey72C2u/NKZeJjn uIRqhNBzbs20cWwEx66jj+uvVBl6C9OO9HLeKD3NBaf3F4fB74xOT8zwaI9OV2sZWG7KxaLqu85 ZPa1KO/wqLJ0GkIOfgnpjAs70dNehDeOuzt+FUdTaQXsY+d4LdvG/tIx0/0dAA9wM6hWgg3yRU/ 3pMc+hF40Zt6ggZij5JGu9mpsWqs6G5AsLKysuN6ZgfoQHsj+PittWWJ+XtVkPh7dwKjir2ZPTl 7Y9uM5Ms5YfbHB0odSmkP3pJwHzLuszSFRH7oneUx61J1A5viKs41ucrMIsGzhNAouoJ/1DgvF9 XoqKC0HV6kiuzW4Y9d7GbO+48hMS4etSOz4FEdQJ1L5n+0C2gYO1YHDYjee7n+SSNEOrA7W9U= X-Received: by 2002:a17:902:d4c5:b0:2bd:6dad:7cca with SMTP id d9443c01a7336-2bf975b1f95mr4195355ad.22.1780247187838; Sun, 31 May 2026 10:06:27 -0700 (PDT) Received: from google.com (199.255.142.34.bc.googleusercontent.com. [34.142.255.199]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2bf23c2da36sm97965615ad.69.2026.05.31.10.06.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 May 2026 10:06:27 -0700 (PDT) Date: Sun, 31 May 2026 17:06:20 +0000 From: Pranjal Shrivastava To: Nicolin Chen Cc: iommu@lists.linux.dev, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Joerg Roedel , Will Deacon , Bjorn Helgaas , David Woodhouse , Lu Baolu , Robin Murphy , Suravee Suthikulpanit , Jason Gunthorpe , David Matlack , Samiullah Khawaja , Daniel Mentz , Pasha Tatashin , Mostafa Saleh Subject: Re: [PATCH v6 3/6] PCI/ATS: Mandate checking pci_ats_supported() before pci_prepare_ats() Message-ID: References: <20260529111208.387412-1-praan@google.com> <20260529111208.387412-4-praan@google.com> 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: On Fri, May 29, 2026 at 02:56:01PM -0700, Nicolin Chen wrote: > On Fri, May 29, 2026 at 11:12:05AM +0000, Pranjal Shrivastava wrote: > > Currently, pci_prepare_ats() internally calls pci_ats_supported() and > > returns -EINVAL if the device does not support ATS. While this provides > > a silent safety check, it conflates support detection with configuration. > > > > Update pci_prepare_ats() to wrap the internal pci_ats_supported check in > > a WARN_ON(). This mandates all callers to call pci_prepare_ats() only if > > the function supports ATS. > > > > Update the function documentation to mention that callers must verify > > ATS support (via pci_ats_supported()) before calling pci_prepare_ats(). > > > > Suggested-by: Baolu Lu > > Signed-off-by: Pranjal Shrivastava > > Sashiko pointed out a bisect issue. So, you might want to reorder > a bit. The patch itself looks good to me. > Ack. I'll re-order for bisectibility. > Reviewed-by: Nicolin Chen Thanks! Praan