Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1097520rwb; Wed, 16 Nov 2022 12:02:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf42/TB6DMuvG9wcqx3JQJr/GvUOZh2QJa+9B3fEFuwZIjI+uWHChX63ycxTzvzbTCf0P3RG X-Received: by 2002:a50:ccc7:0:b0:467:cc91:903b with SMTP id b7-20020a50ccc7000000b00467cc91903bmr13618510edj.130.1668628942985; Wed, 16 Nov 2022 12:02:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668628942; cv=none; d=google.com; s=arc-20160816; b=v9U6q/xsyXvlrzsOPD/05JBCpCtnp+r941UkTmCpG836j7wgvcWpjxusPZ+uy4U9ij 7xofMjUO+vr2dmTGkkLLjCAoNMW0wZNcQ3wLIdYa9jO5ajkeuHIqGdHKy08mj7bHpbj0 8H+3xh2oRq0NymY7U4n6kUwzEwoGAkSIlvFa0WltIsapjFn9uRWc55aDDqNHWdFJ4hzU eXZeTVUDjqRMyEzGInWXjHt0e4zCe/Tyj+3ehlEDrGBAxPs80zqyp1pkinqEi0SFnHGQ I8d25fPliOmcwk4QFFTAz1KryG2p3oiYTP93MahHAKWnni3sSnRjzvykO8JZYjQp1LNj XbEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MSdPW6OrtrtBqmP5DI/tn3YS/Mof56eQgXuX0RIR0II=; b=weYg8jhCsfA07CND48dhVvlnLLgFUP1iA95rEE/8vrDp3V6Co2Lr1cnwwjaPFy3BO9 lumkLHT84M6nus3KN0IoqoRazddxMHpRgQtKyTPtorVk97aTYdOR8zbx8d39+u5AorsG 9UidedMDA7PWDbcPQZKyZ3CDVKhYUnpVxNlg2AAwoQ/Z60lzlW0EwQGrOQQtXwf1rEgK TWbRAfV3t6wy4e1eeI5c/bk4kg+dHVp3NoJkWIKf9T2iNL52ZWghVAtZEACzAdLaaJ2b eQqJ3qd9O+wdNfnl9aMsEuhL7J7PwI6z3eE/z4jhNKOtRBR7Rj2i2lCVrY+Nse+oPaca BBvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=AXwVzczv; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v14-20020a056402348e00b00461e63fe88fsi17705061edc.596.2022.11.16.12.01.49; Wed, 16 Nov 2022 12:02:22 -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=@alien8.de header.s=dkim header.b=AXwVzczv; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239286AbiKPSzZ (ORCPT + 90 others); Wed, 16 Nov 2022 13:55:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239294AbiKPSzB (ORCPT ); Wed, 16 Nov 2022 13:55:01 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEEAC63CFB; Wed, 16 Nov 2022 10:53:52 -0800 (PST) Received: from zn.tnic (p200300ea9733e74b329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e74b:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 927B01EC0138; Wed, 16 Nov 2022 19:53:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1668624831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=MSdPW6OrtrtBqmP5DI/tn3YS/Mof56eQgXuX0RIR0II=; b=AXwVzczv8jCLT57tq15qcizFkAwpVgR727jL/HviHxFKq2d/qJ9n6TUrxsFAxFyL+V2Tlw cyD09oGY1/TEQda3C/1nJ675FwSATONGyWGFg2MgFecZJWR9TqbCVK+K88AYsD4DWif8Ed 3080BBVVOSXzif9Y008DbeGWLQmmQyE= Date: Wed, 16 Nov 2022 19:53:48 +0100 From: Borislav Petkov To: Tony Luck Cc: Jithu Joseph , hdegoede@redhat.com, markgross@kernel.org, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, gregkh@linuxfoundation.org, ashok.raj@intel.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, patches@lists.linux.dev, ravi.v.shankar@intel.com, thiago.macieira@intel.com, athenas.jimenez.gonzalez@intel.com, sohil.mehta@intel.com Subject: Re: [PATCH v2 09/14] platform/x86/intel/ifs: Use generic microcode headers and functions Message-ID: References: <20221021203413.1220137-1-jithu.joseph@intel.com> <20221107225323.2733518-1-jithu.joseph@intel.com> <20221107225323.2733518-10-jithu.joseph@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,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 On Wed, Nov 16, 2022 at 09:26:19AM -0800, Tony Luck wrote: > But seems a bit hacky. Other ideas? Yeah, that looks not too optimal. How about you still allocate but at driver init time, ifs_init() or so? And deallocate it at driver removal so that its always present during the driver's lifetime and can be reused each time the sanity check is called. And you call ifs_load_firmware() under the ifs_sem so you already got sync too. Hmmm. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette