Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4895474rwd; Tue, 23 May 2023 14:27:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7DJogse2Yj9He4tCez/yICc8LN3NKnXynorNq8IUXtVmAPpstsRfkMak2uSHcdhIm2mhwF X-Received: by 2002:a05:6a20:8e07:b0:104:62a9:9006 with SMTP id y7-20020a056a208e0700b0010462a99006mr18926754pzj.36.1684877272693; Tue, 23 May 2023 14:27:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684877272; cv=pass; d=google.com; s=arc-20160816; b=MVdwrQIwYdmFfymQlUCM7VpDJyjhBYOZ4/UmhDYExkxQmRKeFB03w+r563xpllALjj l+FkCp/AS7k/ke4QAyMVMW85c82k3799/YYJ3223nG4TXlfBH/UHtT4bXh5YSGRCB3NJ nsdg8UI/xcgXJeCY3GmBtzj9SaF8mkdn6OYPRBuu4RVRYCcp5+1OSrogwBmWJ08nsnFn PSAqICzt8B1sf075MQE7tFYLqZqqjT/UBWV5A7/RAZUhT4A4ENNrpvuQB8xHi8AW0iMz z2ZBfZIwdJAPTXeGcHW6ldwTX6v7eoBJvSN+5MuLsS9vVLYFnsd1v4OK3CxYDEclIvbz Mo7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:content-language:references:cc:to:subject :user-agent:date:message-id:dkim-signature; bh=MXZ6ljlI+9kv2vWomvcXOkRsxwfiP0gmRlaZiXjPj+E=; b=yY48VFNXPXuhKG/7+2cJyEOYJcMuD+jcpSq2VGfTTRZR/ga2/wXPcSZMV/ZPuTfqxT eQA6CIcTh7HTtEZHY2vkemjrxklRK0o1KdM6rbZzd7Ig3i3E34nj9FZNUZ/lnPUimiwU CYWbzWgrdndQ7VkeLiKJ4gznVRs5xPuhXMkdc4szFzhCJbm/WIdreJ0LiXE8QhBTegUE G3zKoDOeJkedeKPztRV/jqoU5NI5LqBtgJrafgJbAp2ScSXvVirFFsSYJLnZrNKPBAlh pNTubNdsiF//pESZkl1l7ihSEXO8wDOGgA40rC48VLcdvVOGbiMSiGPVM8uwbRzNrNQo Jhhw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="3/5Ky9vV"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y186-20020a638ac3000000b0053f0bfcd4fasi18072pgd.173.2023.05.23.14.27.28; Tue, 23 May 2023 14:27:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="3/5Ky9vV"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238434AbjEWVVr (ORCPT + 99 others); Tue, 23 May 2023 17:21:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238468AbjEWVVq (ORCPT ); Tue, 23 May 2023 17:21:46 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2075.outbound.protection.outlook.com [40.107.93.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0069111A; Tue, 23 May 2023 14:21:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lC7wDwmFvNldPqST658nLww2GG6e5/ragGRjpDnukjeN4ZrW7iDSoQufRYW92ST5r45X50YA49f2ItnZ5MzPy+q5vi0fg2FNKnBl87l4qObGhAtfLQg2fr92ETTgm7nLeOJ2BMJBKTKLA0U5L+FZ5MjO2O37IZAy1MyaIqXyZwWlXwwKWew7Ky7xsT+0Bw4QK1i0+2ilTT/78D3afNTTZpdKXtbBwssZkvFxVyU26XLqPGns/38xW3TV/He0CBkLPSI1MAnJSaH1ujV4+WHkdErUvo/3/WTVzegZEded6+k/ur7We2GVvc8G3UiG67WsqgQ3IA/3KzGIuAKLWxlC7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MXZ6ljlI+9kv2vWomvcXOkRsxwfiP0gmRlaZiXjPj+E=; b=d8+9gZXjDnXhhe6fGfZwa7nz6A6oyVE7DLrRGJs1pEhxIf2v82fDuDentc3ra2Oik0V4AmGwN0yTsfHWSH7fUafXHGPqLThsJ1mqni3Q/aUC6f4iJQiNvC1uKVuRQH+KH+TelAUXdd7IDuTG6TejTEpqHYhwUi1Ax7baGyoBmIGVidcmdxZInZkWRrpoToQZLtxj2w72hcRBDIM7EmUEaPG0lIQXco482GndopRd4fBfPcDGUA5tszNu2NPKSi8nWzuC7tvVCu1iJtm11SAFxA6alozH2BeOftxlzZtknVlpSuY6t0XsTDKsagDe0b3J6/aCIxWO+q6F7FBxSasB1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MXZ6ljlI+9kv2vWomvcXOkRsxwfiP0gmRlaZiXjPj+E=; b=3/5Ky9vVzbdFn0PsGs9ys0lEAevG1SbSXTVLQr96zq28mmMwZ5Jf97Q7HhrRu/2j7z1+YDllYfB1Ut02rpgf4HoOA/aMCkumJFtbDnNJObQdz6YjHW+c+YPPNd6xJXxUI3ukCBA3kc3n8eKNLh2k7C8jUqqtD+1nHtjILgyxyWM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BL1PR12MB5221.namprd12.prod.outlook.com (2603:10b6:208:30b::9) by BL0PR12MB4947.namprd12.prod.outlook.com (2603:10b6:208:17d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.29; Tue, 23 May 2023 21:21:34 +0000 Received: from BL1PR12MB5221.namprd12.prod.outlook.com ([fe80::3409:b766:c6ed:2518]) by BL1PR12MB5221.namprd12.prod.outlook.com ([fe80::3409:b766:c6ed:2518%7]) with mapi id 15.20.6411.029; Tue, 23 May 2023 21:21:34 +0000 Message-ID: <1eb283a5-4b4d-216e-0c02-413c94ae9eb5@amd.com> Date: Tue, 23 May 2023 16:21:31 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v3 04/10] crypto: ccp: move setting PSP master to earlier in the init To: Mario Limonciello , Herbert Xu , "David S . Miller" Cc: John Allen , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230519032448.94279-1-mario.limonciello@amd.com> <20230519032448.94279-5-mario.limonciello@amd.com> Content-Language: en-US From: Tom Lendacky In-Reply-To: <20230519032448.94279-5-mario.limonciello@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SN7PR04CA0193.namprd04.prod.outlook.com (2603:10b6:806:126::18) To BL1PR12MB5221.namprd12.prod.outlook.com (2603:10b6:208:30b::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR12MB5221:EE_|BL0PR12MB4947:EE_ X-MS-Office365-Filtering-Correlation-Id: 9de410ce-6596-4c33-e304-08db5bd3af29 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sCOs3OJ+6lOjtbjfG5/ab5EPO4AtpMATG0ov6ikhnkgwLImUyVApk8bDC9LqJF/2kWR7pod11JluvVePsiwQxvG8fnghpQ7JPVSdqApX2OUnEqYw92KsSWhLR1fYdf+yC1b7ZGmDxd5VNBuf4Up5JmttaWORcBI3FQ+z27LmvWYzV4ONHI4XWaIg3GSZhYYQVHEWc0KSs5cMuiad8CQwbsFSQ+p6ucaHtwAMKXeqkNWaIViFCxTmKYlrXnJHkjw5lsRAlae0569hgbe2CBKzN2wdpuTJRU2cQoFnrKbEmaXzGNGDaGL+KwgXE0nXpe3ToPAkHMb9JIR9t6f+VbJNDQfY3bitM6qzno8xllNRMYF6G1tAHQnOc29NCeTYEaeuv+jwF+dgst609B4bsmGEvrVVBYjsFqePP0FCDTpZA0G0xh1dhbUIJguUk6KESV3SjREvbXibEu8WVEVRrTqTo0uDjPmYvAx3/rMoCjBu1x9ugKiXhSbe8nRBYCinoyEpqXkMWbQ9u6SdWG4stILEap3cHLaZtI6YXfgS4K+6aue94Nnim1sffmklDILL5i04Jyy8S3QJRBs5nrLqR3GUuuY3OYeW4y4cSkprB/KIFv4ImmlTkSyiyJBEvEbnGk5JG7sSi5XGzdf1cM+cN4dZvQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL1PR12MB5221.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(376002)(39860400002)(346002)(136003)(366004)(451199021)(478600001)(66476007)(66946007)(66556008)(4326008)(31686004)(31696002)(6486002)(110136005)(41300700001)(6666004)(316002)(5660300002)(8936002)(8676002)(86362001)(38100700002)(26005)(6506007)(6512007)(186003)(53546011)(83380400001)(2906002)(2616005)(36756003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UWxOVkRXRTFWSSthd0lwRmJEdkhHc1huNWVNUU5Nc3laR3FzMCtjZCs5b1JV?= =?utf-8?B?MTNvcDlOMWJYa3JreHF6RGozRjhUd2hqNENieEV0cXRRS3R5YmYzOFdZazV3?= =?utf-8?B?eWdIMlh5YmtjNnpsTTRjRWxHdkdpKyttRGZsUEdOeFRIZ0hDbndrcjdGTmx4?= =?utf-8?B?bjEwMlZGNVFOZXA0aERaUWpuWng5dGNaTzJ2RHgvWWxGVmdCQUZpdktaUzB0?= =?utf-8?B?MjZvQnc1Y3FwNXR5VVJobytJc0VuaTFMNEEwb3FOREdKTVRUWHY0cTV1eW96?= =?utf-8?B?akJ1NG0rRlNjMkJOSnBCMkVucUF3Wm80ZWRnY1U2Q0xOV05tWk02WnRFemo0?= =?utf-8?B?RFdSTGQxY0pLcHhzQ3R2MGVjOVJyT3NWSGxpUW8yUU1jYVplbldNS0U2bjgr?= =?utf-8?B?UFQ2UTg0MGo3Mm9NZW1OS21sNU5HeUFKcndMaFJrcnE0WUt4Zk45MXNMS1N5?= =?utf-8?B?d2ZOek1ZUW1IZ3pXOGdHaWY1Y200YkFSSkg0b3RIalFPNFBMeFRHWUxFeSt4?= =?utf-8?B?TXhjRGREa3p0RE9MVmdPZXptaE5NR01GVUZzWXhsNm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4VjdqV2hGRnRJL2MrKzYybm1ESjJxWDIvMk4z?= =?utf-8?B?L2RVS0FuZVBxY01xZng5TCtaQkNJYlE1WTdLV2RBSklKTlA0UjJHVUhJQ2sz?= =?utf-8?B?Qkcza1h6MUQ0eloxeDRMZ3diY1BwbVg5U3h2dTZCbm9UaGpnMXlRYjJCV1dZ?= =?utf-8?B?Q1ZKSkk3Zm9YWGFIQUtyRVBJMWVRQXRuaWhXcGkxbXNmQk8wQVV2VWhuM3dN?= =?utf-8?B?MWZGcklYQkxBcU9uMURZczdkd3dQdVVNM2VWZmNKSGVPVHdDb25hMUVLekNK?= =?utf-8?B?Y0dqR2xsanpDRXJGSDN1WVVHYmV4Q1dWT1MxbkZxU1FFWEgwRXpnT1R3ellx?= =?utf-8?B?a1FwWDNjelFJWTBQeDdLTFJabTFlalk4WjZaZ3VKTXFEcENvbTIvMTdKblVG?= =?utf-8?B?NGpmeW85aGVUTnpxOUl4QlBaK1FScy9YK2Z1K2s1Nk1NcU5hcEIreHFjY0JB?= =?utf-8?B?dExXL056ODBONndHWGdBSGdER0tIWkpaSzFwQ1NKTnhpaVJFNTFlOEZlTlcx?= =?utf-8?B?R0dVeXNqc1psS3lmdXZyLzdsaGVHcGFOK2VvaFp4TlVueVpMSnRpZkU3blZU?= =?utf-8?B?U2ZadFRycU4wc1k0NXVQaEtwS0EyN0RBVXY5SVZrdzU3ZnJxVFIyZ1Iyd01n?= =?utf-8?Q?iPgbnpgCzCbkepVXhQINUqWx1?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9de410ce-6596-4c33-e304-08db5bd3af29 X-MS-Exchange-CrossTenant-AuthSource: BL1PR12MB5221.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 21:21:34.1059 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: czzGGa75N341lDBReemLjqeNw+an72ubUUVZk2FsZ40sBICefvd0MSRYB4dOrvInN9aCzbDO2inKVJ0na503CA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4947 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 5/18/23 22:24, Mario Limonciello wrote: > Dynamic boost control needs to use platform access symbols > that look for the PSP master as part of initialization. > > So move the PSP master before psp_init() so that dynamic boost > control can be initialized properly. > > Signed-off-by: Mario Limonciello Reviewed-by: Tom Lendacky > --- > v2->v3: > * Clean up master device if psp_init() failed > --- > drivers/crypto/ccp/psp-dev.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-dev.c > index e3d6955d3265..3390f0bd6408 100644 > --- a/drivers/crypto/ccp/psp-dev.c > +++ b/drivers/crypto/ccp/psp-dev.c > @@ -173,13 +173,14 @@ int psp_dev_init(struct sp_device *sp) > goto e_err; > } > > + /* master device must be set for platform access */ > + if (psp->sp->set_psp_master_device) > + psp->sp->set_psp_master_device(psp->sp); > + > ret = psp_init(psp); > if (ret) > goto e_irq; > > - if (sp->set_psp_master_device) > - sp->set_psp_master_device(sp); > - > /* Enable interrupt */ > iowrite32(-1, psp->io_regs + psp->vdata->inten_reg); > > @@ -188,6 +189,9 @@ int psp_dev_init(struct sp_device *sp) > return 0; > > e_irq: > + if (sp->clear_psp_master_device) > + sp->clear_psp_master_device(sp); > + > sp_free_psp_irq(psp->sp, psp); > e_err: > sp->psp_data = NULL;