From patchwork Wed Dec 11 08:01:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 849490 Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) (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 96D5E1D5162 for ; Wed, 11 Dec 2024 08:01:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733904100; cv=none; b=WGk6vZx64ZWqwmH+Yr1xUGwlO4IKqFLEHpgjTrF33SDlF/4Y31o2h3ooYMlfhOUyON8Pmu+cYDOCzVBeO9JOHg1I1h7X6M+Hozp0zk3ucIVmAvBwYSRmhB4C8Vn4dIWr9Muv1riEkuS4aGOGxZWh7MFxycEvpDoDb+GN6owcYfE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733904100; c=relaxed/simple; bh=ipm6qELbYTfXg2hQT0IFc0rvkpX/x/nt8LPfq0mYElQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KmFv3I4s/7T0b0nZf9mZ91M+mBa6OrYXHpGpo7L9WhzK70seyrxF8HPpJ3cLC+nz4RJwRQQW83PQyQNzdknPhjsBzVMa1Ak3iG2bjuaVKYjq/UyNgAwI+CTeTD7wS7kKdt8yZsRIvmvUh0bn+dvX4FZqfAyJOF45Cyh4OVckY4g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=okXBaSB5; arc=none smtp.client-ip=209.85.215.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="okXBaSB5" Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-7fd49d85f82so2521287a12.3 for ; Wed, 11 Dec 2024 00:01:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733904098; x=1734508898; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8q76q7eUTECAS81ZcaHstGwKhBK0vE68IjtIJyIAI+k=; b=okXBaSB5VRecPpORrr27JIy1sTCPUUNRV0odBObWz3Ht+9bFLY0YnmeDsV714Ckbz7 MwyIt5DZcD9ddsMexFwlu8czwz9oj/gA/F67OkHkP+5vFtJAJnTCXA2uXqmDcCwKK5f3 iZPsg6/rhyj36hHZiAzMaVQrup5CS9S5M5T/IzznGbrwDlYzmhyRcnH3a1bGKB5VZKRf Y9UvNyynuAbfv9AUWpHI/LgTnIMYWzhB+ttKGHhqX2YEd9HMbA/ZdVQI0wKNmrTHTw+v jv5YP/tRNiUJos05+QetafOXatKXGQLH1BCLEtA8wA65h/yxf4BOJeOhVJLObDf3HXek xUjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733904098; x=1734508898; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8q76q7eUTECAS81ZcaHstGwKhBK0vE68IjtIJyIAI+k=; b=uJRVxKHwRVhZe4CVYddkmh+RqX5ByZZnoLqkRUMxAtWlza6M3RQHQCbgD1FPykTELz hTf7PTFkqe8T6JsX016F+ubmvQm7EdxImOzN5syiJ5Ay64+qgIf66jY4SvyG7zBUVaRH GiDHPQaJO7uHd3EISoSi3Gz0pC7BruB4KVyXg08xdeAWFRe/kFmDfuaF/4j17+rtPXcW H7qqciXEUdCqbheFX8iHp6kNjvQ+BqwV1cXEfDiFJKnvOtKJl8TrsqBuRMQfwydeO7KE b7mgLCfn9p2rpxWiAsiSZ/hUaL1Uph1y1LCz8z/qba0UglwgA8N/sMYjBM0b41zDQvcg Qu8Q== X-Forwarded-Encrypted: i=1; AJvYcCUrWBJjav8Fv0QARIe0wC4jKhR/0v7uuDx0p78enoa4dxJqlWr1y/22GT/ce9bwKabzxaMSE9JRp9Ut9/dqfV0=@vger.kernel.org X-Gm-Message-State: AOJu0YxLsT5GkmT1gJgXuDRpJI+NgmPGOD0rrUJU91aw410bQ3E2t6id V0FrrXiItyP5GC26d/IW25LzCrK3lE0Doe55JX/2I+E3DJeaxEAvxiH9ALs05A== X-Gm-Gg: ASbGnctaMC8g5UMGD9tNwuAFf+sNLsZWF+BJS2zeJrjHpH1zyoli4KBqQvlewn6xpuv 6D6y4e8cqPoF2eto+D5gDlt9J08ajniYa6i/86kYBuRq/HRKxYsSuPdl0gcp+pvh7a+2Kzo62hV 8ly9pzbQSxR5hEr9FiD72HHRObsD/znsEA+60lVw71sX7WZ+yixhzNvlMKWIxM/T25CbNgIUAzs l+I+1aeOsDGX9A8BoLBRryV2/Y9b1/lIkLUSKr+C5pgm0YQCDgc8By5h14R697z+LhYlPLxDPRb /l4F X-Google-Smtp-Source: AGHT+IG99qcIr9GvfITm98ryc2AXYkrV8pH6ZRMpAt1heLeVZuLUM1sds1scrjNv6/IS5BWcXLa9WQ== X-Received: by 2002:a17:90b:224b:b0:2ee:8430:b847 with SMTP id 98e67ed59e1d1-2f127f50a32mr3250201a91.6.1733904097941; Wed, 11 Dec 2024 00:01:37 -0800 (PST) Received: from localhost.localdomain ([120.60.55.53]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ef2708b93dsm12929775a91.51.2024.12.11.00.01.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 00:01:37 -0800 (PST) From: Manivannan Sadhasivam To: kw@linux.com, gregkh@linuxfoundation.org, arnd@arndb.de, lpieralisi@kernel.org, shuah@kernel.org Cc: kishon@kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, bhelgaas@google.com, linux-arm-msm@vger.kernel.org, robh@kernel.org, linux-kselftest@vger.kernel.org, Manivannan Sadhasivam , stable+noautosel@kernel.org, Dmitry Baryshkov Subject: [PATCH v3 1/4] PCI: qcom-ep: Mark BAR0/BAR2 as 64bit BARs and BAR1/BAR3 as RESERVED Date: Wed, 11 Dec 2024 13:31:02 +0530 Message-Id: <20241211080105.11104-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241211080105.11104-1-manivannan.sadhasivam@linaro.org> References: <20241211080105.11104-1-manivannan.sadhasivam@linaro.org> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On all Qcom endpoint SoCs, BAR0/BAR2 are 64bit BARs by default and software cannot change the type. So mark the those BARs as 64bit BARs and also mark the successive BAR1/BAR3 as RESERVED BARs so that the EPF drivers cannot use them. Cc: stable+noautosel@kernel.org # depends on patch introducing only_64bit flag Fixes: f55fee56a631 ("PCI: qcom-ep: Add Qualcomm PCIe Endpoint controller driver") Reviewed-by: Dmitry Baryshkov Signed-off-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-qcom-ep.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c index e588fcc54589..f925c4ad4294 100644 --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c @@ -823,6 +823,10 @@ static const struct pci_epc_features qcom_pcie_epc_features = { .msi_capable = true, .msix_capable = false, .align = SZ_4K, + .bar[BAR_0] = { .only_64bit = true, }, + .bar[BAR_1] = { .type = BAR_RESERVED, }, + .bar[BAR_2] = { .only_64bit = true, }, + .bar[BAR_3] = { .type = BAR_RESERVED, }, }; static const struct pci_epc_features * From patchwork Wed Dec 11 08:01:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 849489 Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) (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 E6B451C5490 for ; Wed, 11 Dec 2024 08:01:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733904108; cv=none; b=gNJ3NLDg5dPm6ZJbdUr/ton/vo3een4OvEDvDEd2AbdpMWgWTU+qhMmZGmssOS9RCDQfsskiNoINPT2z+hMGP59xnwM1p16y2L1RSYMNWZ6IyjMuDBcR4lbJS/XtMp8pHC91F2kbhbDLprMMjybEavLDuqh3ZW/ZZ3+lx1XPr+U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733904108; c=relaxed/simple; bh=lWn6bFGNd/3JKefZVdI9nxhLKSncMF+8FCLHmP8ExpA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=R+gok55olv/HzIc8R1lnx92eIzK5oPG6xtAuC+WjXfTAN1wWKi+wxsAUh3DBTh4Rn7lk6rZ2vYUoPzwifOJApRXhOT8Ixki5hPQ8MDyZ7HeUau1cmICJdxYmnT5iM4NsO5jqQOoLD727P9sbD+5rfYHuj7I/gLs+n1vc483oFKE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=rpwPq8Yq; arc=none smtp.client-ip=209.85.215.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rpwPq8Yq" Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-801986033f9so660755a12.1 for ; Wed, 11 Dec 2024 00:01:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733904106; x=1734508906; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oI3p2DNU6VR/r2E24vXbkA5gNVpP0sFqur3k9w/neH8=; b=rpwPq8YqSHbVISHHK6s7/YRpyVYPaSuQNJQC2c+D7ROlrM5Ju4oR01FBRufBieRpZ9 rI1BoyhPckvtr7aqNRHUA9KR4G7g+2Z9GVaV0CU7LhAs4foAh60W03f9X7csq+Mx+5fe hMi7Sq2PmVfPdGp6wFhl4oXq8/GTdQijW+NkuJbLdqoxJ1SXjiz65iVuIS36dEKw49Kb M9h6KGXn4VtNhb+y1ZwDNX2b+Z7gxyUwOlDbvJOxG8fHY0qeHDBAe53/zOLgiuKIa6Xt CUXgGTYfsC1NOfRjp6qCRXMu9Ndg1GY7wXFurU/tF0igVi7XKvpJcooiHm/FpcrU6HTA VNCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733904106; x=1734508906; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oI3p2DNU6VR/r2E24vXbkA5gNVpP0sFqur3k9w/neH8=; b=Fe+5v/QrGf9DtHL2uYKvmMF5xswzWbbYqjUxU75nQRd1T78CpjUxYbSD5/2hyTzvte BwLM0ECisyeDI1SaO4s8pfxoEp9FfXniD0iPl2Apj+RZLqLQA4F2sxTp+QfN4STPCL9w INHV6Njkvrwzyar0kzIfsNcoTxB087jxxNN9k5PamRCPQgbU4vakKr/6OoFgXkgglhsh dlFx6qHpjpmLGcgMGuHH78bu2tFXZ+U0dd5KJ0tbARibqGBJym397JNSesadwntyiQeq OcXDzSBx21ibqu4dKV5MAyoaskdvIjb7/Bku5H08KP1XSw/zrvGpFc3ATr1218KBhSjs WUAQ== X-Forwarded-Encrypted: i=1; AJvYcCVDl8CIOlOa3ovx93deyu59QqD4po5OwgYN6nOa8f9tgWayHRVzbk2iwVfZwGhKmUzPQhJ0memK7bZDCJrAfEY=@vger.kernel.org X-Gm-Message-State: AOJu0YwMeqfFYjU5sFOCkRpaVyYmPN1bSV3b3Bgm9fzLHLDT5vywqzIY TJHwY46Pk8As9KQftL6WeLpFuGFAGeWE85pKBqtU1wKn0QDnuhim4bhzFmNkDA== X-Gm-Gg: ASbGnctbhXB8JuAUOe5YTea7+AJXEzMqQSP4w2uTWTTxmFc/Hf8LTz2S+l7SHNjoIEn 8ATwIcjO2uGynocQMAWnfJa73mXkq5bDz5mxMpaFse+kc5zf9l6R90BmG/Pfna8ZBUzr64Lio1H ffkerfjCceIxya/Yr91V/E8CZWpBJ0ZaayLJ5Ofxv/rLCBQEKXlUICx0oYMrPllHL/hlPI3dIpO v1aBRt6gIvEm+YbzfsvLT4oYFcc/ukscEMDmTS52Tt+OL8DntIuMRx6pOHs98T4AMPLw0H6OQWH EPe9 X-Google-Smtp-Source: AGHT+IFI7gkOkC6T+qAcAj0nkeYuAIcC6kTVp/ygQd04PdZ7LAeRQwUaf9QpqzZHybol1ibBhqYTlA== X-Received: by 2002:a17:90b:3147:b0:2ee:94d1:7a89 with SMTP id 98e67ed59e1d1-2f127f8f7eemr2987456a91.1.1733904106330; Wed, 11 Dec 2024 00:01:46 -0800 (PST) Received: from localhost.localdomain ([120.60.55.53]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ef2708b93dsm12929775a91.51.2024.12.11.00.01.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 00:01:45 -0800 (PST) From: Manivannan Sadhasivam To: kw@linux.com, gregkh@linuxfoundation.org, arnd@arndb.de, lpieralisi@kernel.org, shuah@kernel.org Cc: kishon@kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, bhelgaas@google.com, linux-arm-msm@vger.kernel.org, robh@kernel.org, linux-kselftest@vger.kernel.org, Manivannan Sadhasivam Subject: [PATCH v3 3/4] selftests: Move PCI Endpoint tests from tools/pci to Kselftests Date: Wed, 11 Dec 2024 13:31:04 +0530 Message-Id: <20241211080105.11104-4-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241211080105.11104-1-manivannan.sadhasivam@linaro.org> References: <20241211080105.11104-1-manivannan.sadhasivam@linaro.org> Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This just moves the existing tests under tools/pci to tools/testing/selftests/pci_endpoint and adjusts the paths in Makefile accordingly. Migration to Kselftest framework will be done in subsequent commits. Signed-off-by: Manivannan Sadhasivam --- Documentation/PCI/endpoint/pci-test-howto.rst | 9 +++++---- MAINTAINERS | 2 +- tools/testing/selftests/pci_endpoint/.gitignore | 3 +++ tools/{pci => testing/selftests/pci_endpoint}/Build | 0 tools/{pci => testing/selftests/pci_endpoint}/Makefile | 10 +++++----- .../{pci => testing/selftests/pci_endpoint}/pcitest.c | 0 .../{pci => testing/selftests/pci_endpoint}/pcitest.sh | 0 7 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 tools/testing/selftests/pci_endpoint/.gitignore rename tools/{pci => testing/selftests/pci_endpoint}/Build (100%) rename tools/{pci => testing/selftests/pci_endpoint}/Makefile (83%) rename tools/{pci => testing/selftests/pci_endpoint}/pcitest.c (100%) rename tools/{pci => testing/selftests/pci_endpoint}/pcitest.sh (100%) diff --git a/Documentation/PCI/endpoint/pci-test-howto.rst b/Documentation/PCI/endpoint/pci-test-howto.rst index 909f770a07d6..c4ae7af50ede 100644 --- a/Documentation/PCI/endpoint/pci-test-howto.rst +++ b/Documentation/PCI/endpoint/pci-test-howto.rst @@ -123,16 +123,17 @@ above:: Using Endpoint Test function Device ----------------------------------- -pcitest.sh added in tools/pci/ can be used to run all the default PCI endpoint -tests. To compile this tool the following commands should be used:: +pcitest.sh added in tools/testing/selftests/pci_endpoint can be used to run all +the default PCI endpoint tests. To compile this tool the following commands +should be used:: # cd - # make -C tools/pci + # make -C tools/testing/selftests/pci_endpoint or if you desire to compile and install in your system:: # cd - # make -C tools/pci install + # make -C tools/testing/selftests/pci_endpoint install The tool and script will be located in /usr/bin/ diff --git a/MAINTAINERS b/MAINTAINERS index 21fdaa19229a..f116f78a2ec5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17794,7 +17794,7 @@ F: Documentation/PCI/endpoint/* F: Documentation/misc-devices/pci-endpoint-test.rst F: drivers/misc/pci_endpoint_test.c F: drivers/pci/endpoint/ -F: tools/pci/ +F: tools/testing/selftests/pci_endpoint/ PCI ENHANCED ERROR HANDLING (EEH) FOR POWERPC M: Mahesh J Salgaonkar diff --git a/tools/testing/selftests/pci_endpoint/.gitignore b/tools/testing/selftests/pci_endpoint/.gitignore new file mode 100644 index 000000000000..29ab47c48484 --- /dev/null +++ b/tools/testing/selftests/pci_endpoint/.gitignore @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0-only +*.o +pcitest diff --git a/tools/pci/Build b/tools/testing/selftests/pci_endpoint/Build similarity index 100% rename from tools/pci/Build rename to tools/testing/selftests/pci_endpoint/Build diff --git a/tools/pci/Makefile b/tools/testing/selftests/pci_endpoint/Makefile similarity index 83% rename from tools/pci/Makefile rename to tools/testing/selftests/pci_endpoint/Makefile index 62d41f1a1e2c..3c6fe18e32cc 100644 --- a/tools/pci/Makefile +++ b/tools/testing/selftests/pci_endpoint/Makefile @@ -1,11 +1,10 @@ # SPDX-License-Identifier: GPL-2.0 -include ../scripts/Makefile.include +include ../../../scripts/Makefile.include bindir ?= /usr/bin ifeq ($(srctree),) -srctree := $(patsubst %/,%,$(dir $(CURDIR))) -srctree := $(patsubst %/,%,$(dir $(srctree))) +srctree := $(patsubst %/tools/testing/selftests/,%,$(dir $(CURDIR))) endif # Do not use make's built-in rules @@ -27,10 +26,11 @@ include $(srctree)/tools/build/Makefile.include # # We need the following to be outside of kernel tree # -$(OUTPUT)include/linux/: ../../include/uapi/linux/ +$(OUTPUT)include/linux/: ../../../../include/uapi/linux/ mkdir -p $(OUTPUT)include/linux/ 2>&1 || true - ln -sf $(CURDIR)/../../include/uapi/linux/pcitest.h $@ + ln -sf $(CURDIR)/../../../../include/uapi/linux/pcitest.h $@ +$(info ${CURDIR}) prepare: $(OUTPUT)include/linux/ PCITEST_IN := $(OUTPUT)pcitest-in.o diff --git a/tools/pci/pcitest.c b/tools/testing/selftests/pci_endpoint/pcitest.c similarity index 100% rename from tools/pci/pcitest.c rename to tools/testing/selftests/pci_endpoint/pcitest.c diff --git a/tools/pci/pcitest.sh b/tools/testing/selftests/pci_endpoint/pcitest.sh similarity index 100% rename from tools/pci/pcitest.sh rename to tools/testing/selftests/pci_endpoint/pcitest.sh