Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp4363824ima; Mon, 4 Feb 2019 15:16:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IZtZGUB/mKoQX9Q0NgiTvKYaVbN4Aja37w2DmH22N0zbaBLHw2t9+YbsXxsu2uRMVcb4ttx X-Received: by 2002:a63:5153:: with SMTP id r19mr1687644pgl.281.1549322201633; Mon, 04 Feb 2019 15:16:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549322201; cv=none; d=google.com; s=arc-20160816; b=hcLtBJLSbW75JU+7BfASzb5M0nejJqs4RCZhR/4yAVM7CR+iRAdJOrxmSqOUw3FBL1 LL5sdxXhh5Z9RdWxaNMYZFyqSw4VYo3O2oVNacCeJ4CD+LV/ypFr7bSkZMy2w5lEAL11 OGv5nUu0ojxL4bzJTbxqlTjq/oBRxwJOrPv0PhcRk2Pp9qpqnKzrUvkH39JSlQxrMVQz LJMV2H8LoaygoVPye6HVVbuADg7ieV2u+3chz39Lvmo8lmnnFX9ZWXz4jWkSjkFk5nNL 2J65wpO2pgBQnBsoHEa+QMtnfBMqkOSmapFxUMvKhRij4BtW+RTg2XpM6HEMqoheuRk2 BxsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=/aG5Ylu2EmX/1Ll4MhlWrXF/s3iivlGYHI8SJmR9fDc=; b=nv95siADK87xaKEJNXmnO/E09x3MNWoRq8SaaBVw2c3G5HyGY0RqB41Lzz+FwJ07Pt RXm+6NOvXkb1rc8N8tHisCba36D+Pw1UJBgyzid/bSvcPrhjI8t7a6/qTo8o5y+bzqEF VSiAPdz5dBJgFMwynZvI1vEgyOHi4pMPFcy3GrK8fWOOHa0/LntGMaQRvK5z8yhYQuJT oq2VTlyARfqZv1wHE/tfm/uBoANdxczeyiV5JzJPd9+vXzdLbnApW42IDQzPQdP+Zw3R i+BEHTweZ5ro8/3QVa0kLag0wmyHz/ST59fwDlFZbWgkS2LFHqAEAHXoouYBCaPPFPEr yc8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@lechnology.com header.s=default header.b=blDRwHh8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si1329890pgn.145.2019.02.04.15.16.24; Mon, 04 Feb 2019 15:16:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@lechnology.com header.s=default header.b=blDRwHh8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727461AbfBDWVR (ORCPT + 99 others); Mon, 4 Feb 2019 17:21:17 -0500 Received: from vern.gendns.com ([98.142.107.122]:32872 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727202AbfBDWVQ (ORCPT ); Mon, 4 Feb 2019 17:21:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=XhKOl4CdXzp63gFI5VYkC/AWTzTO9B2+72xRjsqsRDA=; b=blDRwHh82m1iKcNJz03nLKB6SP a+xrnHdlLlgcWUD9Rk6s101En+k5I61TMbVDsnWzI0BXf3GBlrO85LATzwKphSB/4cS5pht9wupIY 8JA9H6omidnd0UHrZxhg2PK43AaJFlU+KlAbOQe0J4071vSewYY4tmD/C0U/WZT+QqKcy0Ff9fWSs MMuVbKo4LtKV3LTBGNAPhdac/Q9SmX7Bj7U7vhe4P/7xnI6GYzPUGMmTMZ/sKo6qGpQoDyg+5Jr3T Zo5FjZZCTNYcWmS4bQ0du04NEovIo/ey2sGkghNOnd5agQ5/4WxM8auzjDy6J3uVwvIHEKNhNYXFm KTf8Zrdw==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:58010 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gqmYc-0007Iz-Sn; Mon, 04 Feb 2019 17:17:38 -0500 Subject: Re: [PATCH 05/35] ARM: davinci: drop irq defines from default_priorites To: Bartosz Golaszewski , Sekhar Nori , Kevin Hilman , Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20190131133928.17985-1-brgl@bgdev.pl> <20190131133928.17985-6-brgl@bgdev.pl> From: David Lechner Message-ID: <3038ba79-f411-9aa1-00ec-689060ed13d4@lechnology.com> Date: Mon, 4 Feb 2019 16:21:12 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190131133928.17985-6-brgl@bgdev.pl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/31/19 7:38 AM, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > In order to select SPARSE_IRQ we need to make the interrupt numbers > dynamic (at least at build-time for the top-level controller). The > interrupt numbers are used as array indexes for irq priorities. > > Drop the defines and just initialize the arrays in a linear manner. > > Signed-off-by: Bartosz Golaszewski > --- ... > -static u8 dm355_default_priorities[DAVINCI_N_AINTC_IRQ] = { > - [IRQ_DM355_CCDC_VDINT0] = 2, > - [IRQ_DM355_CCDC_VDINT1] = 6, > - [IRQ_DM355_CCDC_VDINT2] = 6, > - [IRQ_DM355_IPIPE_HST] = 6, > - [IRQ_DM355_H3AINT] = 6, > - [IRQ_DM355_IPIPE_SDR] = 6, > - [IRQ_DM355_IPIPEIFINT] = 6, > - [IRQ_DM355_OSDINT] = 7, > - [IRQ_DM355_VENCINT] = 6, > - [IRQ_ASQINT] = 6, > - [IRQ_IMXINT] = 6, > - [IRQ_USBINT] = 4, > - [IRQ_DM355_RTOINT] = 4, > - [IRQ_DM355_UARTINT2] = 7, > - [IRQ_DM355_TINT6] = 7, > - [IRQ_CCINT0] = 5, /* dma */ > - [IRQ_CCERRINT] = 5, /* dma */ > - [IRQ_TCERRINT0] = 5, /* dma */ > - [IRQ_TCERRINT] = 5, /* dma */ > - [IRQ_DM355_SPINT2_1] = 7, > - [IRQ_DM355_TINT7] = 4, > - [IRQ_DM355_SDIOINT0] = 7, > - [IRQ_MBXINT] = 7, > - [IRQ_MBRINT] = 7, > - [IRQ_MMCINT] = 7, > - [IRQ_DM355_MMCINT1] = 7, > - [IRQ_DM355_PWMINT3] = 7, > - [IRQ_DDRINT] = 7, > - [IRQ_AEMIFINT] = 7, > - [IRQ_DM355_SDIOINT1] = 4, > - [IRQ_TINT0_TINT12] = 2, /* clockevent */ > - [IRQ_TINT0_TINT34] = 2, /* clocksource */ > - [IRQ_TINT1_TINT12] = 7, /* DSP timer */ > - [IRQ_TINT1_TINT34] = 7, /* system tick */ > - [IRQ_PWMINT0] = 7, > - [IRQ_PWMINT1] = 7, > - [IRQ_PWMINT2] = 7, > - [IRQ_I2C] = 3, > - [IRQ_UARTINT0] = 3, > - [IRQ_UARTINT1] = 3, > - [IRQ_DM355_SPINT0_0] = 3, > - [IRQ_DM355_SPINT0_1] = 3, > - [IRQ_DM355_GPIO0] = 3, > - [IRQ_DM355_GPIO1] = 7, > - [IRQ_DM355_GPIO2] = 4, > - [IRQ_DM355_GPIO3] = 4, > - [IRQ_DM355_GPIO4] = 7, > - [IRQ_DM355_GPIO5] = 7, > - [IRQ_DM355_GPIO6] = 7, > - [IRQ_DM355_GPIO7] = 7, > - [IRQ_DM355_GPIO8] = 7, > - [IRQ_DM355_GPIO9] = 7, > - [IRQ_DM355_GPIOBNK0] = 7, > - [IRQ_DM355_GPIOBNK1] = 7, > - [IRQ_DM355_GPIOBNK2] = 7, > - [IRQ_DM355_GPIOBNK3] = 7, > - [IRQ_DM355_GPIOBNK4] = 7, > - [IRQ_DM355_GPIOBNK5] = 7, > - [IRQ_DM355_GPIOBNK6] = 7, > - [IRQ_COMMTX] = 7, > - [IRQ_COMMRX] = 7, > - [IRQ_EMUINT] = 7, > +static u8 dm355_aintc_prios[] = { > + 2, 6, 6, 6, 6, 6, 6, 7, > + 6, 6, 6, 4, 4, 7, 7, 5, > + 5, 5, 5, 7, 4, 7, 7, 7, > + 7, 7, 7, 7, 7, 4, 2, 2, > + 7, 7, 7, 7, 7, 3, 3, 3, > + 3, 3, 3, 7, 4, 4, 7, 7, > + 7, 7, 7, 7, 7, 7, 7, 7, > + 7, 7, 7, 7, 7, 7, 0, 0, > }; Hmm... this makes it harder to see what is going on here. You can no longer see which priority corresponds to which IRQ without consulting a manual.