linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Luming Yu <luming.yu@shingroup.cn>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	mpe@ellerman.id.au, npiggin@gmail.com,
	christophe.leroy@csgroup.eu, jialong.yang@shingroup.cn,
	luming.yu@gmail.com
Cc: Luming Yu <luming.yu@shingroup.cn>
Subject: Re: [PATCH 6/7] powerpc/entry: factout irqentry-state
Date: Tue, 15 Oct 2024 17:42:45 +0200	[thread overview]
Message-ID: <87ed4he5je.ffs@tglx> (raw)
In-Reply-To: <E6FB8D32FAAFC3BE+20241012035621.1245-8-luming.yu@shingroup.cn>

On Sat, Oct 12 2024 at 11:56, Luming Yu wrote:

> To have lowlevel paca.h include high level entry-common.h cause
> include file dependency mess. Split irqentry-state.h to have
> the irqentry_state.h can be included in low level paca.h

What's the rationale for this?

> Signed-off-by: Luming Yu <luming.yu@shingroup.cn>
> ---
>  arch/powerpc/include/asm/paca.h |  2 ++
>  arch/powerpc/kernel/interrupt.c |  2 ++
>  include/linux/entry-common.h    | 24 ------------------------
>  include/linux/irqentry-state.h  | 28 ++++++++++++++++++++++++++++

This is not how it works. Split the include file in a first step and
then make changes to the PPC side.

> diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h
> index d95ab85f96ba..6521171469f2 100644
> --- a/include/linux/entry-common.h
> +++ b/include/linux/entry-common.h
> @@ -352,30 +352,6 @@ void irqentry_enter_from_user_mode(struct pt_regs *regs);
>   */
>  void irqentry_exit_to_user_mode(struct pt_regs *regs);
>  
> -#ifndef irqentry_state
> -/**
> - * struct irqentry_state - Opaque object for exception state storage
> - * @exit_rcu: Used exclusively in the irqentry_*() calls; signals whether the
> - *            exit path has to invoke ct_irq_exit().
> - * @lockdep: Used exclusively in the irqentry_nmi_*() calls; ensures that
> - *           lockdep state is restored correctly on exit from nmi.
> - *
> - * This opaque object is filled in by the irqentry_*_enter() functions and
> - * must be passed back into the corresponding irqentry_*_exit() functions
> - * when the exception is complete.
> - *
> - * Callers of irqentry_*_[enter|exit]() must consider this structure opaque
> - * and all members private.  Descriptions of the members are provided to aid in
> - * the maintenance of the irqentry_*() functions.
> - */
> -typedef struct irqentry_state {
> -	union {
> -		bool	exit_rcu;
> -		bool	lockdep;
> -	};
> -} irqentry_state_t;
> -#endif
> -
>  /**
>   * irqentry_enter - Handle state tracking on ordinary interrupt entries
>   * @regs:	Pointer to pt_regs of interrupted context
> diff --git a/include/linux/irqentry-state.h b/include/linux/irqentry-state.h
> new file mode 100644
> index 000000000000..d4ddeb1c6ab6
> --- /dev/null
> +++ b/include/linux/irqentry-state.h
> @@ -0,0 +1,28 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef __LINUX_IRQENTRYCOMMON_H
> +#define __LINUX_IRQENTRYCOMMON_H

The guards reflect the header file name and are not randomly chosen strings.

But aside of that. How is any of this supposed to compile?

You move the typedef into a separate header and then nothing (except
powerpc) includes it. Oh well.

Thanks,

        tglx


  reply	other threads:[~2024-10-15 15:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20241012035621.1245-3-luming.yu@shingroup.cn>
2024-10-12  3:56 ` [PATCH 2/7] powerpc/entry: cleanup syscall entry Luming Yu
2024-10-12  3:56 ` [PATCH 3/7] powerpc/debug: implement HAVE_USER_RETURN_NOTIFIER Luming Yu
2024-10-12  3:56 ` [PATCH 4/7] powerpc/debug: hook to user return notifier infrastructure Luming Yu
2024-10-12  3:56 ` [PATCH 5/7] powerpc/entry: add irqentry_state and generic entry support Luming Yu
2024-10-12  9:35   ` Christophe Leroy
2024-10-12 11:27     ` 虞陆铭
2024-10-12  3:56 ` [PATCH 6/7] powerpc/entry: factout irqentry-state Luming Yu
2024-10-15 15:42   ` Thomas Gleixner [this message]
2024-11-11  3:45     ` Luming Yu
2024-10-12  3:56 ` [PATCH 7/7] powerpc/entry: fix 32bit compile issue for common entry Luming Yu

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=87ed4he5je.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=christophe.leroy@csgroup.eu \
    --cc=jialong.yang@shingroup.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=luming.yu@gmail.com \
    --cc=luming.yu@shingroup.cn \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).