[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <28694e1b-415a-d53f-f2e5-ba2a407fa88c@lechnology.com>
Date: Mon, 4 Feb 2019 18:20:18 -0600
From: David Lechner <david@...hnology.com>
To: Bartosz Golaszewski <brgl@...ev.pl>, Sekhar Nori <nsekhar@...com>,
Kevin Hilman <khilman@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>,
Marc Zyngier <marc.zyngier@....com>
Cc: Bartosz Golaszewski <bgolaszewski@...libre.com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 05/35] ARM: davinci: drop irq defines from
default_priorites
On 1/31/19 7:38 AM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@...libre.com>
>
> 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 <bgolaszewski@...libre.com>
> ---
> arch/arm/mach-davinci/da830.c | 107 ++++--------------------------
> arch/arm/mach-davinci/da850.c | 118 +++++----------------------------
> arch/arm/mach-davinci/dm355.c | 74 +++------------------
> arch/arm/mach-davinci/dm365.c | 76 +++------------------
> arch/arm/mach-davinci/dm644x.c | 76 +++------------------
> arch/arm/mach-davinci/dm646x.c | 76 +++------------------
> 6 files changed, 69 insertions(+), 458 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c
> index 9e18b245266b..f1e7b6c644e5 100644
> --- a/arch/arm/mach-davinci/da830.c
> +++ b/arch/arm/mach-davinci/da830.c
> @@ -624,98 +624,19 @@ const short da830_eqep1_pins[] __initconst = {
> };
>
> /* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */
> -static u8 da830_default_priorities[DA830_N_CP_INTC_IRQ] = {
> - [IRQ_DA8XX_COMMTX] = 7,
> - [IRQ_DA8XX_COMMRX] = 7,
> - [IRQ_DA8XX_NINT] = 7,
> - [IRQ_DA8XX_EVTOUT0] = 7,
> - [IRQ_DA8XX_EVTOUT1] = 7,
> - [IRQ_DA8XX_EVTOUT2] = 7,
> - [IRQ_DA8XX_EVTOUT3] = 7,
> - [IRQ_DA8XX_EVTOUT4] = 7,
> - [IRQ_DA8XX_EVTOUT5] = 7,
> - [IRQ_DA8XX_EVTOUT6] = 7,
> - [IRQ_DA8XX_EVTOUT7] = 7,
> - [IRQ_DA8XX_CCINT0] = 7,
> - [IRQ_DA8XX_CCERRINT] = 7,
> - [IRQ_DA8XX_TCERRINT0] = 7,
> - [IRQ_DA8XX_AEMIFINT] = 7,
> - [IRQ_DA8XX_I2CINT0] = 7,
> - [IRQ_DA8XX_MMCSDINT0] = 7,
> - [IRQ_DA8XX_MMCSDINT1] = 7,
> - [IRQ_DA8XX_ALLINT0] = 7,
> - [IRQ_DA8XX_RTC] = 7,
> - [IRQ_DA8XX_SPINT0] = 7,
> - [IRQ_DA8XX_TINT12_0] = 7,
> - [IRQ_DA8XX_TINT34_0] = 7,
> - [IRQ_DA8XX_TINT12_1] = 7,
> - [IRQ_DA8XX_TINT34_1] = 7,
> - [IRQ_DA8XX_UARTINT0] = 7,
> - [IRQ_DA8XX_KEYMGRINT] = 7,
> - [IRQ_DA830_MPUERR] = 7,
> - [IRQ_DA8XX_CHIPINT0] = 7,
> - [IRQ_DA8XX_CHIPINT1] = 7,
> - [IRQ_DA8XX_CHIPINT2] = 7,
> - [IRQ_DA8XX_CHIPINT3] = 7,
> - [IRQ_DA8XX_TCERRINT1] = 7,
> - [IRQ_DA8XX_C0_RX_THRESH_PULSE] = 7,
> - [IRQ_DA8XX_C0_RX_PULSE] = 7,
> - [IRQ_DA8XX_C0_TX_PULSE] = 7,
> - [IRQ_DA8XX_C0_MISC_PULSE] = 7,
> - [IRQ_DA8XX_C1_RX_THRESH_PULSE] = 7,
> - [IRQ_DA8XX_C1_RX_PULSE] = 7,
> - [IRQ_DA8XX_C1_TX_PULSE] = 7,
> - [IRQ_DA8XX_C1_MISC_PULSE] = 7,
> - [IRQ_DA8XX_MEMERR] = 7,
> - [IRQ_DA8XX_GPIO0] = 7,
> - [IRQ_DA8XX_GPIO1] = 7,
> - [IRQ_DA8XX_GPIO2] = 7,
> - [IRQ_DA8XX_GPIO3] = 7,
> - [IRQ_DA8XX_GPIO4] = 7,
> - [IRQ_DA8XX_GPIO5] = 7,
> - [IRQ_DA8XX_GPIO6] = 7,
> - [IRQ_DA8XX_GPIO7] = 7,
> - [IRQ_DA8XX_GPIO8] = 7,
> - [IRQ_DA8XX_I2CINT1] = 7,
> - [IRQ_DA8XX_LCDINT] = 7,
> - [IRQ_DA8XX_UARTINT1] = 7,
> - [IRQ_DA8XX_MCASPINT] = 7,
> - [IRQ_DA8XX_ALLINT1] = 7,
> - [IRQ_DA8XX_SPINT1] = 7,
> - [IRQ_DA8XX_UHPI_INT1] = 7,
> - [IRQ_DA8XX_USB_INT] = 7,
> - [IRQ_DA8XX_IRQN] = 7,
> - [IRQ_DA8XX_RWAKEUP] = 7,
> - [IRQ_DA8XX_UARTINT2] = 7,
> - [IRQ_DA8XX_DFTSSINT] = 7,
> - [IRQ_DA8XX_EHRPWM0] = 7,
> - [IRQ_DA8XX_EHRPWM0TZ] = 7,
> - [IRQ_DA8XX_EHRPWM1] = 7,
> - [IRQ_DA8XX_EHRPWM1TZ] = 7,
> - [IRQ_DA830_EHRPWM2] = 7,
> - [IRQ_DA830_EHRPWM2TZ] = 7,
> - [IRQ_DA8XX_ECAP0] = 7,
> - [IRQ_DA8XX_ECAP1] = 7,
> - [IRQ_DA8XX_ECAP2] = 7,
> - [IRQ_DA830_EQEP0] = 7,
> - [IRQ_DA830_EQEP1] = 7,
> - [IRQ_DA830_T12CMPINT0_0] = 7,
> - [IRQ_DA830_T12CMPINT1_0] = 7,
> - [IRQ_DA830_T12CMPINT2_0] = 7,
> - [IRQ_DA830_T12CMPINT3_0] = 7,
> - [IRQ_DA830_T12CMPINT4_0] = 7,
> - [IRQ_DA830_T12CMPINT5_0] = 7,
> - [IRQ_DA830_T12CMPINT6_0] = 7,
> - [IRQ_DA830_T12CMPINT7_0] = 7,
> - [IRQ_DA830_T12CMPINT0_1] = 7,
> - [IRQ_DA830_T12CMPINT1_1] = 7,
> - [IRQ_DA830_T12CMPINT2_1] = 7,
> - [IRQ_DA830_T12CMPINT3_1] = 7,
> - [IRQ_DA830_T12CMPINT4_1] = 7,
> - [IRQ_DA830_T12CMPINT5_1] = 7,
> - [IRQ_DA830_T12CMPINT6_1] = 7,
> - [IRQ_DA830_T12CMPINT7_1] = 7,
> - [IRQ_DA8XX_ARMCLKSTOPREQ] = 7,
> +static u8 da830_cp_intc_prios[] = {
> + 7, 7, 7, 7, 7, 7, 7, 7,
> + 7, 7, 7, 7, 7, 7, 7, 7,
> + 7, 7, 7, 7, 7, 7, 7, 7,
> + 7, 7, 7, 7, 7, 7, 7, 7,
> + 7, 7, 7, 7, 7, 7, 7, 7,
> + 7, 7, 7, 7, 7, 7, 7, 7,
> + 7, 7, 7, 7, 7, 7, 7, 7,
> + 7, 7, 7, 7, 7, 7, 7, 7,
> + 7, 7, 7, 7, 7, 7, 7, 7,
> + 7, 7, 7, 7, 7, 7, 7, 7,
> + 7, 7, 7, 7, 7, 7, 7, 7,
> + 7, 7, 7, 7, 7, 7, 7, 7,
> };
>
Technically, any holes in the array that are being deleted
here have a default priority of 15 assigned in the cp_intc
driver instead of 7. I don't think this is a problem, but it
might be worth mentioning in the commit message. Same goes
for DA850.
Powered by blists - more mailing lists