Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp949609rwl; Fri, 31 Mar 2023 04:55:59 -0700 (PDT) X-Google-Smtp-Source: AKy350aIDS9sDfN6PnJg2rmfX2EhNHCpNPgmoYa4AGCMKMqudYrhdC3wTZzmI4pnbkhbsPYzD8ur X-Received: by 2002:aa7:86d1:0:b0:62d:e32a:8b5a with SMTP id h17-20020aa786d1000000b0062de32a8b5amr2320656pfo.2.1680263759171; Fri, 31 Mar 2023 04:55:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680263759; cv=none; d=google.com; s=arc-20160816; b=uG6y45s1nJqZClmWIWnJxcaZR2RQmwgnIdKARp0xgBo/wzxu+aK0zpykQKq1GAGpey ZepkoyloxuQ/T58zntx08NaOZbY4+tRCm5kF0Ia//cYx3n+KWAD89tlFCH65Q3mSp1e0 nUxRiC8UWxp7B/xPnwvlpHXbfPiM/Y54ssTMUoOE+ldi0LnTO6Zq3itKSWZduvzSp11A DL6yLeexUppvtE87eweXoCTqQ+e9qmR94bcm1KjEj1LJKeXSfnIzgHLLl7NdE1j35jLs 0nRamCv5SWw7JWgRPfxcxzhlWr545h50TYSRSYA0eFnnuqBU/bbRWacmwq1l4CY2tou5 /Tdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=fdDoiHJ+aeh9gHs55zobVq0QC/m/b1blbMUCwO2uAb0=; b=0xSRaem4Cir8FotZVVts2SowIS0QIazlcPAqIjwnK38mPHORfQeIwi6r6wtAO9okVv fVNdpjgaex2SmvwBXKYGRIOQ+8Q8d1pK8zVSw1Vu9GFv/rH0Jb2zaWDe3gtWUPdvZq7w 2hFBes88QbpWf6gZWGsGUAatNVXCnpG0WO0nmmZ5QuzNVE1UKUJvyLexhJQp3MNu864C O7wVYT9g2F53H9Nje3jquoqBVgwnxpRjRqMVeXuBJvqKoTJL4KSNSZ7yyaDohFnlm+bM PEn7FeTAw0yY2ukNb5OSXrS+28VyCjC1o9wpJXjRoDiRuaXuP0locsHfi1athQGzIDC7 JuoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Hdk2z7S5; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y1-20020a633201000000b0051344de5b95si2143060pgy.428.2023.03.31.04.55.45; Fri, 31 Mar 2023 04:55:59 -0700 (PDT) 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=@intel.com header.s=Intel header.b=Hdk2z7S5; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231423AbjCaLxp (ORCPT + 99 others); Fri, 31 Mar 2023 07:53:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230185AbjCaLxo (ORCPT ); Fri, 31 Mar 2023 07:53:44 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62F8510C1; Fri, 31 Mar 2023 04:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680263622; x=1711799622; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=TiD7kBj7hPUvnVmeWbsYTqnEqugIerIB3YPInRd7EuU=; b=Hdk2z7S5+YOfjDrqzd6kMDgEi6w8SzK0Ug9vbyUq4Gp3bshVodU31IjL OY5oVDsTiUhb2JZoDbYWRdqOodO4pNJOk4jupvfOzAQ2UQWP3cT6Lek+P a7zGSs06lldplWXHHSGRS1qFAEaBKQwHzk0EOyXxuHpFizz/o0c9CCuda DxXSykIKDveerMiRWSRNPu8DH8d/zIv3SxNv2GbjOwJqA1Xg0DYlo70rY bGZ4TzQiSvbeRv5AteasiVFfdsDcfA6ctmvzMAdHIGjc3GXyXGD/WlNLy mQDDD/E+Gpfc9Bf6IY2YfBTds96M1k+DQSUwWg7W1VIETtIi7TKzKidkY A==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="325398821" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="325398821" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2023 04:53:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="828681733" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="828681733" Received: from unknown (HELO [10.237.72.51]) ([10.237.72.51]) by fmsmga001.fm.intel.com with ESMTP; 31 Mar 2023 04:53:39 -0700 Message-ID: Date: Fri, 31 Mar 2023 14:53:38 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.9.0 Subject: Re: [PATCH v7 5/6] i2c: designware: Use PCI PSP driver for communication Content-Language: en-US To: Mario Limonciello , =?UTF-8?B?SmFuIETEhWJyb8Wb?= , Grzegorz Bernacki , Mark Hasemeyer , Andy Shevchenko , Mika Westerberg Cc: Felix Held , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230329220753.7741-1-mario.limonciello@amd.com> <20230329220753.7741-6-mario.limonciello@amd.com> From: Jarkko Nikula In-Reply-To: <20230329220753.7741-6-mario.limonciello@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 On 3/30/23 01:07, Mario Limonciello wrote: > Currently the PSP semaphore communication base address is discovered > by using an MSR that is not architecturally guaranteed for future > platforms. Also the mailbox that is utilized for communication with > the PSP may have other consumers in the kernel, so it's better to > make all communication go through a single driver. > > Signed-off-by: Mario Limonciello > --- > v6->v7: > * Also imply CRYPTO_DEV_CCP_DD to fix build errors > * Fix error message acquire/release inversion > v5->v6: > * Drop now unnecessary asm/msr.h header > * Fix IS_REACHABLE > * Drop tags > * Fix status code handling for Cezanne > v4->v5: > * Pick up tags > v3->v4: > * Pick up tags > v1->v2: > * Fix Kconfig to use imply > * Use IS_REACHABLE > --- > drivers/i2c/busses/Kconfig | 3 +- > drivers/i2c/busses/i2c-designware-amdpsp.c | 177 +++----------------- > drivers/i2c/busses/i2c-designware-core.h | 1 - > drivers/i2c/busses/i2c-designware-platdrv.c | 1 - > include/linux/psp-platform-access.h | 1 + > 5 files changed, 29 insertions(+), 154 deletions(-) > One note below in case there is a need to have another version of if you want. Not a show stopper for this. Acked-by: Jarkko Nikula > @@ -214,7 +95,7 @@ static int psp_send_i2c_req(enum psp_i2c_req_type i2c_req_type) > if (ret) { > dev_err(psp_i2c_dev, "Timed out waiting for PSP to %s I2C bus\n", > (i2c_req_type == PSP_I2C_REQ_ACQUIRE) ? > - "release" : "acquire"); > + "acquire" : "release"); > goto cleanup; > } > This looks like worth of being an own patch. Maybe even for the linux-stable. I think it's very useful to have an error message to show correct information what operation actually failed.