From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2C90C433FF for ; Tue, 13 Aug 2019 11:40:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C543920840 for ; Tue, 13 Aug 2019 11:40:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PjUp0F+M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C543920840 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=et34/rGMCNKjvUAIDDr3TfUS2Ong3PmfMBJGYsY8duU=; b=PjUp0F+MQji/ZH 3fqNd0hbB9v1BkAH0d7aON55+m1oWLnv4kFax4WKLST0JCIXU7zaSnGfUeIdKZ8KFaE9HB7mkoriM Oh5ZdJHYCv3mkrxC3Q12w5fAjbBd/x1rLFKvWO0rRXiertNFgjw2sv9CZSeYK4ngAs0FZKNR+I3Ig RbQPlQe6PGUzrakSYENCFYSUVMzwCnAk4J0BLwZW4Za51OHmZ8rYsHQeQD4mHtmVW/rwZCg5qVM1m Eb+hfZ319xmE/yi8AnhUvve+3B2jJY8dkhZ5SQNVnA9IZUOX5ICKTYxBszltZza/9K/LcgoLLMouK tMiII12gkqP6XFS1LqDQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hxVAN-0005TS-66; Tue, 13 Aug 2019 11:40:39 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hxV84-0001n6-Uj for linux-arm-kernel@lists.infradead.org; Tue, 13 Aug 2019 11:38:18 +0000 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 4D50A344; Tue, 13 Aug 2019 04:38:16 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E7E2C3F694; Tue, 13 Aug 2019 04:38:14 -0700 (PDT) Date: Tue, 13 Aug 2019 12:38:12 +0100 From: Dave Martin To: Mark Rutland Subject: Re: [PATCHv3 1/6] arm/arm64: smccc/psci: add arm_smccc_1_1_get_conduit() Message-ID: <20190813113812.GW10425@arm.com> References: <20190809132245.43505-1-mark.rutland@arm.com> <20190809132245.43505-2-mark.rutland@arm.com> <20190812150326.GT10425@arm.com> <20190812150634.GB52896@lakrids.cambridge.arm.com> <20190812151043.GU10425@arm.com> <20190812152649.GC52896@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190812152649.GC52896@lakrids.cambridge.arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190813_043817_255751_913CB6DA X-CRM114-Status: GOOD ( 17.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lorenzo.pieralisi@arm.com, suzuki.poulose@arm.com, marc.zyngier@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, linux@armlinux.org.uk, james.morse@arm.com, robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Aug 12, 2019 at 04:26:49PM +0100, Mark Rutland wrote: > On Mon, Aug 12, 2019 at 04:10:43PM +0100, Dave Martin wrote: > > On Mon, Aug 12, 2019 at 04:06:35PM +0100, Mark Rutland wrote: > > > On Mon, Aug 12, 2019 at 04:03:29PM +0100, Dave Martin wrote: > > > > On Fri, Aug 09, 2019 at 02:22:40PM +0100, Mark Rutland wrote: > > > > > diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h > > > > > index 080012a6f025..df01a8579034 100644 > > > > > --- a/include/linux/arm-smccc.h > > > > > +++ b/include/linux/arm-smccc.h > > > > > @@ -80,6 +80,22 @@ > > > > > > > > > > #include > > > > > #include > > > > > + > > > > > +enum arm_smccc_conduit { > > > > > + SMCCC_CONDUIT_NONE, > > > > > > > > If this is intended to have the value 0, is it worth making that > > > > explicit? I can never remember whether enums start at 1 or 0 by > > > > default... > > > > > > They start at 0. I intend that checks are done explicitly against an > > > enum value, so I'm not sure that matters. > > > > Not really. > > > > It depends whether code like if (!arm_smccc_1_1_get_conduit()) { ... } > > is considered sane or not. > > > > If we don't think people should be doing this, omitting the explicit > > value specifier seems fine. > > My expectation was that they'd check explicitly against > SMCCC_CONDUIT_NONE, since all of the existing callers care about the > specific conduit for other reasons (e.g. patching). > > I also expect to wrap this in a sbusequent patch that provides helpers: > > * arm_smccc_1_1_available() > * arm_smccc_1_1_call(...) > > ... for the cases where we just want to make a call and don't care about > the specific conduit. Seems reasonable. Cheers ---Dave _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel