From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C52CBC433EF for ; Wed, 29 Jun 2022 14:17:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YOoGBieo4R8bMe4Qzus/ZE1V2piCEntEYfe3suA5ygM=; b=fjR1lSC89lySWA bZoGc8SjqT8Pyh8eRE7Xu5zUWIJRlbVzsqWA6rFWVSM/exnVm1kGOBilVGgaDIro1futOnCToMJUs JuJQ2ZD/K1tGiXcpevuV4VkSwHXC0bE5jiGYlqnI7/ndXCkeBOZrThtBnI+fDfj4to/z7k3rbnehY ohtEUy/D+IU82BfKYnWZqxkrQorP2OMuuu7S3ZA225E2e9UCJ7QSHAtemwa/satr1BYTz55AezaE8 3PMVISfIOX3M2CLCfFuu2mKN0KneDW9hyRuhRWMjLDjpiQySaUeFGJdHkKFT3jmjSLBho5egXDISq gJNiQRQsoXT7U6/ExWLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6YV1-00CS5h-BD; Wed, 29 Jun 2022 14:16:59 +0000 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6YUy-00CS1Y-Hk for kexec@lists.infradead.org; Wed, 29 Jun 2022 14:16:58 +0000 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25TEElIS003730; Wed, 29 Jun 2022 14:16:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=cHy38VAaYfwUL1rpWnFpkNYgiHgrJYl/KVo8ZW+UcrM=; b=eU8PvES2MDv1rWgeOGt4waBT2BpeTvMJzfYXZeu0jOhn7/f4QaXZIU2oCXg9Xh8yhMGd xFcCftfvts7SjW2abIhfNCae8fMezIYeEFpdxGR1Seqq38pNZprkr8WYcsC5lU1gmRyz B3pa63LIb0ErZv2drcuvX5QWWduVcSTM7j9qeU79TWgah5icw46NSrW6bPRhxE4Mipcz TWWgfaEGXt4pchopFzm5JBCH4T3rtGiXDKworScHTCsxUAtuSrwjpjdxJkcO4erLs6AG KwaIHbgOBMJBUCUwkSDtYbf3fvTb6eCyXyO3JbvmJZebCTv4uS2QGPezgMrrQDv2xo8O TQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3h0rb580v1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Jun 2022 14:16:41 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 25TEGfHl008991; Wed, 29 Jun 2022 14:16:41 GMT Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3h0rb580ut-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Jun 2022 14:16:41 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 25TE5xGh004496; Wed, 29 Jun 2022 14:16:40 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma03dal.us.ibm.com with ESMTP id 3gwt0aggdq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Jun 2022 14:16:40 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 25TEGcsd25821584 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 29 Jun 2022 14:16:38 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 982C1BE051; Wed, 29 Jun 2022 14:16:38 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 16305BE054; Wed, 29 Jun 2022 14:16:38 +0000 (GMT) Received: from [9.47.158.152] (unknown [9.47.158.152]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 29 Jun 2022 14:16:38 +0000 (GMT) Message-ID: <6e097ec9-0657-b920-89c5-cef3e95bd7ea@linux.ibm.com> Date: Wed, 29 Jun 2022 10:16:37 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v2 1/3] tpm: of: Move of-tree specific code from tpm driver into of driver Content-Language: en-US To: Jarkko Sakkinen Cc: Rob Herring , kexec@lists.infradead.org, devicetree@vger.kernel.org, linux-integrity@vger.kernel.org, nayna@linux.ibm.com, nasastry@in.ibm.com, Jason Gunthorpe , Frank Rowand References: <20220616154130.2052541-1-stefanb@linux.ibm.com> <20220616154130.2052541-2-stefanb@linux.ibm.com> <20220627224325.GB3082294-robh@kernel.org> <170c78f7-f0ba-c186-dacf-55759dae9b83@linux.ibm.com> From: Stefan Berger In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: tIUxx4YKQ9ejkBKzzE9b6Rri7pkvOR0z X-Proofpoint-GUID: _H4DtsbsPJ0mRAmXjonrw9KfRF1GT3s2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-06-29_17,2022-06-28_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 mlxscore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206290052 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220629_071656_644402_AA697B41 X-CRM114-Status: GOOD ( 25.88 ) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "kexec" Errors-To: kexec-bounces+kexec=archiver.kernel.org@lists.infradead.org On 6/28/22 22:45, Jarkko Sakkinen wrote: > On Tue, Jun 28, 2022 at 09:29:48AM -0400, Stefan Berger wrote: >> >> >> On 6/27/22 18:43, Rob Herring wrote: >>> On Thu, Jun 16, 2022 at 11:41:28AM -0400, Stefan Berger wrote: >>>> Simplify tpm_read_log_of() by moving Openfirmware-specific code into >>>> the Openfirmware driver to make the code reusable. Call the new >>> >>> There is no such 'Openfirmware driver'. >>> >>>> of_tpm_get_sml_parameters() function from the TPM Openfirmware driver. >>>> >>>> Signed-off-by: Stefan Berger >>>> Cc: Jarkko Sakkinen >>>> Cc: Jason Gunthorpe >>>> Cc: Rob Herring >>>> Cc: Frank Rowand >>>> --- >>>> drivers/char/tpm/eventlog/of.c | 31 +++++-------------------------- >>>> drivers/of/Makefile | 2 +- >>>> drivers/of/device_node.c | 27 +++++++++++++++++++++++++++ >>> >>> Humm, definitely the wrong direction. Generally, code for specific >>> bindings does not go in drivers/of/. There used to be some, but we've >>> moved it to the appropriate subsystems. kexec was an exception to not >>> have 2 copies of the same code in arch/. >> >> The function I am moving here is called by the TPM subsystem and also now by >> of/kexec.c. The latter is compiled under the following conditions: >> >> ifdef CONFIG_KEXEC_FILE >> ifdef CONFIG_OF_FLATTREE >> obj-y += kexec.o >> endif >> endif >> >> The code that current calls it is compiled under the following conditions: >> >> tpm-$(CONFIG_OF) += eventlog/of.o >> >> To make it available to both I could keep it in the TPM subsystem like this: >> >> obj-$(CONFIG_OF) = tpm_of.o >> >> >> Jarrko, if you read this, any comment? >> >> >> Stefan > > Why can't you convert of_tpm_get_sml_parameters() to inline function? I can do that and put it into include/linux/tpm.h. The only concern would have been the size of the function. Thanks, Stefan > > BR, Jarkko _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec