Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4062631ybl; Mon, 13 Jan 2020 07:15:02 -0800 (PST) X-Google-Smtp-Source: APXvYqzIyp++sKWCguqgbv3IAGFYFQKiC5XUdjG32hUjQkLcXlbf7SXfNtIn9vBPITRp7hn6Gdox X-Received: by 2002:aca:cdca:: with SMTP id d193mr13243050oig.152.1578928502843; Mon, 13 Jan 2020 07:15:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578928502; cv=none; d=google.com; s=arc-20160816; b=rPijQ/WPNvzAXYKBRGoPXhlvheQW6jjgLJT9qvE5Xq3tyJdlrkSkliPf3u98XnOfdu 3hwKIChcnorqYPv9Fw5joAhZCxTmM7wdtLVCSMORi/L10Bsm+v5PDJh+bxx4R8cJ6Ssf NThHnW6YckPXaqJyId0chYlOyPGUGtDODB26ImSE6oNyJy8Q1yTsReY47LfwFLbRTFx9 GbRoxNl6Wgk8R8WbRIkFSQ5P4wu6xDTNBFySRd/m7P2rmZrHx3omMNPMyAzld/crS9OT e7uIkPNntaYha1hlaLV6NyHYg9KFaH1tTlUkFA5oUBaKsa++98463yDlT39QN7U9fyHs 1g3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=XUsy3Xx6im0/AzwAFGXVHJxovtAc1+wGuYG2X25bh1g=; b=ghby0g/zNAqtusNJW6AoYvtgXmJ9QjfKphbMffSfSqVuEcFZzVKIiKr+xpz9mBOSgT iNzy4EXwQ2GaTb9Yy2lQIOx3WB/JSZP72lLjPrwSXjPCfVwf3AuMyHFSAsJk09q0PiZC DJ7rPN5LdrZ9DaEHnYKFaqMPUwBX4QKexakQtLQMnzclOHQ+R37nci5LJptNaGBTroil 7Q6KO2Fp6Jtnwdersx55W8dR0P6ZwnBteF4wPUel5wvRREFYyOJOeaDR9d8UwaHg7ueM BbA7lcRKw7eTptYig0auh4WWsug9/ntkSEfvsnKcZwy2xVTuzIN31J3+G0Y+PIPinvLz 90aA== 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 g2si6401421otn.117.2020.01.13.07.14.50; Mon, 13 Jan 2020 07:15:02 -0800 (PST) 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 S1729242AbgAMPNh (ORCPT + 99 others); Mon, 13 Jan 2020 10:13:37 -0500 Received: from foss.arm.com ([217.140.110.172]:40620 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728688AbgAMPNd (ORCPT ); Mon, 13 Jan 2020 10:13:33 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7625C11B3; Mon, 13 Jan 2020 07:13:32 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B01393F68E; Mon, 13 Jan 2020 07:13:30 -0800 (PST) Date: Mon, 13 Jan 2020 15:13:24 +0000 From: Sudeep Holla To: Rajan Vaja Cc: Jolly Shah , "ard.biesheuvel@linaro.org" , "mingo@kernel.org" , "gregkh@linuxfoundation.org" , "matt@codeblueprint.co.uk" , "hkallweit1@gmail.com" , "keescook@chromium.org" , "dmitry.torokhov@gmail.com" , Michal Simek , Sudeep Holla , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Tejas Patel Subject: Re: [PATCH 0/2] arch: arm64: xilinx: Make zynqmp_firmware driver optional Message-ID: <20200113151324.GA8647@bogus> References: <1578596764-29351-1-git-send-email-jolly.shah@xilinx.com> <20200110115415.GC39451@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 13, 2020 at 06:46:52AM +0000, Rajan Vaja wrote: > Hi Sudeep, > > Thanks for the reviewing patch. > > > -----Original Message----- > > From: Sudeep Holla > > Sent: 10 January 2020 05:24 PM > > To: Jolly Shah > > Cc: ard.biesheuvel@linaro.org; mingo@kernel.org; gregkh@linuxfoundation.org; > > matt@codeblueprint.co.uk; hkallweit1@gmail.com; keescook@chromium.org; > > dmitry.torokhov@gmail.com; Michal Simek ; Rajan Vaja > > ; linux-arm-kernel@lists.infradead.org; linux- > > kernel@vger.kernel.org; Sudeep Holla ; Tejas Patel > > > > Subject: Re: [PATCH 0/2] arch: arm64: xilinx: Make zynqmp_firmware driver > > optional > > > > EXTERNAL EMAIL > > > > On Thu, Jan 09, 2020 at 11:06:02AM -0800, Jolly Shah wrote: > > > From: Tejas Patel > > > > > > Zynqmp firmware driver requires firmware to be present in system. > > > Zynqmp firmware driver will crash if firmware is not present in system. > > > For example single arch QEMU, may not have firmware, with such setup > > > Linux booting fails. > > > > > > So make zynqmp_firmware driver as optional to disable it if user don't > > > have firmware in system. > > > > > > > Why can't it be detected runtime ? How do you handle single binary if you > > make this compile time option ? > [Rajan] There is PMU register which indicates if firmware is present or not, > but in case of single arch QEMU that register will not be available so > there is no way to detect if firmware is present or not from Linux. I am still not that convinced yet. > Linux firmware crashes while arm_smccc_smc() call for firmware, but before > this call there is no way to identify if firmware is present or not. So we > are just giving user an option if they want to use it on single arch So IIUC this platform used SMC as transport for EEMI communication. And PSCI will act as bypass and send the command to PMU. If so why can't platform PSCI implementation send error to OSPM if it is not implemented. > Platform they can disable firmware driver. > Not an option. With this enable, single binary should work fine on both QEMU and your platform with this EEMI firmware support. You need to find a way to detect it dynamically. -- Regards, Sudeep