Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp263324pxv; Thu, 24 Jun 2021 07:26:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzB8D7XIHOaPVFJTJsCCGYzJsFGFEashe8pmSc8ez3bEYYVw4uQS8STVmdDRb+5rtwxEAVI X-Received: by 2002:a05:6402:411:: with SMTP id q17mr7474609edv.313.1624544764103; Thu, 24 Jun 2021 07:26:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624544764; cv=none; d=google.com; s=arc-20160816; b=AA+iCC1zwbA2tN7Y38Fs5nmLcUkbrSS4IiMoEVFdrEdTVFvtBlTij33Tpn+5As5pgQ DqowBlgionw5q5f4S84Dor4xidfTsrU1TlC5FKp1AbHlTNcrEz/pIThC+U8YhVL7/WBD t7U3vbChjZmLGqC67y6Mg7EhrEqkwhPAx4U2yIRnu+1TdBR11WlUdFlJXM3RLK+6jMqq 3PSCpA6BredSCWaM8/i+tkZXW0JRBfj9EZ4LrnQ/BAKFbvczrD7kDsJFacIos6jNjPob gma9mZCvECnLlvtlTMPzJncNBlPHluw1k7qvDWkyD7pxCfYPml56YTZqZA/lr2gH4ELZ mUCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=Pr/OjWTHMPfux+8aIFrYQ5reXJW+XcmE2cD26ExuwsM=; b=lp5AfJw1uHl0gkoTy7Rh3TrsFCN/bXMoa9feWoopqWfcvlGBZya8dFEISenTMpJ0ZS QS5JtMStX0YfwvnodCtwY+27aWw6fgdw1lOntDpmwHHViBs2AvbWL14Qzyr0wLTqqjEt fbnQSo25refZS94g31vpjzu6jBFeO2GEBuZK5bOk8UlVDGU7irTYi/5NPGH3SiiOphY6 j9NSVErg6yd+t2cArqRnTo42TvIrw7SrmSY+gR4NzsPIghjoPB2EBT5igvxiXhcazSEh tUjxZJMizFav5jJZ1kzb9guAYbUgV/Mf66mJ9iEEZk9lv566l1DtuLaxGqI4KDe02srF G37A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ci16si2895237ejc.295.2021.06.24.07.25.40; Thu, 24 Jun 2021 07:26:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231608AbhFXO0x (ORCPT + 99 others); Thu, 24 Jun 2021 10:26:53 -0400 Received: from mga06.intel.com ([134.134.136.31]:63560 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231169AbhFXO0x (ORCPT ); Thu, 24 Jun 2021 10:26:53 -0400 IronPort-SDR: sx3gDlPaGyxQVXu5wl5Wg9ljHfvZ4YjhouzZQsw3/n+QR2OjBAiiPYHDyWYxyxyDzrXcl6sbWv ZCjPIPXZOr8Q== X-IronPort-AV: E=McAfee;i="6200,9189,10024"; a="268610469" X-IronPort-AV: E=Sophos;i="5.83,296,1616482800"; d="scan'208";a="268610469" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2021 07:24:32 -0700 IronPort-SDR: BOnw6q+YprfzkrA2H+5wpuIJTQg4qNnIwCFqowTlQr/HHbE5TZVmu34xNxggsbicRGF9FCF+mj hNgl81uOb/hg== X-IronPort-AV: E=Sophos;i="5.83,296,1616482800"; d="scan'208";a="406658358" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.74.185]) ([10.209.74.185]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2021 07:24:32 -0700 Subject: Re: [PATCH 2/7] perf: Create a symlink for a PMU To: Greg KH , kan.liang@linux.intel.com Cc: peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org, eranian@google.com, namhyung@kernel.org, acme@kernel.org, jolsa@redhat.com References: <1624497729-158864-1-git-send-email-kan.liang@linux.intel.com> <1624497729-158864-3-git-send-email-kan.liang@linux.intel.com> From: Andi Kleen Message-ID: Date: Thu, 24 Jun 2021 07:24:31 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > But first off, why is this symlink suddenly needed? What is so special > about this new hardware that it breaks the existing model? The driver can be in two modes: - Driver fully knows the hardware and puts in the correct Linux names - Driver doesn't know the hardware but is in a fallback mode where it only looks at a discovery table. There we don't have the correct names, just an numeric identifier for the different hardware sub components. In the later mode the numeric identifier is used in sysfs, in the former case the full Linux name. But we want to keep some degree of Linux user space compatibility between the two, that is why the full mode creates a symlink from the "numeric" name. This way the (ugly) identifiers needed for the fallback mode work everywhere. -Andi