On Thu, Jul 16, 2020 at 10:04:20PM +1000, Herbert Xu wrote: > On Thu, Jul 16, 2020 at 11:21:36AM +0200, Sven Auhagen wrote: > > > > You are correct, let me have a look at how to get the cpu bit correctly. > > Well everything runs on the first CPU now, what do you do if that does down or up? > > I think there is no mechanism in general at the moment for the current or my implementation. > > Unless the driver changed it the default affinity should be all > CPUs, no? In which case if the first CPU goes down it'll just move > to the second CPU. Alright, that makes sense, thank you. As I said in my second email yesterday, it is just a hint and not binding. I run some tests and here is what happens when I disable CPU3 on my 4 Core MCBin: [641628.819934] crypto-safexcel f2800000.crypto: EIP197:241(0,1,4,4)-HIA:230(2,6,6),PE:133/332,alg:7ffdf000 [641628.823954] crypto-safexcel f2800000.crypto: TRC init: 15360d,80a (48r,256h) [641628.825326] crypto-safexcel f2800000.crypto: firmware: direct-loading firmware inside-secure/eip197b/ifpp.bin [641628.825693] crypto-safexcel f2800000.crypto: firmware: direct-loading firmware inside-secure/eip197b/ipue.bin [641629.033302] alg: No test for authenc(hmac(sha224),cbc(aes)) (safexcel-authenc-hmac-sha224-cbc-aes) [641629.044442] alg: No test for authenc(hmac(sha384),cbc(aes)) (safexcel-authenc-hmac-sha384-cbc-aes) [641629.057356] alg: No test for authenc(hmac(sha224),rfc3686(ctr(aes))) (safexcel-authenc-hmac-sha224-ctr-aes) [641698.795895] IRQ 38: no longer affine to CPU3 [641698.795917] IRQ 54: no longer affine to CPU3 [641698.795928] IRQ 59: no longer affine to CPU3 [641698.795942] IRQ69: set affinity failed(-22). [641698.795950] IRQ70: set affinity failed(-22). [641698.795959] IRQ73: set affinity failed(-22). [641698.795969] IRQ 77: no longer affine to CPU3 [641698.796131] CPU3: shutdown [641698.796156] psci: CPU3 killed (polled 0 ms) 74: 1363 0 0 ICU-NSR 88 Level f2800000.crypto 75: 0 1772 0 ICU-NSR 89 Level f2800000.crypto 76: 0 0 1427 ICU-NSR 90 Level f2800000.crypto 77: 0 0 0 ICU-NSR 91 Level f2800000.crypto IRQ 77 was bound to CPU3 via the hint is no longer affine now and actually bound to CPU0. When I disable CPU1 and CPU3 and load the module I get: 74: 4089 0 ICU-NSR 88 Level f2800000.crypto 75: 1772 0 ICU-NSR 89 Level f2800000.crypto 76: 1427 2854 ICU-NSR 90 Level f2800000.crypto 77: 2824 0 ICU-NSR 91 Level f2800000.crypto where you can see that the affinity hint is ignored for CPU1 which is selected because of number of cpus online is 2 now. Does that answer your question? Best Sven > > Cheers, > -- > Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> > Home Page: https://eur03.safelinks.protection.outlook.com/?url=http:%2F%2Fgondor.apana.org.au%2F~herbert%2F&data=02%7C01%7Csven.auhagen%40voleatech.de%7C0790b23c7a61493c8bfe08d82980621d%7Cb82a99f679814a7295344d35298f847b%7C0%7C1%7C637304978692090806&sdata=QZUqtMuwN8vOxUK1tjFiENuwPD6gIxHpTvntLdbqTqg%3D&reserved=0 > PGP Key: https://eur03.safelinks.protection.outlook.com/?url=http:%2F%2Fgondor.apana.org.au%2F~herbert%2Fpubkey.txt&data=02%7C01%7Csven.auhagen%40voleatech.de%7C0790b23c7a61493c8bfe08d82980621d%7Cb82a99f679814a7295344d35298f847b%7C0%7C1%7C637304978692090806&sdata=Z3GYc1YWWeenCLYZUKXxzwWDQnrmvEuBHStIcPFcOp0%3D&reserved=0