From patchwork Thu Mar 12 16:44:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 11434883 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B7F10161F for ; Thu, 12 Mar 2020 16:44:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 974F92072F for ; Thu, 12 Mar 2020 16:44:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="MrqD06Qh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726513AbgCLQot (ORCPT ); Thu, 12 Mar 2020 12:44:49 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:33243 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726299AbgCLQoh (ORCPT ); Thu, 12 Mar 2020 12:44:37 -0400 Received: by mail-qk1-f195.google.com with SMTP id p62so7338024qkb.0 for ; Thu, 12 Mar 2020 09:44:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ec7R0bi2nVM+F7rZN313cf7V1mbBY7UX4j8RKAtVudI=; b=MrqD06QhTj4HWofBJT7nxxIOwPRtSzDwxbA1IXIAZd+3Ka1QMh5FZbIGfKIWSR8h8X RuhrJagdGXsh+9vfSSTWITbjq4YzFxdkSVMCM6j7VKrnWPUc30Gb+4D77DX+SnDJ7Bqz Ig1o2b+WMvY/9fPKVhn5DyUTVxV96sih4P5gASQWiwy8cGlg0c0O38W6JEBKQASbDJyo P1VInXw4lJxd6FqY/dsvw4FNJUD2ziFu+Kxv2oGesiYBEA5SqBIn2nWZZ+LI9aJVQuFk o+HMBW4yav8ghIPKwdGWwcqKKVGPBmOVeUsmujGojgqCtuqZIbtyY2s4YMtl3YfypgpD J6tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ec7R0bi2nVM+F7rZN313cf7V1mbBY7UX4j8RKAtVudI=; b=l+q85aK0DxF6Y34kpxe2HSq5BURaH3DzMZbxfvPhNmS/mRuobfdXaA2D0UbQCi0Hpg eisPZympzBiHJb61symSVjRZDbRd4sjDqXeAwZSvS/ncxnYGZeA4M/mro70kdQtd3Mo3 1NnBiHxhlyCycR2sMo6oFLZP/hwvXkrae3KmGLr9DMI34w9TP/6g8BfyRhVs6ICku5xO P70vIag1fwt8QGM3qTr+NiB7TpHRU6GdZp91obhC+CIpJX9eYheOLhqHhxC468lyxm0V TC0iua7G0WusBYgP8MEpCMHV/m78AHgO2YRu4TwUl/Xb8RsLd5XFlE3c5yQcFuGwRiUn 3BhQ== X-Gm-Message-State: ANhLgQ3+clKsKaoMKNsAecdyrLky9Z3mFXrr+HrmKER6cjcE4mAY0c+5 BllYhW5prWm7ughN0TVVQtCDqA== X-Google-Smtp-Source: ADFU+vtioYETrA227Ha7YqY55Gh12iS6/cs2tK2mVB2+BbYDGinlbtWcnlzwX3ec9WHmb3gPZUx3ug== X-Received: by 2002:a37:987:: with SMTP id 129mr8799401qkj.83.1584031475735; Thu, 12 Mar 2020 09:44:35 -0700 (PDT) Received: from localhost.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id j4sm7244743qtn.78.2020.03.12.09.44.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2020 09:44:35 -0700 (PDT) From: Alex Elder To: David Miller , Bjorn Andersson , Andy Gross Cc: Rob Herring , Mark Rutland , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org (open list), Jakub Kicinski Subject: [PATCH 1/2] bitfield.h: add FIELD_MAX() and field_max() Date: Thu, 12 Mar 2020 11:44:27 -0500 Message-Id: <20200312164428.18132-2-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200312164428.18132-1-elder@linaro.org> References: <20200312164428.18132-1-elder@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Define FIELD_MAX(), which supplies the maximum value that can be represented by a field value. Define field_max() as well, to go along with the lower-case forms of the field mask functions. Signed-off-by: Alex Elder Acked-by: Jakub Kicinski --- include/linux/bitfield.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/linux/bitfield.h b/include/linux/bitfield.h index 4bbb5f1c8b5b..48ea093ff04c 100644 --- a/include/linux/bitfield.h +++ b/include/linux/bitfield.h @@ -55,6 +55,19 @@ (1ULL << __bf_shf(_mask))); \ }) +/** + * FIELD_MAX() - produce the maximum value representable by a field + * @_mask: shifted mask defining the field's length and position + * + * FIELD_MAX() returns the maximum value that can be held in the field + * specified by @_mask. + */ +#define FIELD_MAX(_mask) \ + ({ \ + __BF_FIELD_CHECK(_mask, 0ULL, 0ULL, "FIELD_MAX: "); \ + (typeof(_mask))((_mask) >> __bf_shf(_mask)); \ + }) + /** * FIELD_FIT() - check if value fits in the field * @_mask: shifted mask defining the field's length and position @@ -110,6 +123,7 @@ static __always_inline u64 field_mask(u64 field) { return field / field_multiplier(field); } +#define field_max(field) ((typeof(field))field_mask(field)) #define ____MAKE_OP(type,base,to,from) \ static __always_inline __##type type##_encode_bits(base v, base field) \ { \ From patchwork Thu Mar 12 16:44:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 11434881 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3BAA7921 for ; Thu, 12 Mar 2020 16:44:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1ACB120716 for ; Thu, 12 Mar 2020 16:44:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Ps6uYL78" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726554AbgCLQom (ORCPT ); Thu, 12 Mar 2020 12:44:42 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:33091 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbgCLQoi (ORCPT ); Thu, 12 Mar 2020 12:44:38 -0400 Received: by mail-qt1-f194.google.com with SMTP id d22so4923475qtn.0 for ; Thu, 12 Mar 2020 09:44:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=M8I0tibm0x9o216WA6J8pQVPILtFuntNhRaRSj7eG4A=; b=Ps6uYL78L8tiiefDveevpxYZYKo1t9+cCCagwNnkPLBaPSV2pPdfXTIXk604ph2xpw faAVSCi08gDu/GHSdCihjkCKqIZSC2IleEQoObaiVDFlTPmjYm52pvdzdaISQ9hf//Pv FodTrRUDCzthOuurF7NFtvTYK4oPZVJw9M/IozV4SMQzttu16TI5wTezqHL46bbcltwQ /kSxZi3YBmPrNogjVuKfjbEAmaL6NE7CmpTD/CO+q3VYSldYo70H8zjtDyhMYExHBeHf iV3HE8sYXetkWPcjjwtfAJNRiW034zFfHwuVUuIIQo35aeFKxDYrLLidYWAh9MJ0tHKD WFXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=M8I0tibm0x9o216WA6J8pQVPILtFuntNhRaRSj7eG4A=; b=m1yOg6pK6uX0RdikLXaQq5X9B8GKvTkDq+e814CG/xMkWlYEp/ObQI5cVGL+2RnVB6 vNiBNZoustTYHn1QBehUjl6B+aEcda+gDMsv6JeLdkDUJ+ZWWWmeKsH4jV9cot9G2rTb kXvmBM2blSZVI5BK0pMPC0htT95Yk4+BftJzyirMSaZh9WYQ6mLJGKz9NTPccvragl0B CwZ7j9gY2AuD30F6IkDaisBbiCbWSLMLKFt8KeXY4j1Z0U/eKXXOkKQuiMlUmdR962X3 z+BDPmFopgjaBlOnL0oZI+Lm3vF9SPX0iPjCrTfGgD/HxP/g8GLFEO4nFIOgMI2dcrgZ KnPA== X-Gm-Message-State: ANhLgQ1jB0Ua3tb43jSfKbrEziTWmwoY+QNY0CD6pMZ4eAATAThGddLQ TXlP19RI8SsHSWNW8k4NNIETAA== X-Google-Smtp-Source: ADFU+vtn1v3TaOzby5HYYtlyHy9Ftixfhi2XKzOU4sP3mHDxuJyhG7MDqq56wClzWXEfwdgTOCMy0w== X-Received: by 2002:ac8:1e90:: with SMTP id c16mr8251707qtm.265.1584031477341; Thu, 12 Mar 2020 09:44:37 -0700 (PDT) Received: from localhost.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id j4sm7244743qtn.78.2020.03.12.09.44.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2020 09:44:36 -0700 (PDT) From: Alex Elder To: David Miller , Bjorn Andersson , Andy Gross Cc: Rob Herring , Mark Rutland , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/2] Revert "arm64: dts: sdm845: add IPA information" Date: Thu, 12 Mar 2020 11:44:28 -0500 Message-Id: <20200312164428.18132-3-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200312164428.18132-1-elder@linaro.org> References: <20200312164428.18132-1-elder@linaro.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This reverts commit 9cc5ae125f0eaee471bc87fb5cbf29385fd9272a. This commit: b303f9f0050b arm64: dts: sdm845: Redefine interconnect provider DT nodes found in the Qualcomm for-next tree removes/redefines the interconnect provider node(s) used for IPA. I'm not sure whether it technically conflicts with the IPA change to "sdm845.dtsi" in for-next, but it renders it broken. Revert this commit in the for-next tree, with the plan to incorporate it into the Qualcomm tree instead. Signed-off-by: Alex Elder --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 51 ---------------------------- 1 file changed, 51 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index 58fd1c611849..d42302b8889b 100644 --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi @@ -675,17 +675,6 @@ interrupt-controller; #interrupt-cells = <2>; }; - - ipa_smp2p_out: ipa-ap-to-modem { - qcom,entry-name = "ipa"; - #qcom,smem-state-cells = <1>; - }; - - ipa_smp2p_in: ipa-modem-to-ap { - qcom,entry-name = "ipa"; - interrupt-controller; - #interrupt-cells = <2>; - }; }; smp2p-slpi { @@ -1446,46 +1435,6 @@ }; }; - ipa@1e40000 { - compatible = "qcom,sdm845-ipa"; - - modem-init; - modem-remoteproc = <&mss_pil>; - - reg = <0 0x1e40000 0 0x7000>, - <0 0x1e47000 0 0x2000>, - <0 0x1e04000 0 0x2c000>; - reg-names = "ipa-reg", - "ipa-shared", - "gsi"; - - interrupts-extended = - <&intc 0 311 IRQ_TYPE_EDGE_RISING>, - <&intc 0 432 IRQ_TYPE_LEVEL_HIGH>, - <&ipa_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, - <&ipa_smp2p_in 1 IRQ_TYPE_EDGE_RISING>; - interrupt-names = "ipa", - "gsi", - "ipa-clock-query", - "ipa-setup-ready"; - - clocks = <&rpmhcc RPMH_IPA_CLK>; - clock-names = "core"; - - interconnects = - <&rsc_hlos MASTER_IPA &rsc_hlos SLAVE_EBI1>, - <&rsc_hlos MASTER_IPA &rsc_hlos SLAVE_IMEM>, - <&rsc_hlos MASTER_APPSS_PROC &rsc_hlos SLAVE_IPA_CFG>; - interconnect-names = "memory", - "imem", - "config"; - - qcom,smem-states = <&ipa_smp2p_out 0>, - <&ipa_smp2p_out 1>; - qcom,smem-state-names = "ipa-clock-enabled-valid", - "ipa-clock-enabled"; - }; - tcsr_mutex_regs: syscon@1f40000 { compatible = "syscon"; reg = <0 0x01f40000 0 0x40000>;