Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp417443rdh; Thu, 23 Nov 2023 07:24:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IEYnEXm+AepDFaoynnclESMGygkJhX4LJGgInqyRtCDGSKP7gUBIGakuemr7M8fTQ66lKJb X-Received: by 2002:a17:902:fb83:b0:1cf:59cb:d504 with SMTP id lg3-20020a170902fb8300b001cf59cbd504mr3777920plb.16.1700753083557; Thu, 23 Nov 2023 07:24:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700753083; cv=none; d=google.com; s=arc-20160816; b=gAT66GzwJN5RObLXGmYdqUVxZ6Q4YABEBnlSATEtljDbih50jHZX/9MBJGfDxFP+RM 4hh8cufL/mm7VyqoCSYyhlVtC7OefsJTce4ZnhaqneDzw9q52MY+7Tbnk1W0Op4JEF/g ChuNSaGIgFNxJba6uEybvAsrOZgPBgl60YhZHCmoxeSL7IOzpbta/gte3brMNwXeETqC 7PUCBM1eJ/s3cYn7WxabqflbyPsAzHXl36NpRLq/NmsjOXxCt8o5AYLc+eFaYgd6dIrP K1W+U9SU4min7hXdijBCR+Fv0SkogCGDnBnS+TmGFDOSSPnPEMVmdxO/hL/JoGmo2IoX zEoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=MwqqoPqi0fo1AkxEf5ljC9Mq+FRuerS4ex0RA9DHQ7w=; fh=mOqrdtzLxfRdhx+JUcCLIFZwj5ZpRA4B+MTwRGfrWMA=; b=v/RBir8jlOLjk+QtyzvdPt/w81CRT5OOfIwJp75HfEDBEHpDGJwBgjSPHaFtRR19Zq eqyRUbw15Bb6qTDLfZ2Uv+1j5K186BDgUnem+xvhmgSztTlekfV3YvwA1IaSHDRQnPJQ S0ZDflNc0wZ8HzDMHb5/Z7imkaHbcvtK2tRgwxGgUjIywZcsMe1TQn2qXn80VwhuENsi ysdN/TN8Yb2KL1Y5xJMk+Xn+gx6j5zeeJLQpag6qgkyJfWM7FvqT3rj/oPgXSd5oN2fo 7lPPDGr83rRcnQfX/a4Dfl/JqT5fWm0URObhjW6RpZPWJ7kXUhctWOyS5sqGPOYIeeoO zlsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DFDMxy4X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id j12-20020a170903028c00b001cf50ffd38dsi1334994plr.164.2023.11.23.07.24.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 07:24:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DFDMxy4X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 50B6B806D80B; Thu, 23 Nov 2023 07:24:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346079AbjKWPYX (ORCPT + 99 others); Thu, 23 Nov 2023 10:24:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346108AbjKWPYN (ORCPT ); Thu, 23 Nov 2023 10:24:13 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B721410C4; Thu, 23 Nov 2023 07:24:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700753060; x=1732289060; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=Gdj3IGAs2hjIQ1Amnl+R7syRNk6HRK2epPtT62bfX/8=; b=DFDMxy4XELpGl+FrKLJAc/7ovu8SNDauPIOg95NUlSszQEHmtdLzn/29 4Vvu4R8PlMU9gUjv24qs82wD3phBZUphGPxtOffczmnZPfglrS6QwFM91 MCyDVdFX48XiA/zatm/U13oHnKwQ+ej+ARlEnfdZNp/KMgUYc8x2xn0H0 sdSGVjEnUQXnFxvvV4O11RuO+7DPWzpCrfsekdmqeQ8IHYR77EGlZF+YY UaDkDMLNgHbTfw3wImBLcT8NPUov5uWnU5pCd08aU/sbHxRQ9BoExKE8s MO/Hjcc5/cIwaePKQN6gBcmQvPqsRitZm0nkMw+XQCSCWgOWiSigA8mNt g==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="13836876" X-IronPort-AV: E=Sophos;i="6.04,222,1695711600"; d="scan'208";a="13836876" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2023 07:24:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="833448254" X-IronPort-AV: E=Sophos;i="6.04,222,1695711600"; d="scan'208";a="833448254" Received: from mstrobel-mobl.ger.corp.intel.com ([10.252.40.70]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2023 07:24:17 -0800 Date: Thu, 23 Nov 2023 17:24:10 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: "David E. Box" cc: LKML , platform-driver-x86@vger.kernel.org, rajvi.jingar@linux.intel.com Subject: Re: [PATCH V5 06/20] platform/x86/intel/vsec: Add intel_vsec_register In-Reply-To: <20231123040355.82139-7-david.e.box@linux.intel.com> Message-ID: <7efeca6-6164-99e2-52d2-2b247d2698d4@linux.intel.com> References: <20231123040355.82139-1-david.e.box@linux.intel.com> <20231123040355.82139-7-david.e.box@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 23 Nov 2023 07:24:41 -0800 (PST) On Wed, 22 Nov 2023, David E. Box wrote: > From: Gayatri Kammela > > Add and export intel_vsec_register() to allow the registration of Intel > extended capabilities from other drivers. Add check to look for memory > conflicts before registering a new capability. Add a parent field to > intel_vsec_platform_info to allow specifying the parent device for > device managed cleanup. Please also explain here why the usual parent relationships are not enough in this case and you need to store it. > diff --git a/drivers/platform/x86/intel/vsec.h b/drivers/platform/x86/intel/vsec.h > index 8b9fad170503..bb8b6452df70 100644 > --- a/drivers/platform/x86/intel/vsec.h > +++ b/drivers/platform/x86/intel/vsec.h > @@ -69,6 +69,7 @@ enum intel_vsec_quirks { > > /* Platform specific data */ > struct intel_vsec_platform_info { > + struct device *parent; > struct intel_vsec_header **headers; > unsigned long caps; > unsigned long quirks; -- i.