From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH RFC 18/35] arm : add helper function for setting interrupt type Date: Wed, 11 Feb 2015 14:12:53 +0800 Message-ID: <54DAF2E5.3000009@linaro.org> References: <1423058539-26403-1-git-send-email-parth.dixit@linaro.org> <1423058539-26403-19-git-send-email-parth.dixit@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini , Parth Dixit Cc: ian.campbell@citrix.com, tim@xen.org, xen-devel@lists.xen.org, stefano.stabellini@citrix.com, jbeulich@suse.com, christoffer.dall@linaro.org List-Id: xen-devel@lists.xenproject.org Hi Stefano, On 05/02/2015 23:33, Stefano Stabellini wrote: > On Wed, 4 Feb 2015, parth.dixit@linaro.org wrote: >> From: Parth Dixit >> >> set edge/level type information for an interrupt >> >> Signed-off-by: Parth Dixit >> --- >> xen/arch/arm/irq.c | 19 +++++++++++++++++++ >> xen/include/asm-arm/irq.h | 4 ++++ >> 2 files changed, 23 insertions(+) >> >> diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c >> index 25ecf1d..ae4e99a 100644 >> --- a/xen/arch/arm/irq.c >> +++ b/xen/arch/arm/irq.c >> @@ -545,6 +545,25 @@ int platform_get_irq(const struct dt_device_node *device, int index) >> return irq; >> } >> >> +#if defined(CONFIG_ARM_64) && defined(CONFIG_ACPI) >> +int acpi_set_irq(int irq,int type) >> +{ >> + int res; >> + >> + /* Setup the IRQ type */ >> + if ( irq < NR_LOCAL_IRQS ) >> + res = irq_local_set_type(irq, type); >> + else >> + res = irq_set_spi_type(irq, type); >> + >> + if ( res ) >> + return -1; >> + >> + return 0; >> + >> +} >> +#endif > > As you are using this function in previous patches, you should > defenitely move this patch earlier in the series. > > Please introduce another set of IRQ_TYPEs that are not DT specific, or > make the existing ones generic. The existing (DT_IRQ_*) one has to be kept because it's part of the device tree bindings. I would introduce new one and, if necessary, add function to translate DT_IRQ_* to IRQ_TYPEs. Regards, -- Julien Grall