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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, USER_AGENT_MUTT autolearn=unavailable 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 86967C43381 for ; Thu, 28 Mar 2019 06:52:49 +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 541DC2075E for ; Thu, 28 Mar 2019 06:52:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mZIcbDjr"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="M8mKNe9y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 541DC2075E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org 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=2qmYD87Zux1vmOaFoRb65kgCjCFd16S8Mhn0AajWCxE=; b=mZIcbDjrwoLPo1 M4ETKvpD7cc/DMAqCTD8kmSAfrndmzUO52jo2XF5Hm378iBAMYYCkwuxeJVLPe4hD5QnScWmfM/b5 mfk27r9zD0/u0oRP7XRU3VkjtO6xdbfpZSfPm/1KXi8wtxTrGHq0T3QJZy/W+BrYanh6kf3nkHGES jR2FXGPA2RzdieqEaFNkzJ9ledSufzdF3wPZOfo0tdBeoDwDEobnbc5WHwVoNU0l/wNoQ48OjIxND 3SO6ZCcQSea5Vj1tYC7a7G5kDjdwRKL6soju6KZXcDcgj1QERkt+CiL2Hf9y8Z3z5QB5QuiDlfLP+ QShVnKbJApzjIKBw4fBw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9Ou3-0002PG-4R; Thu, 28 Mar 2019 06:52:43 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9Oty-0002OZ-Vy for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2019 06:52:41 +0000 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 158C52075E; Thu, 28 Mar 2019 06:52:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553755956; bh=kd8a4YTiA768T71fL+kuMWtjxlGwrVwkoT4Uyxf3KQs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M8mKNe9y7DJnG1Io/I/JWe6CVVvIQnN+vOBDmsbEhwBMY3gK/ZTo9tNAltJf2Nh6P gzqmzFmsDeChDTRy6ACzmwlgtx25dA4tUkyhaqzeg5KDqfLm1DEDCgspBfLIR0387K gD1TuOZI8Evwm7MXfAbnt9rRgWYnvCd8ka09WfVk= Date: Thu, 28 Mar 2019 07:52:31 +0100 From: Greg KH To: Patrick Venture Subject: Re: [PATCH v7 2/2] drivers/misc: Add Aspeed P2A control driver Message-ID: <20190328065231.GB20312@kroah.com> References: <20190312163101.155910-1-venture@google.com> <20190327164542.GC11712@kroah.com> <20190327185410.GA14828@kroah.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190327_235239_054578_98F4EE25 X-CRM114-Status: GOOD ( 23.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-aspeed@lists.ozlabs.org, Andrew Jeffery , Linux Kernel Mailing List , Joel Stanley , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 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 Wed, Mar 27, 2019 at 12:01:50PM -0700, Patrick Venture wrote: > On Wed, Mar 27, 2019 at 11:54 AM Greg KH wrote: > > > > On Wed, Mar 27, 2019 at 11:44:36AM -0700, Patrick Venture wrote: > > > On Wed, Mar 27, 2019 at 11:28 AM Greg KH wrote: > > > > > > > > On Tue, Mar 12, 2019 at 09:31:01AM -0700, Patrick Venture wrote: > > > > > + phys_addr_t mem_base; > > > > > > > > Is this really a 32bit value? > > > > > > It's going to be a 32-bit value if this is in the dts for one of the > > > correspondingly supported aspeed models. > > > > > > > > > > > Your ioctl thinks it is: > > > > > > > > > +struct aspeed_p2a_ctrl_mapping { > > > > > + __u32 addr; > > > > > > > > Does this driver not work on a 64bit kernel? > > > > > > This driver is aimed at only 32-bit hardware (ast2400/2500). I > > > modeled the approach after the aspeed-lpc-ctrl driver as it's > > > providing similar functionality. > > > > > > > > > > > > + __u32 length; > > > > > + __u32 flags; > > > > > +}; > > > > > > > > addr really should be __u32 here so you don't have to mess with 32/64 > > > > bit user/kernel issues, right? > > > > > > Add is __u32 there. Are you suggesting it shouldn't be? > > > > Ugh, yes, sorry, I meant to say "__u64". > > > > If you all insist that this is all that is ever going to be needed, ok, > > but I reserve the right to complain in 4 years when this needs to be > > changed :) > > In the event the ast2600 comes out and is 64-bit -- I can't imagine > that's likely to happen. I can take solace that this won't be the > only thing that needs retrofitting. But it wouldn't kill me to just > make the change. I'll just have to tweak it to return failure in the > event the address provided isn't found in any region... > > Is that all that needs to change for 64-bit addressing support - given > your read of the driver? That's all that I noticed at first glance, yes. I do dislike having custom user/kernel apis for random chips like this, but I don't know of a way to have a generic api for them at the moment as I really do not know what these chips do :( One would think that the firmware api would work for you, but given the complexity here, it does not seem that it would match up. thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel