From patchwork Tue Dec 11 19:26:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 153506 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp998237ljp; Tue, 11 Dec 2018 11:26:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xv5o6zyUB8koT8fOPI0bj1aSEgZ4BebvdoLrdgGKjpNvMu6dBSKc98G26Lv22IR9mRuoBb X-Received: by 2002:a63:6906:: with SMTP id e6mr15454600pgc.144.1544556415758; Tue, 11 Dec 2018 11:26:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544556415; cv=none; d=google.com; s=arc-20160816; b=p4/du6KR/Ix91nhnrhCXBngZSEPfsOoKZVha/JE+rIrhMK1UrCgpNz96HK96/Z5WV9 Pk6pBFRJptr38sm2zAPYWieXYtR1PQgHKDHhfqPoj+WZBQtE/FDfAD8vRtO957CKs3sX m3GNiYyUtsMjcRhe6cUmH4XFFq+9D79FrP8EhfFyKJlBXRTnzK36EluCyF3/5UiY+ud1 8hm32+SbMeC/brzFCR5bGBBM7Bd81jll4JuSOrLPrWCg+uUNkkAShQzKX7yhV6E8jkiw 4kKt4zhv/QwKpxJx4wtVbR7UDV9MEyqbL2lKG/lRz6mwIOaioE30ieXCpDuDkuqas7HB 4fkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=f01C+d3CEHUVEDteq43Ligri9d0ywR/+4avlK3bOA0c=; b=zHYOBvLKRFCcrgKA4JJi6IUHxyEoLy3Rrcd4NXOIu4dckDwwRF6/4u5VbQ/LIUag6n CbqBLcgOTK5vdzpglx7yZSOX3faGjwKabDVgxikKS+kWtgLEauBu6lpjx/jl9PyU8P8D 0uQ11+AKfgXwO6km3vZqo/xTPFFDb+mFzo/j6e2qELzsH96fnuttko46WPGQv1fj86Aw CnZ6zjmgOlhYVYrreK8fW3AbNevaiVoispazdjNw0DtlUJGxik5M5sXBUh9Yq5eLnNgd 6L3OLeSvb7M4VfOVXX0l4N7Vx6mum3HDl2uejnroGrKFoK59VtdsGibulK71Gq0BNXG3 k5UA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ca6si13856544plb.141.2018.12.11.11.26.55; Tue, 11 Dec 2018 11:26:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726625AbeLKT0x (ORCPT + 31 others); Tue, 11 Dec 2018 14:26:53 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:55970 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726340AbeLKT0x (ORCPT ); Tue, 11 Dec 2018 14:26:53 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E0CB4EBD; Tue, 11 Dec 2018 11:26:52 -0800 (PST) Received: from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D0A173F6A8; Tue, 11 Dec 2018 11:26:51 -0800 (PST) From: Dave Martin To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Will Deacon , Alan Hayward , Szabolcs Nagy Subject: [PATCH 0/3] arm64/sve: UAPI: Disentangle ptrace.h from sigcontext.h Date: Tue, 11 Dec 2018 19:26:44 +0000 Message-Id: <1544556407-19897-1-git-send-email-Dave.Martin@arm.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch refactors the UAPI header definitions for the Arm SVE extension to avoid multiple-definition problems when userspace mixes its own sigcontext.h definitions with the kernel's ptrace.h (which is apparently routine). A common backend header is created to hold common definitions, suitably namespaced, and with an appropriate header guard. See the commit message in patch 3 for further explanation of why this is needed. Because of the non-trivial header guard in the new sve_context.h, patch 1 adds support to headers_install.sh to munge #if defined(_UAPI_FOO) in a similar way to the current handling of #ifndef _UAPI_FOO. Dave Martin (3): kbuild: install_headers.sh: Strip _UAPI from #if-defined() guards arm64/sve: ptrace: Fix SVE_PT_REGS_OFFSET definition arm64/sve: Disentangle from arch/arm64/include/uapi/asm/ptrace.h | 39 ++++++++++----------- arch/arm64/include/uapi/asm/sigcontext.h | 56 +++++++++++++++---------------- arch/arm64/include/uapi/asm/sve_context.h | 50 +++++++++++++++++++++++++++ scripts/headers_install.sh | 1 + 4 files changed, 97 insertions(+), 49 deletions(-) create mode 100644 arch/arm64/include/uapi/asm/sve_context.h -- 2.1.4