From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 3C48E13A896 for ; Mon, 15 Jul 2024 20:10:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721074252; cv=none; b=fsGmkQMAQkIwnFfrjnmja2Rdi/RFjUXBSIPfL3Pk6iUZdkJ+xf0gwdKr3mEIgbznlHW6UPNQBvG5zyw1xp8Jqif4D1bM8mIbM/6m6BJAe4eBQf9mPPXQPozgPLQaErK3lh4TH7yEUUR+UkAJsivcWNbyFvJUqv0J3tU6wum/Lbs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721074252; c=relaxed/simple; bh=apIzQbvUQRMe95SHtzkjIV3GFY79ySQ9uE4Zolrk3vY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=W1iVip4WIICbvIFg4jrrauKYC6esaVejFhxHooKhTGx4DULf69Uiv6YxltScQ+TxQhRbiB3xOkgIsfI7vFqLo9NhcmbKGvbdFAiTDn1VEqG7U7Ib+WWVrx2m+25gwf+DFQ0yA2FmDxcdrP8kKvVKgb+qzCawHbsRmY2GB/V40v8= 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=K7xKLgQj; arc=none smtp.client-ip=209.85.218.52 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="K7xKLgQj" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a77b60cafecso566602566b.1 for ; Mon, 15 Jul 2024 13:10:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721074249; x=1721679049; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=XWIo3s3ppYQ4sfyuhvPeRxZE+2HFTQTLn/FHTLwsUU0=; b=K7xKLgQjfYeLRVl99f/0pfn2eAiL+fbs/HzkYUkUD9mXPmNVa2QmUM9fP645+S+LQI t9qe1BN1DTJR+z2OmECcTu4PqUETa/0oQVQAtHilYJazNPRkcRV6EHYrhzqq/sLoUr9I Fq8JwGEyhIkCWruZfg6u0q12loS9Y4B/hGshz2r+udQGduKx+3lZAVdqI5t0f7vx7WRu UoOvWUni4yZsO0h5tHTy0k0HZ3S3+PDvZ6fhc71/KOc9wPj+AIWpBBhILiamSfiAloUH 0Cf1c+97HDvgr4C0i72YKJxSDWqI8XyDwBJd6WMgIc9ud0JkvYLcaFoTSiayCFvDWdl0 575Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721074249; x=1721679049; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XWIo3s3ppYQ4sfyuhvPeRxZE+2HFTQTLn/FHTLwsUU0=; b=NEVHqFO62eJsokbeeuUnJDoxy721sFRyH8ZC7oXpWaKTGj0qCH1WqXYn/HzuCjYVAn euxACbm0AZ6kn7e2a2iw59zpE9iGLt/d2VpX4i6BD5ytKBPItngHr9yTRumdw91tvkhe dkS70VY9v8t7pc9ujNy3OGoxrNL01u6FKhy3TOUa1EQi1gmEWyVus+jVlOchijoKB0C7 7EJO/se/KA3Ng7D55uLzS1TKj+NtG/jnN2UODgqtDmkQefQ6umMnFBh01YyV67I83/aV w7zX8YvJ3nOmrBTz7GfqYcWawmg9vn5ETAFlQWQoSsHM06jhCB0mao/51m6uPbRqpVym 8hQA== X-Forwarded-Encrypted: i=1; AJvYcCU1guIPQj1Szr7NWUTJcvR8eeuEJrtwCEHVj932jjrmPOsj5vQbrwUME05HQvnPnPKlckZU2AcIiU5sc5n4VGHLddUmqp5dqMUQ3w== X-Gm-Message-State: AOJu0YwwNKkqUOic5Ke9v+7GWDbPGtxoVuhqs0rhMrpIw7qa8IJ7OiyY MqMYSZ11XT0uI4z2Uo0Q0n2tIHxOa66780s5L17oR/QXc1LlYwKlVCPW5dJXuJ4= X-Google-Smtp-Source: AGHT+IGncW6Av8+CLeIS5zUNKTkEElaBGCbltYGwtYKP8h1FXJsG68xeRxIUHQtlauMLhB8uiohZMA== X-Received: by 2002:a17:906:3412:b0:a75:1069:5b94 with SMTP id a640c23a62f3a-a79ea437512mr2853166b.21.1721074249441; Mon, 15 Jul 2024 13:10:49 -0700 (PDT) Received: from [192.168.105.194] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a79bc7f1d29sm235668066b.105.2024.07.15.13.10.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Jul 2024 13:10:49 -0700 (PDT) Message-ID: Date: Mon, 15 Jul 2024 22:10:47 +0200 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 00/14] PCI: qcom: Simulate PCIe hotplug using 'global' interrupt To: manivannan.sadhasivam@linaro.org, Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Kishon Vijay Abraham I , Bjorn Andersson Cc: linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20240715-pci-qcom-hotplug-v1-0-5f3765cc873a@linaro.org> Content-Language: en-US From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJHbamSk t1bfif3SnmhA6TiNvEpDKPiT3IDs42THU6ygslrBxyROQPWLI9IL1y8S6RtEh8H+NZQWZNzm UQ3imZirlPjxZtvz1BtnnBWS06e7x/UEAguj7VHCuymVgpl2Za17d1jj81YN5Rp5L9GXxkV1 aUEwONM3eCI3qcYm5JNc5X+JthZOWsbIPSC1Rhxz3JmWIwP1udr5E3oNRe9u2LIEq+wH/toH kpPDhTeMkvt4KfE5m5ercid9+ZXAqoaYLUL4HCEw+HW0DXcKDwARAQABzShLb25yYWQgRHli Y2lvIDxrb25yYWQuZHliY2lvQGxpbmFyby5vcmc+wsGOBBMBCAA4FiEEU24if9oCL2zdAAQV R4cBcg5dfFgFAmQ5bqwCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQR4cBcg5dfFjO BQ//Y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jat7BQGFz4ZpRavkMUFuDirn5Tf28oc5ebe2cIHp4/kajTx/7JOxWZ80U70mA cBgEeYSrYYnX+UJsSxpzLc/0sT1eRJDEhI4XIQM4ClIzpsCIN5HnVF76UQXh3a9zpwh3dk8i bhN/URmCOTH+LHNJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <20240715-pci-qcom-hotplug-v1-0-5f3765cc873a@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 15.07.2024 7:33 PM, Manivannan Sadhasivam via B4 Relay wrote: > Hi, > > This series adds support to simulate PCIe hotplug using the Qcom specific > 'global' IRQ. Historically, Qcom PCIe RC controllers lack standard hotplug > support. So when an endpoint is attached to the SoC, users have to rescan the > bus manually to enumerate the device. But this can be avoided by simulating the > PCIe hotplug using Qcom specific way. > > Qcom PCIe RC controllers are capable of generating the 'global' SPI interrupt > to the host CPUs. The device driver can use this event to identify events such > as PCIe link specific events, safety events etc... > > One such event is the PCIe Link up event generated when an endpoint is detected > on the bus and the Link is 'up'. This event can be used to simulate the PCIe > hotplug in the Qcom SoCs. > > So add support for capturing the PCIe Link up event using the 'global' interrupt > in the driver. Once the Link up event is received, the bus underneath the host > bridge is scanned to enumerate PCIe endpoint devices, thus simulating hotplug. > > This series also has some cleanups to the Qcom PCIe EP controller driver for > interrupt handling. Welp I've reviewed this series, and only now came to the realization that the PCIe RC and PCIe EP descriptions are borderline identical.. perhaps for new platforms we could get a new binding that could have a structure like pcie@abcd1234 { // commmon properties pcie-ep { // ep specifics }; pcie-rc { // rc specifics } }; or better yet, have a single node no matter what, but consume only the required resources from the driver and have something akin to phy-mode, just like we solved the DP/eDP dual-mode controller story Although here it may not be so simple given there's properties like iommu-map that map to bus specifics.. Konrad