From patchwork Thu Oct 12 14:26:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 115636 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2003803qgn; Thu, 12 Oct 2017 07:26:46 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCwJ0Xj3RsO/hohrUdVMQ7+i1ssloTblPbunYYDruwZcwGZLDyewZj2LukNtLSbkM/XcZrI X-Received: by 10.99.122.92 with SMTP id j28mr404023pgn.154.1507818405972; Thu, 12 Oct 2017 07:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507818405; cv=none; d=google.com; s=arc-20160816; b=tw2mMCemoPWCXLZYxd8C2pccASYgUVHY20XYLiKWGTl+NXJM3/lWnqRci0ysEDW2Al xNRj/r2quwBBkZYk/Zqj58JSHCcM6RCfoAFgtN1AoXC38wqVtojYsYTp3oSNyy6/BcuE GJLSOYosoT71h76kR4iIoV2m75zQagIqBEMQt7InJ9GdU6cMYrp0tq/sYfG/lh4TWumI Uutd8woHjpaMzg8FIiGbAgeeQb7PQn2jxgdBzMCVsUjxZUHajYnSGto/DxRa3GCoJc1/ KSv5fRZy/mQSzq6pUnpwI8l9zxj+HYoBascWkeWT6wFX9UmW4zrZqFPkNQuGk53tXnTo ixpA== 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 :arc-authentication-results; bh=hD9w37PgmfqfsqsEk/iS7Mu5KsDgBh44AYcIJ9Prc+Y=; b=wAt4NlPohuqdPgh2anY6EV7bNF/ugbvDybNrVq4aIY5qfAcupTB8QHziZUjWy2bqtj QekWvmwwMHcU+8X+S2tM2NX3US5uUVnERW8lqWzrYYB4GJz4L8YGE+VYZEhD9QY/aJ0V wVyYM8AkM/z00jHK97wMB2buWqsgR1WrzCOafBLKDZhqiTDtbp6ONnEOFmM3lPLZWhRa uBInTEPkxBBLleiNAKK4flU9AALVaVB0o0MkPMFaSaz9K/OIst7PPeXre8lYDdbvhHJB DUUe/2Ju+UQJX+U4UVUYnJLwZcj0+B0fQlcTZZ8BUGqSfbJC5AOd2Zv2WwDa2wD3xjF8 p0PA== 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 k5si11490462pgs.821.2017.10.12.07.26.45; Thu, 12 Oct 2017 07:26:45 -0700 (PDT) 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 S1752895AbdJLO0o (ORCPT + 27 others); Thu, 12 Oct 2017 10:26:44 -0400 Received: from foss.arm.com ([217.140.101.70]:47874 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752158AbdJLO0P (ORCPT ); Thu, 12 Oct 2017 10:26:15 -0400 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 CEF551529; Thu, 12 Oct 2017 07:26:14 -0700 (PDT) Received: from edgewater-inn.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 9FCB03F236; Thu, 12 Oct 2017 07:26:14 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 5865A1AE2DAC; Thu, 12 Oct 2017 15:26:18 +0100 (BST) From: Will Deacon To: paulmck@linux.vnet.ibm.com Cc: linux-kernel@vger.kernel.org, mcree@orcon.net.nz, peterz@infradead.org, rth@twiddle.net, ink@jurassic.park.msu.ru, mattst88@gmail.com, linux-alpha@vger.kernel.org, Will Deacon Subject: [PATCH 0/3] Remove lockless_dereference Date: Thu, 12 Oct 2017 15:26:14 +0100 Message-Id: <1507818377-7546-1-git-send-email-will.deacon@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 Hi all, These patches remove lockless_dereference from the kernel. It's only used in a handful of places relative to READ_ONCE and ACCESS_ONCE and is only required for correctness on Alpha. Consequently, READ_ONCE is strengthened on Alpha systems to include the smp_read_barrier_depends implicitly and Alpha's release and release atomic_t and atomic64_t operations are also upgraded. The nastiest part about all of this was actually fixing the circular includes of compiler.h, which is an existing problem that doesn't crop up in practice because lockless_dereference is rarely used. Thanks, Will --->8 Will Deacon (3): linux/compiler.h: Split into compiler.h and compiler-types.h locking/barriers: Kill lockless_dereference alpha: atomics: Add smp_read_barrier_depends() to release/relaxed atomics Documentation/memory-barriers.txt | 12 - .../translations/ko_KR/memory-barriers.txt | 12 - arch/alpha/include/asm/atomic.h | 13 + arch/arm/include/asm/ptrace.h | 3 +- arch/x86/events/core.c | 2 +- arch/x86/include/asm/mmu_context.h | 4 +- arch/x86/kernel/ldt.c | 2 +- drivers/md/dm-mpath.c | 20 +- fs/dcache.c | 4 +- fs/overlayfs/ovl_entry.h | 2 +- fs/overlayfs/readdir.c | 2 +- include/linux/compiler-clang.h | 2 +- include/linux/compiler-gcc.h | 2 +- include/linux/compiler-intel.h | 2 +- include/linux/compiler-types.h | 274 ++++++++++++++++++++ include/linux/compiler.h | 286 +-------------------- include/linux/linkage.h | 2 +- include/linux/rculist.h | 4 +- include/linux/rcupdate.h | 4 +- include/uapi/linux/stddef.h | 2 +- kernel/events/core.c | 4 +- kernel/seccomp.c | 2 +- kernel/task_work.c | 2 +- mm/slab.h | 2 +- scripts/headers_install.sh | 2 +- 25 files changed, 325 insertions(+), 341 deletions(-) create mode 100644 include/linux/compiler-types.h -- 2.1.4