Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp94167imm; Mon, 21 May 2018 02:53:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpPFt/E5JfOLwJoidLAqU8AGDjE9TIzuLkf5I216mGhOK1gxyFfqRG4ELovnyuzg3F/TQjk X-Received: by 2002:a65:5042:: with SMTP id k2-v6mr14981445pgo.122.1526896384141; Mon, 21 May 2018 02:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526896384; cv=none; d=google.com; s=arc-20160816; b=DO/eLMf/FTZx3Waiz7Y1dx3HcjDQKpZm51awHyIRH4Ui9DCo/W+LxVWQxwB17qb44U EeOREAFlwRp69129tYPMYPjqJgntkP/iiD3Jwky5eJigSmm+ACATNAss3rqOVQTTryu/ gAPM6WbCuHsFsz/bze12vCafln3HJkYoghAsQgFzfu0cylAkE67EF0hMLxul+XY9HFYp On7mVayrqr14LdEH+Rk/LdXh5Zkt2N6IQuvA3HbKG86UTu0FiFCWthMcixomXC1Fvj5o 659ggSgkn8Sg7nVe4MlrJYFfPWJE99xRNgZLUDsznR67x2fXaGSejSMRV1Nj9cyNUexK rAxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=vM5YnrTGZIY4jpCPhYI7kHYE0y5VaxnFaImiTeiZy/g=; b=un8vl7e92+Fo4z1wzCWzkiAx3qW2gAVBBL097ObeX33umy8lTdIY9YbfpQk6iYqKOV YqflYrNIqzUCHaI88+nwZ0v6t6dDBD+5wJIRaM22ztGtKXG+SJJrjqsOClal9k1XMkyG HSD/NEpIfh9zmnowYpJp1LmyH4dySdfxsAFKAYcWPBQvvO1LshTur5ninUvRUzMC9fK7 nK/s7nbRvVMiaSdtsjFdaMkmsmd6vzr/DPa4nbAV0pdM6tbBjTjBLhPzr5NxRI9vT2qD rj81YX61rXjPOvnrkMgi5zH5ac5hleB7K4vqc8FSaDkp0FVh2wP/riYTessHfjCWEDoi 01zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10-v6si2454711pgq.450.2018.05.21.02.52.49; Mon, 21 May 2018 02:53:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751178AbeEUJwZ (ORCPT + 99 others); Mon, 21 May 2018 05:52:25 -0400 Received: from foss.arm.com ([217.140.101.70]:45834 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750923AbeEUJwW (ORCPT ); Mon, 21 May 2018 05:52:22 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E9F4E1435; Mon, 21 May 2018 02:52:21 -0700 (PDT) Received: from [10.1.206.75] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E60793F25D; Mon, 21 May 2018 02:52:19 -0700 (PDT) Subject: Re: [PATCH v3 4/5] ARM: perf: Allow the use of the PMUv3 driver on 32bit ARM To: Vladimir Murzin , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Will Deacon , Mark Rutland , Russell King , Vince Weaver , Peter Zijlstra , Stefan Wahren , Eric Anholt , Florian Fainelli References: <20180518143913.26306-1-marc.zyngier@arm.com> <20180518143913.26306-5-marc.zyngier@arm.com> From: Marc Zyngier Organization: ARM Ltd Message-ID: <1a87b643-67ec-dce8-1f44-d831c8302afc@arm.com> Date: Mon, 21 May 2018 10:52:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/05/18 10:34, Vladimir Murzin wrote: > On 18/05/18 15:39, Marc Zyngier wrote: >> +static inline int read_pmuver(void) >> +{ >> + /* PMUVers is not a signed field */ >> + u32 dfr0 = read_cpuid_ext(CPUID_EXT_DFR0); >> + return (dfr0 >> 24) & 0xf; >> +} > > Should we rule out versions prior v3 here or in __armv8pmu_probe_pmu()? I'm in two minds about it: The ARM ARM is quite clear about the fact that this is not legal ("In any ARMv8 implementation the values 0001 and 0010 are not permitted."), and DT clearly lied to us in that case. If we want to consistently handle that case, it should probably be done in __armv8pmu_probe_pmu, bailing out if the version is our of scope for the driver. Thanks, M. -- Jazz is not dead. It just smells funny...