From: Heiko Carstens <hca@linux.ibm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Sven Schnelle <svens@linux.ibm.com>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
linux-s390@vger.kernel.org
Subject: Re: [PATCH 2/2] s390: convert to GENERIC_VDSO
Date: Mon, 3 Aug 2020 20:44:28 +0200 [thread overview]
Message-ID: <20200803184428.GA3973@osiris> (raw)
In-Reply-To: <87a6zbn29n.fsf@nanos.tec.linutronix.de>
On Mon, Aug 03, 2020 at 06:05:24PM +0200, Thomas Gleixner wrote:
> +/**
> + * vdso_update_begin - Start of a VDSO update section
> + *
> + * Allows architecture code to safely update the architecture specific VDSO
> + * data.
> + */
> +void vdso_update_begin(void)
> +{
> + struct vdso_data *vdata = __arch_get_k_vdso_data();
> +
> + raw_spin_lock(&timekeeper_lock);
> + vdso_write_begin(vdata);
> +}
I would assume that this only works if vdso_update_begin() is called
with irqs disabled, otherwise it could deadlock, no?
Maybe something like:
void vdso_update_begin(unsigned long *flags)
{
struct vdso_data *vdata = __arch_get_k_vdso_data();
raw_spin_lock_irqsave(&timekeeper_lock, *flags);
vdso_write_begin(vdata);
}
void vdso_update_end(unsigned long *flags)
{
struct vdso_data *vdata = __arch_get_k_vdso_data();
vdso_write_end(vdata);
__arch_sync_vdso_data(vdata);
raw_spin_unlock_irqrestore(&timekeeper_lock, *flags);
}
? Just wondering.
next prev parent reply other threads:[~2020-08-03 18:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 5:56 [PATCH RFC] s390: convert to GENERIC_VDSO Sven Schnelle
2020-08-03 5:56 ` [PATCH 1/2] vdso: allow to add architecture-specific vdso data Sven Schnelle
2020-08-03 12:13 ` Thomas Gleixner
2020-08-03 14:01 ` Sven Schnelle
2020-08-03 5:56 ` [PATCH 2/2] s390: convert to GENERIC_VDSO Sven Schnelle
2020-08-03 12:29 ` Thomas Gleixner
2020-08-03 14:09 ` Sven Schnelle
2020-08-03 16:05 ` Thomas Gleixner
2020-08-03 18:44 ` Heiko Carstens [this message]
2020-08-03 19:27 ` Thomas Gleixner
2020-08-03 20:12 ` Heiko Carstens
2020-08-04 9:22 ` Sven Schnelle
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=20200803184428.GA3973@osiris \
--to=hca@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=svens@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=vincenzo.frascino@arm.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