From: Philippe Gerum <rpm@xenomai.org>
To: "Martínek Petr" <petr.martinek@elvac.eu>
Cc: "xenomai@lists.linux.dev" <xenomai@lists.linux.dev>
Subject: Re: linux-evl 7.2 compilation without SMP
Date: Wed, 11 Nov 2026 10:11:09 +0100 [thread overview]
Message-ID: <87a4nf68cy.fsf@xenomai.org> (raw)
In-Reply-To: <27ae5abdf65c4fd2aff3949c6d424354@elvac.eu> ("Martínek Petr"'s message of "Tue, 13 Oct 2026 07:06:29 +0000")
Martínek Petr <petr.martinek@elvac.eu> writes:
> It is not possible to compile linux-evl 7.2 without SMP due to bad port of
> include/linux/spinlock_api_up.h code and kernel/irq/pipeline.c
> pipeline_percpu_data being inside define for SMP, while being used without it.
> Included are patches to fix compilation.
>
> Signed-off-by: Petr Martínek <petr.martinek@elvac.eu>
> ---
> diff -Naur a/include/linux/spinlock_api_up.h b/include/linux/spinlock_api_up.h
> --- a/include/linux/spinlock_api_up.h 2026-09-23 08:39:20.000000000 +0200
> +++ b/include/linux/spinlock_api_up.h 2026-10-08 14:21:40.410814000 +0200
> @@ -62,22 +62,22 @@
> do { local_irq_restore(flags); __UNLOCK(lock, ##__VA_ARGS__); } while (0)
>
> #define __HARD_LOCK(lock) \
> - do { ___LOCK_##__VA_ARGS__(lock); } while (0)
> + do { ___LOCK_(lock); } while (0)
>
> #define __HARD_LOCK_IRQ(lock) \
> - do { hard_local_irq_disable(); __HARD_LOCK(lock, ##__VA_ARGS__); } while (0)
> + do { hard_local_irq_disable(); __HARD_LOCK(lock); } while (0)
>
> #define __HARD_LOCK_IRQSAVE(lock, flags) \
> - do { flags = hard_local_irq_save(); __HARD_LOCK(lock, ##__VA_ARGS__); } while (0)
> + do { flags = hard_local_irq_save(); __HARD_LOCK(lock); } while (0)
>
> #define __HARD_UNLOCK(lock) \
> - do { ___UNLOCK_##__VA_ARGS__(lock); } while (0)
> + do { ___UNLOCK_(lock); } while (0)
>
> #define __HARD_UNLOCK_IRQ(lock) \
> - do { hard_local_irq_enable(); __HARD_UNLOCK(lock, ##__VA_ARGS__); } while (0)
> + do { hard_local_irq_enable(); __HARD_UNLOCK(lock); } while (0)
>
> #define __HARD_UNLOCK_IRQRESTORE(lock, flags) \
> - do { hard_local_irq_restore(flags); __HARD_UNLOCK(lock, ##__VA_ARGS__); } while (0)
> + do { hard_local_irq_restore(flags); __HARD_UNLOCK(lock); } while (0)
>
> #define _raw_spin_lock(lock) __LOCK(lock)
> #define _raw_spin_lock_nested(lock, subclass) __LOCK(lock)
> diff -Naur a/kernel/irq/pipeline.c b/kernel/irq/pipeline.c
> --- a/kernel/irq/pipeline.c 2026-09-23 08:39:20.000000000 +0200
> +++ b/kernel/irq/pipeline.c 2026-10-08 14:30:08.315420000 +0200
> @@ -75,6 +75,9 @@
> unsigned long flat[IRQ_FLAT_MAPSZ];
> };
>
> +struct pipeline_percpu_data { };
> +static DEFINE_PER_CPU(struct pipeline_percpu_data, pipeline_percpu_data);
> +
> #ifdef CONFIG_SMP
>
> static struct irq_event_map bootup_irq_map __initdata;
> @@ -92,9 +95,6 @@
> },
> };
>
> -struct pipeline_percpu_data { };
> -static DEFINE_PER_CPU(struct pipeline_percpu_data, pipeline_percpu_data);
> -
> static irqreturn_t smp_call_function_ipi_handler(int irq, void *dev_id)
> {
> smp_flush_oob_call_function_queue();
This one slipped through the cracks. Merged, thanks.
--
Philippe.
next prev parent reply other threads:[~2026-11-11 9:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 7:06 linux-evl 7.2 compilation without SMP Martínek Petr
2026-11-11 9:11 ` Philippe Gerum [this message]
2026-11-11 11:53 ` linux-evl 7.2 OOB GPIO NULL dereference in lineevent_create Martínek Petr
2026-11-12 14:20 ` Philippe Gerum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a4nf68cy.fsf@xenomai.org \
--to=rpm@xenomai.org \
--cc=petr.martinek@elvac.eu \
--cc=xenomai@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.