From patchwork Mon Aug 20 07:54:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Mundt X-Patchwork-Id: 1346821 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 3CE7140210 for ; Mon, 20 Aug 2012 07:54:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755656Ab2HTHyN (ORCPT ); Mon, 20 Aug 2012 03:54:13 -0400 Received: from linux-sh.org ([111.68.239.195]:37461 "EHLO linux-sh.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755620Ab2HTHyM (ORCPT ); Mon, 20 Aug 2012 03:54:12 -0400 Received: from linux-sh.org (localhost.localdomain [127.0.0.1]) by linux-sh.org (8.14.5/8.14.4) with ESMTP id q7K7s8rN009306; Mon, 20 Aug 2012 16:54:08 +0900 Received: (from pmundt@localhost) by linux-sh.org (8.14.5/8.14.4/Submit) id q7K7s848009302; Mon, 20 Aug 2012 16:54:08 +0900 X-Authentication-Warning: linux-sh.org: pmundt set sender to lethal@linux-sh.org using -f Date: Mon, 20 Aug 2012 16:54:08 +0900 From: Paul Mundt To: Kuninori Morimoto Cc: Magnus , linux-sh@vger.kernel.org, Kuninori Morimoto Subject: Re: kzm9g boot fail (was Re: irqdomain breaks ap4 boot) Message-ID: <20120820075408.GA21643@linux-sh.org> References: <502DDC97.5080501@kmckk.co.jp> <87wr0us6tg.wl%kuninori.morimoto.gx@renesas.com> <20120820031352.GC25767@linux-sh.org> <87obm6ry98.wl%kuninori.morimoto.gx@renesas.com> <20120820043853.GD25767@linux-sh.org> <87mx1qrx1x.wl%kuninori.morimoto.gx@renesas.com> <20120820052459.GE25767@linux-sh.org> <87ipcersgg.wl%kuninori.morimoto.gx@renesas.com> <20120820063014.GF25767@linux-sh.org> <87haryrowr.wl%kuninori.morimoto.gx@renesas.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87haryrowr.wl%kuninori.morimoto.gx@renesas.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org On Mon, Aug 20, 2012 at 12:41:28AM -0700, Kuninori Morimoto wrote: > > Hi Paul > Cc Magnus > > > > > place. At least we know the irqdomain code isn't at fault anymore. > > I tried show irq number on "non-irqdomain kernel" and "irqdomain kernel". > And compared these 2 kernel irq table. > ("irqdomain kernel" doesn't have my quick hack patch => got WARNING) > > It were > register_intc_controller(&intcs_desc); > register_intc_controller(&intca_irq_pins_desc); > register_intc_controller(&intc_pint0_desc); > register_intc_controller(&intc_pint1_desc); > > 1st register_intc_controller()'s irq were > irqdomain : from 448 to 680 > non-irqdomain : from 448 to 680 > 2nd register_intc_controller()'s irq were > irqdomain : from 560 to 959 <= > non-irqdomain : from 544 to 943 <= How are you getting these ranges? The irqdomain ranges are calculated using evt2irq(), but it looks like sh73a0 needs to use intcs_evt2irq()/to_intc_vect() for factoring in the offsets. That offset factorization appears to be what is throwing this out of range -- though why evt2irq() use on these vectors hasn't resulted in issues before this I don't know. Do you observe any difference by dropping evt2irq() bounding for the linear range and simply using the tree type? --- -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/sh/intc/irqdomain.c b/drivers/sh/intc/irqdomain.c index 3968f1c..5ba8ba7 100644 --- a/drivers/sh/intc/irqdomain.c +++ b/drivers/sh/intc/irqdomain.c @@ -44,6 +44,7 @@ static const struct irq_domain_ops intc_evt_ops = { void __init intc_irq_domain_init(struct intc_desc_int *d, struct intc_hw_desc *hw) { +#if 0 unsigned int irq_base, irq_end; /* @@ -62,6 +63,7 @@ void __init intc_irq_domain_init(struct intc_desc_int *d, d->domain = irq_domain_add_linear(NULL, hw->nr_vectors, &intc_evt_ops, NULL); else +#endif d->domain = irq_domain_add_tree(NULL, &intc_evt_ops, NULL); BUG_ON(!d->domain);