Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1819565pxa; Sun, 2 Aug 2020 22:57:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwe9BznHPhVxvyHqv2ldrwqLEF69BEDBaL1Koc3hg5QAx++6J+FaEkEN5l7tSug8uwW387W X-Received: by 2002:a17:906:3655:: with SMTP id r21mr15558035ejb.248.1596434258619; Sun, 02 Aug 2020 22:57:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596434258; cv=none; d=google.com; s=arc-20160816; b=KOakioDswYdv1tMtjx3AO3pIaW9DLrrUU/VZy8XCuaWeJ404l1AoCl+5moKCCSEdq1 rd5PcThRTDUvOZMSNMMRd/+62qFt4V6IWqPQJTky+VMbOiafyWTR8wNsdJt6/I9ZnfdK 9R0Q47a81XmWqQiNkx5ZzfA6KiHgrgCSm9/89fnwGRK4igb7Xug4TGYmBge7uXX/HaIR 5T9PojtyQefNpWe+5++i3I9TLm2TpCfuSPDmWeL8964Q6bTN5DyarSxzw4RblWgmKsr2 2ZkldmRk4h0AzBMz1RwSFSlSigFyaFGDchhjHGPRHz2xtPDEHptaEScl/pyeSneZoBkT cwpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=7rLBBJ9ZzBv0k/KUvTka19XJFLGjKAdIzYnMi09aiWg=; b=L/oQF7TGZlkCJOI5LDy6yyFxZwF4ksLeYx1DPo+nXsfNg4iq7N5WtOmKSoNWPiDCi4 pwyKcw0PTgm8uuYlNN73Gw55G46TrVZpbM9a6ieSD69zlgj13NzZPz9Au8WA6POMbQY+ AJL+s5wplky1oEDQOwKHngDr3SK+cxxk/r1gkk4QJIfyINaxKG4zp29JCLsgXjZYJ/x/ gEd2BWBDVdPIwHi8HDwh0yPrk19xWnMR3cFEqAPx0HLeUnHdv5hzarOAvtuEouizdAF9 d2edhpQSo+uKcOXa8tD3xx5EZqlHZOm/tEupMh2cN2GtBPOh30qRZHn899hTXxA6KBh0 MIFA== 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 bj23si2230935ejb.94.2020.08.02.22.57.17; Sun, 02 Aug 2020 22:57:38 -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 S1728229AbgHCF5K (ORCPT + 99 others); Mon, 3 Aug 2020 01:57:10 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:47636 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727889AbgHCF5J (ORCPT ); Mon, 3 Aug 2020 01:57:09 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0735WrEX068218; Mon, 3 Aug 2020 01:56:55 -0400 Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 32pap7tt2q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Aug 2020 01:56:54 -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 0735omWa026674; Mon, 3 Aug 2020 05:56:52 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma04fra.de.ibm.com with ESMTP id 32n01893t2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Aug 2020 05:56:52 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0735unTs31392074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Aug 2020 05:56:50 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C057952051; Mon, 3 Aug 2020 05:56:49 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id B7EA852052; Mon, 3 Aug 2020 05:56:49 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 79AC6E03D7; Mon, 3 Aug 2020 07:56:49 +0200 (CEST) From: Sven Schnelle To: Thomas Gleixner , Vincenzo Frascino Cc: linux-kernel@vger.kernel.org, Sven Schnelle Subject: [PATCH 1/2] vdso: allow to add architecture-specific vdso data Date: Mon, 3 Aug 2020 07:56:44 +0200 Message-Id: <20200803055645.79042-2-svens@linux.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200803055645.79042-1-svens@linux.ibm.com> References: <20200803055645.79042-1-svens@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-08-03_04:2020-07-31,2020-08-03 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 malwarescore=0 phishscore=0 spamscore=0 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008030037 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the possibility to add architecture specific vDSO data to struct vdso_data. This is useful if the arch specific user space VDSO code needs additional data during execution. If CONFIG_ARCH_HAS_VDSO_DATA is defined, the generic code will include asm/vdso/data.h which should contain 'struct arch_vdso_data'. This structure will be embedded in the generic vDSO data. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens --- arch/Kconfig | 3 +++ include/vdso/datapage.h | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/arch/Kconfig b/arch/Kconfig index 8cc35dc556c7..e1017ce979e2 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -979,6 +979,9 @@ config HAVE_SPARSE_SYSCALL_NR entries at 4000, 5000 and 6000 locations. This option turns on syscall related optimizations for a given architecture. +config ARCH_HAS_VDSO_DATA + bool + source "kernel/gcov/Kconfig" source "scripts/gcc-plugins/Kconfig" diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h index 7955c56d6b3c..74e730238ce6 100644 --- a/include/vdso/datapage.h +++ b/include/vdso/datapage.h @@ -19,6 +19,10 @@ #include #include +#ifdef CONFIG_ARCH_HAS_VDSO_DATA +#include +#endif + #define VDSO_BASES (CLOCK_TAI + 1) #define VDSO_HRES (BIT(CLOCK_REALTIME) | \ BIT(CLOCK_MONOTONIC) | \ @@ -97,6 +101,9 @@ struct vdso_data { s32 tz_dsttime; u32 hrtimer_res; u32 __unused; +#ifdef CONFIG_ARCH_HAS_VDSO_DATA + struct arch_vdso_data arch; +#endif }; /* -- 2.17.1