Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp165178pxa; Tue, 4 Aug 2020 02:23:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxy63Z6sXaeiODEJSwHjCBXIdzi0R+Ab6SWwtGYHlFrxBczq6F/b0/psF10y7vkb72HRKg X-Received: by 2002:a17:906:7153:: with SMTP id z19mr19954764ejj.319.1596532997227; Tue, 04 Aug 2020 02:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596532997; cv=none; d=google.com; s=arc-20160816; b=wMAr0PuGCBcSHOv5IxEqjP0CX3CTPDYrbG8YCX24iDUX3jEHEIV/PpPLArYIeS/G83 3E58hgqXLaYZATSjN8Hnux/TCnQLJXyHz9VWK+Ijj3bv29lgwWtlnjyUjDPFl4p1syRf bUjAdxY/Uy5TAb7wETZGYJ1vbKecakO1FUU7moqsenJCYNMhkO1FDu63n0rI0mIoFmFF 9ejRTBgs+23+CJ9a2FViluo8XxPtnrS8dAylWzHKxq0JIY2Px1MEDF6PEDx7URWyhYvL CTDstERveoFGtMfEtl7uBq5WECHuFZ5/3ic7mw8/32X2Xen/b7IkhvnUBoEL25VHv3tj QUlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=clvjzgxxC6sSokmpmEVReE8WTUzKBZuIV53glNV4UNY=; b=Npf58+nwjsx4C0L0kzKx2WnWublJCq3F7c9sDRWG1yhdYesWHCFbz/6rGrGIqQY/uv XV7EQp4dFXD/CWlUQQ7o3zXvRULPuDiorEdAsv9nfpWXNY8TQGZpj29M2ips3RyGmM8N CH2UVYa70bOfqf6voNkgu5BgwREHReQR9yRIROEOTxcm/lULJJC82fJocjaRydJr7WPD z4imn1eF5uh10ET2+G1K9NSh83Uhc9o6HEbSmjNgdaJb78ZzwjkeG+jdN5qXFsUhE0hA alB4gxYDqwrw7OgvMBX/uEHep/NaUmLQ+yD6QVVX1SR1BBS+F+PhzR0cPi0K7IcX4r5o j7qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f1si11774373edr.11.2020.08.04.02.22.54; Tue, 04 Aug 2020 02:23:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725921AbgHDJWr (ORCPT + 99 others); Tue, 4 Aug 2020 05:22:47 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:23942 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725826AbgHDJWq (ORCPT ); Tue, 4 Aug 2020 05:22:46 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07491N6Q114855; Tue, 4 Aug 2020 05:22:30 -0400 Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 32q4m0gr2f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Aug 2020 05:22:30 -0400 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0749FvE5022553; Tue, 4 Aug 2020 09:22:28 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma04fra.de.ibm.com with ESMTP id 32n0189wcq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Aug 2020 09:22:28 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0749MQeu64553452 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 4 Aug 2020 09:22:26 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 28AB5AE055; Tue, 4 Aug 2020 09:22:26 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D5876AE057; Tue, 4 Aug 2020 09:22:25 +0000 (GMT) Received: from tuxmaker.linux.ibm.com (unknown [9.152.85.9]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 4 Aug 2020 09:22:25 +0000 (GMT) From: Sven Schnelle To: Thomas Gleixner Cc: Heiko Carstens , Vincenzo Frascino , linux-kernel@vger.kernel.org, Peter Zijlstra , linux-s390@vger.kernel.org Subject: Re: [PATCH 2/2] s390: convert to GENERIC_VDSO References: <20200803055645.79042-1-svens@linux.ibm.com> <20200803055645.79042-3-svens@linux.ibm.com> <87ft93ncaa.fsf@nanos.tec.linutronix.de> <87a6zbn29n.fsf@nanos.tec.linutronix.de> <20200803184428.GA3973@osiris> <873653mswn.fsf@nanos.tec.linutronix.de> Date: Tue, 04 Aug 2020 11:22:20 +0200 In-Reply-To: <873653mswn.fsf@nanos.tec.linutronix.de> (Thomas Gleixner's message of "Mon, 03 Aug 2020 21:27:36 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-04_03:2020-08-03,2020-08-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 impostorscore=0 phishscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 mlxlogscore=832 lowpriorityscore=0 spamscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008040063 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Thomas Gleixner writes: > Heiko Carstens writes: > >> 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? > > Yes. > >> 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); > > Shudder. Why not returning flags? > >> } >> >> void vdso_update_end(unsigned long *flags) > > Ditto, why pointer and not value? > >> { >> 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. > > Thought about that briefly, but then hated the flags thing and delegated > it to the caller. Lockdep will yell if that lock is taken with > interrupts enabled :) > > But aside of the pointer vs. value thing, I'm fine with doing it in the > functions. Thanks Thomas & Heiko. I'll incorporate the changes into my patchset and send an updated version. Thomas, i think it's fine if i update your patch and we take it through the s390 tree? Regards Sven