From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755394AbbCSRw6 (ORCPT ); Thu, 19 Mar 2015 13:52:58 -0400 Received: from service87.mimecast.com ([91.220.42.44]:37627 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752754AbbCSRw4 convert rfc822-to-8bit (ORCPT ); Thu, 19 Mar 2015 13:52:56 -0400 Message-ID: <550B0CF6.8070205@arm.com> Date: Thu, 19 Mar 2015 17:52:54 +0000 From: "Suzuki K. Poulose" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Sudeep Holla , Mark Rutland CC: "linux-arm-kernel@lists.infradead.org" , Nicolas Pitre , Bartlomiej Zolnierkiewicz , Kukjin Kim , Abhilash Kesavan , Arnd Bergmann , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Liviu Dudau , Lorenzo Pieralisi , Olof Johansson , Pawel Moll , Punit Agrawal , Will Deacon , Catalin Marinas Subject: Re: [UPDATED] [PATCH 3/5] arm-cci: Get rid of secure transactions for PMU driver References: <1426000735-14375-4-git-send-email-suzuki.poulose@arm.com> <1426585901-19137-1-git-send-email-suzuki.poulose@arm.com> <20150319173252.GC10153@leverpostej> <550B09A1.4020801@arm.com> In-Reply-To: <550B09A1.4020801@arm.com> X-OriginalArrivalTime: 19 Mar 2015 17:52:53.0921 (UTC) FILETIME=[86611110:01D0626D] X-MC-Unique: 115031917525400701 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/03/15 17:38, Sudeep Holla wrote: > > > On 19/03/15 17:32, Mark Rutland wrote: >> One more thing: >> >>> @@ -883,7 +894,11 @@ static inline const struct cci_pmu_model *get_cci_model(struct platform_device * >>> pdev->dev.of_node); >>> if (!match) >>> return NULL; >>> + if (match->data) >>> + return match->data; >>> >>> + dev_warn(&pdev->dev, "DEPRECATED compatible property," >>> + "requires secure access to CCI registers"); >>> return probe_cci_model(pdev); >>> } >> >> Before the probe, could we please have: >> >> if (!IS_ENABLED(CONFIG_ARM)) >> return -EINVAL; >> >> On arm64 we require a model-specific string, and we shouldn't go >> touching secure-only registers. >> > > IIUC platform_has_secure_cci_access always return false for ARM64 > preventing any secure access. No ? > Yes, you are right. The check has been abstracted away with the platform_has_secure_cci_access(). Cheers Suzuki