Re: [PATCH] dt-bindings: arm: cpus: Add Qualcomm Kryo 465

2023-10-22 Thread Rob Herring


On Sat, 21 Oct 2023 09:16:19 +0200, David Wronek wrote:
> Add a compatible for the Qualcomm Kryo 465 found in SM7125.
> 
> Signed-off-by: David Wronek 
> ---
>  Documentation/devicetree/bindings/arm/cpus.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 

Applied, thanks!



Re: [PATCH v5 16/18] x86/sgx: Limit process EPC usage with misc cgroup controller

2023-10-22 Thread Haitao Huang

On Mon, 09 Oct 2023 19:26:01 -0500, Huang, Kai  wrote:



@@ -332,6 +336,7 @@ void sgx_isolate_epc_pages(struct sgx_epc_lru_lists  
*lru, size_t nr_to_scan,

  * sgx_reclaim_epc_pages() - Reclaim EPC pages from the consumers
  * @nr_to_scan: Number of EPC pages to scan for reclaim
  * @ignore_age: Reclaim a page even if it is young
+ * @epc_cg: EPC cgroup from which to reclaim
  *
  * Take a fixed number of pages from the head of the active page pool  
and
  * reclaim them to the enclave's private shmem files. Skip the pages,  
which have
@@ -345,7 +350,8 @@ void sgx_isolate_epc_pages(struct sgx_epc_lru_lists  
*lru, size_t nr_to_scan,
  * problematic as it would increase the lock contention too much,  
which would

  * halt forward progress.
  */
-size_t sgx_reclaim_epc_pages(size_t nr_to_scan, bool ignore_age)
+size_t sgx_reclaim_epc_pages(size_t nr_to_scan, bool ignore_age,
+struct sgx_epc_cgroup *epc_cg)
 {
struct sgx_backing backing[SGX_NR_TO_SCAN_MAX];
struct sgx_epc_page *epc_page, *tmp;
@@ -355,7 +361,15 @@ size_t sgx_reclaim_epc_pages(size_t nr_to_scan,  
bool ignore_age)

LIST_HEAD(iso);
size_t ret, i;

-   sgx_isolate_epc_pages(_global_lru, nr_to_scan, );
+   /*
+* If a specific cgroup is not being targeted, take from the global
+* list first, even when cgroups are enabled.  If there are
+* pages on the global LRU then they should get reclaimed asap.
+*/


This is probably some obsolete comments I should have removed. When cgroup  
is enabled, reclaimables will be always in a cgroup, the root by default.  
(!epc_cg) condition is harmless but not needed because the global list  
will be empty if cgroup is enabled.



+   if (!IS_ENABLED(CONFIG_CGROUP_SGX_EPC) || !epc_cg)
+   sgx_isolate_epc_pages(_global_lru, _to_scan, );
+
+   sgx_epc_cgroup_isolate_pages(epc_cg, _to_scan, );




So it should have been:

+   if (!IS_ENABLED(CONFIG_CGROUP_SGX_EPC))
+   sgx_isolate_epc_pages(_global_lru, _to_scan, );
+   else
+   sgx_epc_cgroup_isolate_pages(epc_cg, _to_scan, );

Or just encapsulate the difference in  sgx_epc_cgroup_isolate_pages

(I wish such code can be somehow moved to the earlier patches, so that  
we can

get early idea that how sgx_reclaim_epc_pages() is supposed to be used.)



I'll will try to restructure and split this patch. Now that we are not  
going to deal with unreclaimable, it'd be simpler and also easier to  
restructure.


So here when we are not targeting a specific EPC cgroup, we always  
reclaim from

the global list first, ...

[...]



if (list_empty())
return 0;
@@ -423,7 +437,7 @@ static bool sgx_should_reclaim(unsigned long  
watermark)

 void sgx_reclaim_direct(void)
 {
if (sgx_should_reclaim(SGX_NR_LOW_PAGES))
-   sgx_reclaim_epc_pages(SGX_NR_TO_SCAN, false);
+   sgx_reclaim_epc_pages(SGX_NR_TO_SCAN, false, NULL);


... and we always try to reclaim the global list first when directly  
reclaim is

desired, even the enclave is within some EPC cgroup.  ...


 }

 static int ksgxd(void *p)
@@ -446,7 +460,7 @@ static int ksgxd(void *p)
 sgx_should_reclaim(SGX_NR_HIGH_PAGES));

if (sgx_should_reclaim(SGX_NR_HIGH_PAGES))
-   sgx_reclaim_epc_pages(SGX_NR_TO_SCAN, false);
+   sgx_reclaim_epc_pages(SGX_NR_TO_SCAN, false, NULL);


... and in ksgxd() as well, which I guess is somehow acceptable.  ...



cond_resched();
}
@@ -600,6 +614,11 @@ int sgx_drop_epc_page(struct sgx_epc_page *page)
 struct sgx_epc_page *sgx_alloc_epc_page(void *owner, bool reclaim)
 {
struct sgx_epc_page *page;
+   struct sgx_epc_cgroup *epc_cg;
+
+   epc_cg = sgx_epc_cgroup_try_charge(reclaim);
+   if (IS_ERR(epc_cg))
+   return ERR_CAST(epc_cg);


I think I need add comments to clarify after this point is the global  
reclaimer only to keep the global free page water mark satisfied. So all  
reclaiming is from the root if cgroup is enabled, otherwise from the  
global LRU (no change from current implementation).




for ( ; ; ) {
page = __sgx_alloc_epc_page();
@@ -608,8 +627,10 @@ struct sgx_epc_page *sgx_alloc_epc_page(void  
*owner, bool reclaim)

break;
}

-   if (!sgx_can_reclaim())
-   return ERR_PTR(-ENOMEM);
+   if (!sgx_can_reclaim()) {
+   page = ERR_PTR(-ENOMEM);
+   break;
+   }

if (!reclaim) {
page = ERR_PTR(-EBUSY);
@@ -621,10 +642,17 @@ struct sgx_epc_page *sgx_alloc_epc_page(void  
*owner, bool reclaim)

break;
}

-   

[PATCH] kmod: Add FIPS 202 SHA-3 support

2023-10-22 Thread Dimitri John Ledkov
Add support for parsing FIPS 202 SHA-3 signature hashes. Separately,
it is not clear why explicit hashes are re-encoded here, instead of
trying to generically show any digest openssl supports.

Signed-off-by: Dimitri John Ledkov 
---
 libkmod/libkmod-signature.c | 12 
 1 file changed, 12 insertions(+)

diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c
index b749a818f9..a39059cd7c 100644
--- a/libkmod/libkmod-signature.c
+++ b/libkmod/libkmod-signature.c
@@ -57,6 +57,9 @@ enum pkey_hash_algo {
PKEY_HASH_SHA512,
PKEY_HASH_SHA224,
PKEY_HASH_SM3,
+   PKEY_HASH_SHA3_256,
+   PKEY_HASH_SHA3_384,
+   PKEY_HASH_SHA3_512,
PKEY_HASH__LAST
 };
 
@@ -70,6 +73,9 @@ const char *const pkey_hash_algo[PKEY_HASH__LAST] = {
[PKEY_HASH_SHA512]  = "sha512",
[PKEY_HASH_SHA224]  = "sha224",
[PKEY_HASH_SM3] = "sm3",
+   [PKEY_HASH_SHA3_256]= "sha3-256",
+   [PKEY_HASH_SHA3_384]= "sha3-384",
+   [PKEY_HASH_SHA3_512]= "sha3-512",
 };
 
 enum pkey_id_type {
@@ -167,6 +173,12 @@ static int obj_to_hash_algo(const ASN1_OBJECT *o)
case NID_sm3:
return PKEY_HASH_SM3;
 # endif
+   case NID_sha3_256:
+   return PKEY_HASH_SHA3_256;
+   case NID_sha3_384:
+   return PKEY_HASH_SHA3_384;
+   case NID_sha3_512:
+   return PKEY_HASH_SHA3_512;
default:
return -1;
}
-- 
2.34.1




Re: [PATCH 1/2] dt-bindings: arm: qcom: Add Huawei Honor 5X / GR5 (2016)

2023-10-22 Thread Conor Dooley
On Sun, Oct 22, 2023 at 01:40:41PM +0200, lukas walter wrote:
> >> Acked-by: Krzysztof Kozlowski 
> >
> >How come this v1 has an ack?
> 
> This is supposed to be a v2, but I had problems sending it correctly,
> sorry
> https://patchwork.kernel.org/project/linux-arm-msm/patch/20230916134147.163764-1-lukas.wal...@aceart.de/

The joys of email, ehh


signature.asc
Description: PGP signature


Re: [PATCH] ARM: dts: qcom: msm8226: provide dsi phy clocks to mmcc

2023-10-22 Thread Bjorn Andersson


On Wed, 12 Jul 2023 09:52:07 +0200, Luca Weiss wrote:
> Some mmcc clocks have dsi0pll & dsi0pllbyte as clock parents so we
> should provide them in the dt, which I missed in the commit adding the
> mdss nodes.
> 
> 

Applied, thanks!

[1/1] ARM: dts: qcom: msm8226: provide dsi phy clocks to mmcc
  commit: 836d083524888069cd358776a4e6c4ceec04962e

Best regards,
-- 
Bjorn Andersson 


Re: [PATCH v2] soc: qcom: pmic_glink_altmode: Print return value on error

2023-10-22 Thread Bjorn Andersson


On Tue, 17 Oct 2023 10:00:23 +0200, Luca Weiss wrote:
> It can be useful to know with which return value for example the
> typec_retimer_set call failed, so include this info in the dev_err
> prints.
> 
> 

Applied, thanks!

[1/1] soc: qcom: pmic_glink_altmode: Print return value on error
  commit: 723d346173e748c4fdb145b84f572b871ab4011a

Best regards,
-- 
Bjorn Andersson 


Re: [PATCH] dt-bindings: arm: cpus: Add Qualcomm Kryo 465

2023-10-22 Thread Krzysztof Kozlowski
On 21/10/2023 09:16, David Wronek wrote:
> Add a compatible for the Qualcomm Kryo 465 found in SM7125.
> 
> Signed-off-by: David Wronek 
> ---
>  Documentation/devicetree/bindings/arm/cpus.yaml | 1 

Acked-by: Krzysztof Kozlowski 

Best regards,
Krzysztof



Re: (subset) [PATCH v2 0/2] Small updates / fixups for PMIC spmi-gpio

2023-10-22 Thread Bjorn Andersson


On Mon, 02 Oct 2023 09:00:10 +0200, Luca Weiss wrote:
> Update the schema to use plural _gpios label in the example. And fix a
> dtbs_check warning in pm7250b.dtsi.
> 
> 

Applied, thanks!

[2/2] arm64: dts: qcom: pm7250b: Use correct node name for gpios
  commit: 6cd8621758004d98f7c622c2d756c116c6888127

Best regards,
-- 
Bjorn Andersson 


Re: (subset) [PATCH v2 0/2] Add CCI support for SC7280

2023-10-22 Thread Bjorn Andersson


On Mon, 02 Oct 2023 08:55:29 +0200, Luca Weiss wrote:
> Add the dts nodes for the camera control interface found on the SC7280
> SoC. And then enable the CCI nodes in the Fairphone 5 dts.
> 
> 

Applied, thanks!

[2/2] arm64: dts: qcom: sc7280: Add Camera Control Interface busses
  commit: 0c149ca7653286496130e872f47a4b834348ea10

Best regards,
-- 
Bjorn Andersson 


Re: [PATCH 0/2] Small style fixes in msm8974.dtsi

2023-10-22 Thread Bjorn Andersson


On Tue, 27 Jun 2023 21:45:12 +0200, Luca Weiss wrote:
> While making sure the nodes are sorted correctly, I also noticed that
> some lines are wrongly indented. Fix both.
> 
> 

Applied, thanks!

[1/2] ARM: dts: qcom: msm8974: replace incorrect indentation in interconnect
  commit: 207f4ce365819ac68b634153d074252338d00ef6
[2/2] ARM: dts: qcom: msm8974: sort nodes by reg
  commit: 4960e06d386ecc5307bc2e66a77d5f06df1e2a6f

Best regards,
-- 
Bjorn Andersson 


Re: [PATCH v2 00/14] arm64: dts: qcom: msm8916/39: Enable sound and modem with QDSP6

2023-10-22 Thread Bjorn Andersson


On Tue, 03 Oct 2023 15:18:18 +0200, Stephan Gerhold wrote:
> Enable sound and modem on most of the MSM8916/MSM8939
> smartphones/tablets supported upstream by:
> 
>  - Adding the BAM-DMUX DT nodes to msm8939.dtsi for WWAN Internet
>  - Adding the QDSP6 DT nodes to both msm8916.dtsi and msm8939.dtsi.
>This is needed because audio must be routed through the QDSP6
>services provided by the modem firmware when the modem is active.
>  - Setting up the sound/codec related nodes for all the devices.
> 
> [...]

Applied, thanks!

[01/14] arm64: dts: qcom: msm8939: Add BAM-DMUX WWAN
commit: 32f963412a2d8cb65ff2737e6763f88ed15a2efb
[02/14] arm64: dts: qcom: msm8916: Add QDSP6
commit: 861aa8e6829cf2f1a9c5a52dd9cebc722cf7ca44
[03/14] arm64: dts: qcom: msm8939: Add QDSP6
commit: 0718ff7185cf42f8e817e39552feb9d6ed901aff
[04/14] arm64: dts: qcom: msm8916: Add common msm8916-modem-qdsp6.dtsi
commit: 8abbd235b2ecbfba0a445ccd400a54af8fd83bc2
[05/14] arm64: dts: qcom: msm8916-samsung-a2015: Add sound and modem
commit: f276411d0f8286c7ff3e1bd6917ea7ee61152d24
[06/14] arm64: dts: qcom: msm8916-samsung-serranove: Add sound and modem
commit: 6b66abd5858e025b2715b1efb193124dd7cc17c5
[07/14] arm64: dts: qcom: msm8916-wingtech-wt88047: Add sound and modem
commit: 5db767ae36255c0301ede64ee8993e0909efa73f
[08/14] arm64: dts: qcom: msm8916-alcatel-idol347: Add sound and modem
commit: 5d1cec28fd4d09e82e028903423829f59a033965
[09/14] arm64: dts: qcom: msm8916-asus-z00l: Add sound and modem
commit: 462cdffaa83df28d5fbd0c1771eaa85954114c77
[10/14] arm64: dts: qcom: msm8916-longcheer-l8150: Add sound and modem
commit: 1ab407193d38c775261d7beccd080e88f68c7243
[11/14] arm64: dts: qcom: msm8916-longcheer-l8910: Add sound and modem
commit: 2821c34a996b4a0991d33bead5caa84267e2dccd
[12/14] arm64: dts: qcom: msm8916-samsung-gt5: Add sound and modem
commit: 4f6b5edbcfbaa1061c29e6259cc5653f44b673da
[13/14] arm64: dts: qcom: msm8916-samsung-j5: Add sound and modem
commit: cf12268e1b632c6ac16185bd1230af6e1ca517fb
[14/14] arm64: dts: qcom: msm8939-samsung-a7: Add sound and modem
commit: dd5ab5d2ca722110c82459a571e367df7ee6d821

Best regards,
-- 
Bjorn Andersson 


Re: [PATCH 1/2] dt-bindings: arm: qcom: Add Huawei Honor 5X / GR5 (2016)

2023-10-22 Thread lukas walter
>> Acked-by: Krzysztof Kozlowski 
>
>How come this v1 has an ack?

This is supposed to be a v2, but I had problems sending it correctly,
sorry
https://patchwork.kernel.org/project/linux-arm-msm/patch/20230916134147.163764-1-lukas.wal...@aceart.de/


Re: [PATCH 1/2] dt-bindings: arm: qcom: Add Huawei Honor 5X / GR5 (2016)

2023-10-22 Thread Conor Dooley
On Sat, Oct 21, 2023 at 04:30:24PM +0200, Lukas Walter wrote:
> Add a compatible for Huawei Honor 5X / GR5 (2016).
> 
> Acked-by: Krzysztof Kozlowski 

How come this v1 has an ack?

> Signed-off-by: Lukas Walter 
> ---
>  Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml 
> b/Documentation/devicetree/bindings/arm/qcom.yaml
> index 7f80f48a0954..20d914b21847 100644
> --- a/Documentation/devicetree/bindings/arm/qcom.yaml
> +++ b/Documentation/devicetree/bindings/arm/qcom.yaml
> @@ -191,6 +191,7 @@ properties:
>  
>- items:
>- enum:
> +  - huawei,kiwi
>- longcheer,l9100
>- samsung,a7
>- sony,kanuti-tulip
> -- 
> 2.42.0
> 


signature.asc
Description: PGP signature