From patchwork Tue Feb 24 09:04:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 5870681 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CED439F373 for ; Tue, 24 Feb 2015 09:04:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03F8220386 for ; Tue, 24 Feb 2015 09:04:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2016420621 for ; Tue, 24 Feb 2015 09:04:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751627AbbBXJEd (ORCPT ); Tue, 24 Feb 2015 04:04:33 -0500 Received: from foss.arm.com ([217.140.101.70]:33486 "EHLO usa-sjc-mx-foss1.foss.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751253AbbBXJEa (ORCPT ); Tue, 24 Feb 2015 04:04:30 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F33D9FD; Tue, 24 Feb 2015 01:04:42 -0800 (PST) Received: from [10.1.209.148] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9819D3F758; Tue, 24 Feb 2015 01:04:28 -0800 (PST) Message-ID: <54EC3E9A.5010807@arm.com> Date: Tue, 24 Feb 2015 09:04:26 +0000 From: Marc Zyngier Organization: ARM Ltd User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 MIME-Version: 1.0 To: Tony Lindgren CC: Benoit Cousson , Nishanth Menon , Santosh Shilimkar , Jason Cooper , Thomas Gleixner , Rob Herring , Mark Rutland , "linux-arm-kernel@lists.infradead.org" , "linux-omap@vger.kernel.org" Subject: Re: [PATCH v5 0/7] irqchip: Move OMAP{4, 5}/DRA7 to use stacked domains References: <1424713459-6824-1-git-send-email-marc.zyngier@arm.com> <20150223230205.GJ32521@atomide.com> In-Reply-To: <20150223230205.GJ32521@atomide.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 23/02/15 23:02, Tony Lindgren wrote: > * Marc Zyngier [150223 09:48]: >> This series is extracted from [4], which is trying to remove all >> traces of gic_arch_extn from the tree. As some maintainers are more >> responsive than others (understatement of the year...), I've decided >> to split it per sub-arch, and get it moving, at least partially. >> >> This series addresses OMAP{4,5} by converting the WUGEN to stacked >> domains. The DRA7 crossbar gets the same treatment. >> >> It is worth realizing that: >> >> - I haven't been able to test this as much as I would have wanted to >> (it's only been tested on omap4 and omap5). >> >> - This actively *breaks* existing setups. Once you boot a new kernel >> with an old DT, suspend/resume *will* be broken. Old kernels on a >> new DT won't even boot! You've been warned. This really outline the >> necessity of actually describing the HW in device trees... > > Could we parse still the old binding and produce warning for the > case when a new kernel is booted with the old DT? That would make > it easier for people to debug what's going on. There's a number of strategies: - Looking up the default, top-level interrupt controller: if that's the GIC, scream. - Lookup the crossbar: if it exists, but is not an interrupt controller, scream as well. - Lookup the WUGEN: if it doesn't exist, scream again. The last one is pretty easy to implement: This should cover both OMAP4, OMAP5 and DRA7. What do you think? M. diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index fba1ba7..7bb116a 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c @@ -277,6 +277,12 @@ void __init omap_gic_of_init(void) { struct device_node *np; + intc_node = of_find_matching_node(NULL, intc_match); + if (WARN_ON(!intc_node)) { + pr_err("No WUGEN found in DT, system will misbehave.\n"); + pr_err("UPDATE YOUR DEVICE TREE!\n"); + } + /* Extract GIC distributor and TWD bases for OMAP4460 ROM Errata WA */ if (!cpu_is_omap446x()) goto skip_errata_init;