From owner-freebsd-arch@freebsd.org Sat Jul 30 06:55:11 2016 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FC30BA9774; Sat, 30 Jul 2016 06:55:11 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-it0-x235.google.com (mail-it0-x235.google.com [IPv6:2607:f8b0:4001:c0b::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4CB21AFB; Sat, 30 Jul 2016 06:55:10 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-it0-x235.google.com with SMTP id f6so208922225ith.1; Fri, 29 Jul 2016 23:55:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=r3zXziOYd9pqy0GFrs1nO7oSeiuRS/Krdz943pVwbRo=; b=KqrV5gxuRWwARwUMLZiz3kLcaCSk30LU5dzZm4wo2Uqoie2e5cX5nrtZO4lpJ+piBh q3fLaheXESvmtWfKDb8/vgIYfe/8Idr+iOxOvMhhDKPpAy0VjCew6YbYs0o/datpam8r zqg57BvQL0QYOJoiWuvO6wOzSz1y2Nvgq0juQNsFcoK+QZNIcibpbWd8m85qiKlU77nD 7HYQy6Ouq12HpGUZPvCj+Lc676mXo5XnteteYciqK2TWG2gIe6f/gjr+drcDm7hhmXnB PxlqMS1DL6h1xBYlbXMkHWVU/yYg62ePXIoB41IUyliUut/vVubagPS8cvC6oVIT/dfb dd1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=r3zXziOYd9pqy0GFrs1nO7oSeiuRS/Krdz943pVwbRo=; b=PXHBzFaBffAZiIcz5AMLVWSDnzI1fcm+cMXw9itKb4G1ltThoE5/1GLWjBUJquOJFM B1zxsQTAmLV/dgcaY0EOR/e+k6TcOjW24pPFtCkPwkViYf8mU8/FpfXLfNoQlLQ77fUK ikL7Qmafl/axsPEQWbdKWfnecFJuD04vuZREvNFmhlcUgku7kb1PHh5B+MsspSKfLYu0 NNnuRJ//8V1nKd/GbIpQkfudUt2wjYCABtd4tBuaGxMnfPaBrv25DgS6pLYwHMQY8/6F owFkipcSRRc9kSAzJmim3WuRPreq0BLPwo1Z7dgZYVM33pTApYiXw4zSMFKK0mB8Dke/ BmHw== X-Gm-Message-State: AEkoouum/9iVtMhobtoNNuwJsrSzcwlVl3FwfUD5/oXU9wco+xedaBS20Bci33q8kaFZS2JVR9ZF+MvDjQMwNQ== X-Received: by 10.36.101.195 with SMTP id u186mr45792625itb.80.1469861709935; Fri, 29 Jul 2016 23:55:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.141.129 with HTTP; Fri, 29 Jul 2016 23:55:08 -0700 (PDT) In-Reply-To: References: <201606051620.u55GKD5S066398@repo.freebsd.org> <57907B0F.9070204@FreeBSD.org> <9d2a224c-b787-2875-5984-a7a2354e8695@freebsd.org> <57934ABD.6010807@FreeBSD.org> <4e7a3e8f-cc21-f5f2-e3e0-4dbd554a4cd0@freebsd.org> <5794720F.4050303@FreeBSD.org> <8bfd8668-bc49-e109-e610-b5cd470be3ec@freebsd.org> <57950005.6070403@FreeBSD.org> <57961549.4020105@FreeBSD.org> <57976867.6080705@FreeBSD.org> <5798E104.5020104@FreeBSD.org> <579A25BB.8070206@FreeBSD.org> <30790e40-58b4-3371-c0f0-b7545571f389@freebsd.org> <579AFFC5.1040005@FreeBSD.org> From: Adrian Chadd Date: Fri, 29 Jul 2016 23:55:08 -0700 Message-ID: Subject: Re: INTRNG (Was: svn commit: r301453....) To: Svatopluk Kraus Cc: Nathan Whitehorn , "freebsd-arm@freebsd.org" , Michal Meloun , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jul 2016 06:55:11 -0000 On 29 July 2016 at 15:16, Svatopluk Kraus wrote: > Well, I'm online again, unfortanately, I'm quite busy, so just quick > response for now to the formal ask for the reversion. > > On Fri, Jul 29, 2016 at 4:41 PM, Nathan Whitehorn > wrote: >> > > [snip] > >> >> So here is where I am right now: >> - The perceived advantage of the new API seems to be that the mapping >> information (interrupt parent, etc.) ends up in a struct resource instead of >> in a centralized mapping table > > It's more than that. The change has made INTRNG framework not > dependent on OFW(FDT) stuff. So after next r301543, the framework is > clean of all additions related to various buses. It was something I > wanted to do before FreeBSD-11 release, once when adrian@ moved INTRNG > to sys/kern. The framework is used by arm, arm64 and mips now, so from > my point of view, it was quite important. The way how it was done is > not perfect and may be changed in the future. However, it does not > break anything, does not change old functionality, and only few bus > drivers were modified slightly. It was also only way which I and > Michal have agreed on considering current kernel code. > > >> - Additionally, it gives you a better shot at having the PIC online before >> the PIC's interrupts are parsed (which is not required, but nice). > > For me, it's just correct design. Please, not all world is about OFW. Hi, Right, but the world does include open firmware, and Nathan/Justin have a lot of experience over on the powerpc side with all the crazy variants on interrupt enumeration and handling there. I think you and Nathan are sort of on the same page, but sort of not on the same page, and Nathan is trying to ensure things don't become more complicated moving forward. I really do suggest this stuff get written down and thought about a little more, and not just in the context of the ARM style GIC/PIC+GPIO interrupt setups that people are writing code for. Don't get me wrong, I'm glad it's happening, but there are more consumers involved than just ARM. :) So, are you/Michal willing to describe some of the ARM interrupt/platform hilarity on his wiki page (https://wiki.freebsd.org/Complicated_Interrupts ) so everyone can be on the same page (heh!) ? Right now there's a lot of information floating around in emails but it's hard to pull out exactly what's going on unless you're knee deep in it all working on that platform. I'm trying to figure it out too for the MIPS + GPIO interrupt stuff that people are now doing with the QCA MIPS hardware and I'd like to make sure I know what's required for the QCA ARM (Dakota/IPQ8019) hardware. Thanks! -adrian -adrian