lkml.org 
[lkml]   [2019]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 2/3] x86/irq: factor out IS_ERR_OR_NULL check from platfom-specific handle_irq
On Sun, 4 Aug 2019, Heiner Kallweit wrote:
> -
> - if (!handle_irq(desc, regs)) {
> + if (IS_ERR_OR_NULL(desc)) {

This really want's an unlikely or preferrably be written as:

if (likely(!IS_ERR_OR_NULL(desc))) {
handle_irq(desc);
} else {

> ack_APIC_irq();
>
> if (desc != VECTOR_RETRIGGERED && desc != VECTOR_SHUTDOWN) {
> @@ -254,6 +253,8 @@ __visible unsigned int __irq_entry do_IRQ(struct pt_regs *regs)
> } else {
> __this_cpu_write(vector_irq[vector], VECTOR_UNUSED);
> }
> + } else {
> + handle_irq(desc, regs);
> }
>
> diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c
> index 6bf6517a0..cd4595b71 100644
> --- a/arch/x86/kernel/irq_64.c
> +++ b/arch/x86/kernel/irq_64.c
> @@ -26,13 +26,9 @@
> DEFINE_PER_CPU_PAGE_ALIGNED(struct irq_stack, irq_stack_backing_store) __visible;
> DECLARE_INIT_PER_CPU(irq_stack_backing_store);
>
> -bool handle_irq(struct irq_desc *desc, struct pt_regs *regs)
> +void handle_irq(struct irq_desc *desc, struct pt_regs *regs)
> {
> - if (IS_ERR_OR_NULL(desc))
> - return false;
> -
> generic_handle_irq_desc(desc);

With that the function call does not make any sense for 64bit. So the
wrapper should be an inline and only for 32bit a function call.

Thanks,

tglx

\
 
 \ /
  Last update: 2019-08-19 12:42    [W:0.661 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site