Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp257255rwb; Fri, 18 Nov 2022 00:38:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf5LQvphgvaD5EJp93xbQlDyIZw6lL73+uA0Gf2XgohaJBdRGGtNrErzd+PanwXWzj2dqW6d X-Received: by 2002:a63:1824:0:b0:46e:baf4:ab7a with SMTP id y36-20020a631824000000b0046ebaf4ab7amr6002810pgl.37.1668760726248; Fri, 18 Nov 2022 00:38:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668760726; cv=pass; d=google.com; s=arc-20160816; b=glqKeOhM6Qix7Iicrot9uQDWy7qCoQPWO5XzQ9/C5JQq/aE76I0EbFOyI9Z3MYdRt0 Ma0drHgPJ1TGLWDuFtk/LmA6ApRz5oLqESbhur7g/6sAguWWKlwbjeC70O79bjh54ITN tc6rBM9NXWBYDITu2QGtDPmPd1+UmILe1uYhyYK3jG1zkhvWn11iKlTuJYN62hvCOALM rocJHYcDhtmqmomfelrOE7Zx5Css7gna7rF4VKUopgO+fQItkY0yv4mc2DIP4PK5BAUr j2tR/9v/om8uCSefTyR+BNryhGcKO7uMnYz+Ldx/pez2lduqz2scwN8qSA3WG5vgJETZ XMZw== 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:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=Mrz2Hu8jyqfvR10pCEwwG44XSfuiGrIBT5O4gZOQuBM=; b=0i4qCOhtx+lzkhYV+BlD9YUk2agei59n4o0IzURzuON4xopdvDmMAie1+dmtevKBH3 DIWTmzJvE55rsZPxlPMLkPG+pMqty+VR9t955+xLALGX27s6VcKpqM3QvimPG1TNsDCo gdYWvcvERwCxsuuPSrs6W+2KnMMrH4YKF7QzMh4+6WI7BfUVnsKLy282zf4O7y6ptUcQ FvATw15PGCOZ6R9JzcFQ3aEdtxXky+1w/0QdGQPIUKW8cDMaHQAihWu/fw7UY5grX5xb ma57Ew2HQBBTrVvYlrAaNJTkkmDY7tVspsw7Fh9Lbcptg41aKOm0UpQ9rEuL8b+jbRT1 h3Vg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=gafECpnw; 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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 u20-20020a056a00099400b0056c7cc1f23fsi3221868pfg.132.2022.11.18.00.38.34; Fri, 18 Nov 2022 00:38:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=gafECpnw; 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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S241294AbiKRIBy (ORCPT + 90 others); Fri, 18 Nov 2022 03:01:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241056AbiKRIBv (ORCPT ); Fri, 18 Nov 2022 03:01:51 -0500 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2059.outbound.protection.outlook.com [40.107.212.59]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A03C611C05 for ; Fri, 18 Nov 2022 00:01:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dg04FOS0xEUJGA19iLFTY20+ex2fdrKKr4Ss5dDxtsyknZ/nmh1mBU+YAwFdW6zE40lT2tazrkieJVZDggJQwhjsvrAGqYdMV9hKQyIrbwll8gq9vdUOb/jtI/v1BoVjMvLuP0uofbXcsB4dhCODDi+lNnCMBTO15wZaq75bwwf2yCqyf0n4IAZYDPJtHG3e+FgsrMEz3ue9ViGfgxqQssDXB1v/bWyRixng4Evxab5DKxnNE6DJ6FdMUCL9eUHNARtNhqUgNASml4n8rpekcg8Gm7Wa2Odw81fM8mq8xHMpA9zLOMUmeSZB3P3NT+lq716iAYtQJZOZgg02fmL2Kw== 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=Mrz2Hu8jyqfvR10pCEwwG44XSfuiGrIBT5O4gZOQuBM=; b=IWpICiNgAJmqOink9nUrjb2SdvZp8ROElspV7v2XTyvYZwBvPV/4PLiHSrYmrDP7LcmqbkOIMFXt+UTG5pFWWzjlOYlx24yH1plaEDVMvenUuv7OI9jNCcpOWnBeins9c6MnJ6+Ul5YtYq3QApCNcxWoEnTS4PViY+gEhi0h77OOScnk4D+6kQB7I+mnVmq9Ys++N17L8uQS0svBb5rDDY0Qq3hM3Bz67SLAF56Nm92lc52W2HL2HnPVGMZmwszZrkpgHxF+uhErRBFFju11dBWtfX3keJi91wmqr1z+XHXeKcl8eZN3gYyQZU6uWxWam1yTNcBzUAV06hCoZiMPFQ== 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=Mrz2Hu8jyqfvR10pCEwwG44XSfuiGrIBT5O4gZOQuBM=; b=gafECpnwQndS3omUhPGWVVhTeGMBer5v/IQyvQQP+M5rZ3nXueXKKE5tEJwtXVwkUultmil4B2CUqlzzW8FBV9U4SzqDXWSIfUhn306s34MHenLK2nrTjvrucWfMNokg8X6X4llzgzy4vcvqHQ8t6O6+8YZmDKeMfXclZ/gL2KY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) by SA0PR12MB4512.namprd12.prod.outlook.com (2603:10b6:806:71::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.9; Fri, 18 Nov 2022 08:01:48 +0000 Received: from BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::7d43:3f30:4caf:7421]) by BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::7d43:3f30:4caf:7421%7]) with mapi id 15.20.5813.017; Fri, 18 Nov 2022 08:01:48 +0000 Message-ID: Date: Fri, 18 Nov 2022 09:01:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] drm/amdgpu: add mb for si Content-Language: en-US To: Zhenneng Li , Alex Deucher Cc: Xinhui.Pan@amd.com, David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20221118074810.380368-1-lizhenneng@kylinos.cn> From: =?UTF-8?Q?Christian_K=c3=b6nig?= In-Reply-To: <20221118074810.380368-1-lizhenneng@kylinos.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0182.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a4::17) To BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8PR12MB3587:EE_|SA0PR12MB4512:EE_ X-MS-Office365-Filtering-Correlation-Id: 8798576e-7372-4cb0-db23-08dac93b249f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u8K31cEpY7Ser3hFPTUENhbu3/7QJkmLJsaSO4WGhhrjyYymqGPVYUvKcg/XKV8eliKnyCUqMPuNmhqvZu0HjuDxLWP9lkIS6gMrSGB2NvAxsA2W+KKpwTg9tUBqx7e4I+rl9geyXxysFS8TdJ2LA4uY+jw2tMM11RxgXuGBqGhSXmtYSI52gq6SFiB7xNTSdvhPjtj1Etkh0L9gIE1woVjWpe/29ERbpSm4J3bD64WUKClJ8Orws2w+YeBSkk7GZpYrMtGqVpb532Iesfs5TA2u6QvTk42kX4ja74CJfnG00jWTZtd07Pi+S69OtJbNEPKxVFxn2YfVStWtpX7Le8VtNMQlsylnUzJJVP57VUF6/fycgj4FeSgwXNypHlx7sHhhdGbfRlUsig2CZFfluMbGur+ZWdVFhAoh0I3W/kDOcwNdGM61oSMwrOjxpcqHi01Z4LqZvg1h+F0ZmOAuh8eyydhDGStwhhrR1paTg5HZpQfmNpJ01SSitiX1L3XvRTPEOqTYzhsDEJVhGdrOfPytUuZecu5pNd4d+GF2Sip7rYZ2nr0jTPTK+AMvozXo4ouKp7N7s/WNnl1Ncsm8uO7OhLxbYy7slmdY+YJoybvLTwZsWQrpeesLF8OPTU3uMfmnqUTH5sDGCnEzoGabWkX6hBd2kPaZb11La0z71Mgi8+DeE2qQj90WOMOZOeMzj37e10zDQk1eMeCg83kWZtMPI8Z42aurlWegUnT65t0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR12MB3587.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(39860400002)(396003)(376002)(346002)(136003)(451199015)(6636002)(316002)(31696002)(6512007)(8676002)(38100700002)(4326008)(66476007)(66556008)(86362001)(66946007)(83380400001)(2906002)(36756003)(2616005)(41300700001)(5660300002)(186003)(8936002)(31686004)(478600001)(6486002)(6506007)(6666004)(54906003)(110136005)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WVo1VW94YkF1N1l6ZDljZ055dzFmMkMzNGV1Q2ljQWx6NHJ4QjVmWUFqK01j?= =?utf-8?B?QUxYZzREQ211bmt1Z3VLRVRXSlNNRGR2cSthZnNoeEJnb2dVSnhUaEZUb09X?= =?utf-8?B?KzZJbVhzZ1NlRjhHOGczMXp4NFk4cGkyVDZ5bERKaXpnZFRMNkt2REJtak5V?= =?utf-8?B?c2svZXJJT2t1N2VEeXJXdndHcHlLYW8rancrdWRrQ3B4bDEyWGJxV1g2cXY4?= =?utf-8?B?cVpaUWd5WHE4WkRmWnpUV2hNbjR4anE5YnVJVHIvV0lqNjNMeXRlSUJNRU1w?= =?utf-8?B?aUlmZTRKU0lZSnNjYUZmTVB2dDAxZHUxTFV6MG81SXVLL3lIOGxEUk1zbjhF?= =?utf-8?B?KzNuem5lTGpza3NyNjlCdWtsYzZycDdqYU1taXk4UHVTQ3FYTVRQY3JBaE85?= =?utf-8?B?ZUhxMlVCci8vd3lTWE9ldFc3NElkUFdvUXdSZld1amg5eU9iQi8zUGZwRzk2?= =?utf-8?B?R0UwLzNUMEVlVkJGVE5KLys1UW1CNVBFQkpLdlR6NElGWGxHV2dw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ant-AuthSource: BN8PR12MB3587.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2022 08:01:48.3243 (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: UGtT/rPP/p/X8V4sCVmhPns9uQRJsx9PR5m/RKwuEJsOWuNRRSDSjw/WViRzWx94 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4512 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham 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-kernel@vger.kernel.org Am 18.11.22 um 08:48 schrieb Zhenneng Li: > During reboot test on arm64 platform, it may failure on boot, > so add this mb in smc. > > The error message are as follows: > [ 6.996395][ 7] [ T295] [drm:amdgpu_device_ip_late_init [amdgpu]] *ERROR* > late_init of IP block failed -22 > [ 7.006919][ 7] [ T295] amdgpu 0000:04:00.0: amdgpu_device_ip_late_init failed > [ 7.014224][ 7] [ T295] amdgpu 0000:04:00.0: Fatal error during GPU init Memory barries are not supposed to be sprinkled around like this, you need to give a detailed explanation why this is necessary. Regards, Christian. > > Signed-off-by: Zhenneng Li > --- > drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c b/drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c > index 8f994ffa9cd1..c7656f22278d 100644 > --- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c > +++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c > @@ -155,6 +155,8 @@ bool amdgpu_si_is_smc_running(struct amdgpu_device *adev) > u32 rst = RREG32_SMC(SMC_SYSCON_RESET_CNTL); > u32 clk = RREG32_SMC(SMC_SYSCON_CLOCK_CNTL_0); > > + mb(); > + > if (!(rst & RST_REG) && !(clk & CK_DISABLE)) > return true; >