Received: by 10.223.164.202 with SMTP id h10csp656466wrb; Mon, 6 Nov 2017 13:05:29 -0800 (PST) X-Google-Smtp-Source: ABhQp+SrPLbFM7B0JdXy93e7GMkPBQ+SIaIfDIFql/dMW9u8xLUvtfiT7ji7Wg5fa8zTIDYb8Zi1 X-Received: by 10.84.217.206 with SMTP id d14mr16109599plj.196.1510002329403; Mon, 06 Nov 2017 13:05:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510002329; cv=none; d=google.com; s=arc-20160816; b=uZ+r8G4vp29RV3ngpO7Xd8YiI5ye4SqkLqCUJKth5aL+DDbCLTjpnwkTU9DpJmHAEb ME67dzRLEIRaKNiZ8ZILSoiKu6maMpOP6Fa4LMsUk9EVD7WY/mLvBd7ekxD3t9I++8kh 1JqJBVwm7jsXqlWn/m6UzXQf2NJzoqEPHe3dLyw56ZgjPyWIc7iiyx47FfcqI4/OHciE p97Od/ivaZF+LOuW3KPs8QJmmOaZkZn7qAhe7QKvauIJ8qH2TgqnCZTb6L/ylHx/inNK Vy3l9eXnZ11wvGZ+OBjD4PzauNXTSvHIFuQTIT4j3ch24UAUrpYSnO2vm5pqgXdn+kxF pnYw== 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 :dkim-signature:arc-authentication-results; bh=AYmaPPEKumT52nHpH8A+hdqRpSP9ESBL14AOkp9F4+s=; b=vNIuGIOfkJ6VGV0Yn+mQMUZmZQZ6b9EqGvl1ilK3RPFoAy1uNmBKMlfvaGalOOigaF rm5fua8G/3XiH8yfrvqls36OyQnq/KL05Og6dyrESluicAbRMsmKE1L4UBje9ECFYggo cS6LggbqNUkBlZGWLA6n4TGTdtncICpmyyUVRJlfu0tD7WbR3hk1YrvRddY2VbTEfUT7 ebqV4Ud8r3HaAQx2dtymboWtNGeCvOvz2CQp8NjjCIc1ZIyELV8sS+Vbm7RnspthicSF 8DJC+A/hdDaJQrXD0R8ti2buOR6gdPQkDMEUApzV7fcccw6kR4B41KfbBUCelYHHLvps Ljbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@android.com header.s=20161025 header.b=FSyNBDtE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=android.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s188si11633914pgb.646.2017.11.06.13.05.16; Mon, 06 Nov 2017 13:05:29 -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; dkim=pass header.i=@android.com header.s=20161025 header.b=FSyNBDtE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=android.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753685AbdKFVA6 (ORCPT + 95 others); Mon, 6 Nov 2017 16:00:58 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:47722 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750922AbdKFVAy (ORCPT ); Mon, 6 Nov 2017 16:00:54 -0500 Received: by mail-io0-f196.google.com with SMTP id h70so17178202ioi.4 for ; Mon, 06 Nov 2017 13:00:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=android.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=AYmaPPEKumT52nHpH8A+hdqRpSP9ESBL14AOkp9F4+s=; b=FSyNBDtE+ubWt2gWCcMHXY5oUdtxgFV4Rlk4MWt02XOg/psY5nQYWyuXQYPhov873B z9P4Q9S/8zXB2fGhf+lkVabN+aCRf1qX9u2wKq5o2Mck3w0LbOArydC7FVZk2Pku/OOB D7M9m9kdBWvlZjM/ZdHU8VdqbHB2QkA0iEV+OSc+gdFTZFxLxagcSJTfSZEnLVhgtdeF 1OVAFiEjsZSr8WfMeuHeUB7M+8pN8lV+LukreDcukrdCKjwKxFStfDoCefxZ6wpISLGk gZ9yeQbEY1tSsPGuJ+LynbtiubUOwQIef+XFJ9wItNeh+4bxs+v8BDQJeENERrBLwmqe 3FiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AYmaPPEKumT52nHpH8A+hdqRpSP9ESBL14AOkp9F4+s=; b=H8PC6KYe9xPzStBw1YUerVQtBDyERfqVRkFhHICYtiEg8xUAP8rBPCBYf9ecfLjr0k 7U1NhRVRBodLreJrVopvQN1G7eXsjEwN+/XT+w4ZQwVS/TZCFV7WUmuj3gYQXSDlRXzR syer9HOFQR8cjFCHyoQoaSmZIKYtnlh460UlifCSfsT/Ib9ajcUrQHOpoTSNAN+zJEIo bPcul0Ll9n+7CDgiaqbpqIQCJX525flFRJSJ7tKzliAL6FkkC7Zecbjg9zvICjopdRHU +gaOP40IRuTkpefi+cZAe+qbDar2kToT6Ok9apeVqEjU2hcBfQLKfOxfYZK3W3+Z/35R riBw== X-Gm-Message-State: AJaThX65OCjQ/kqEbxNDRG5uGAlRu3mvF1v7MboXNeguCySQViOZMTpQ SiSNkox8XCivXU/OyYOTuTy7lFCLOTw= X-Received: by 10.107.174.94 with SMTP id x91mr20510105ioe.224.1510002053704; Mon, 06 Nov 2017 13:00:53 -0800 (PST) Received: from nebulus.mtv.corp.google.com ([100.98.120.17]) by smtp.gmail.com with ESMTPSA id 133sm4841427itw.24.2017.11.06.13.00.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Nov 2017 13:00:53 -0800 (PST) From: Mark Salyzyn To: linux-kernel@vger.kernel.org Cc: Mark Salyzyn , James Morse , Russell King , Catalin Marinas , Will Deacon , Andy Lutomirski , Dmitry Safonov , John Stultz , Mark Rutland , Laura Abbott , Kees Cook , Ard Biesheuvel , Andy Gross , Kevin Brodsky , Andrew Pinski , linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 00/12] arm+arm64: vdso unification to lib/vdso/ Date: Mon, 6 Nov 2017 13:00:31 -0800 Message-Id: <20171106210048.94494-1-salyzyn@android.com> X-Mailer: git-send-email 2.15.0.403.gc27cc4dac6-goog Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Take an effort to recode the arm64 vdso code from assembler to C previously submitted by Andrew Pinski , rework it for use in both arm and arm64, overlapping any optimizations for each architecture. But instead of landing it in arm64, land the result into lib/vdso and unify both implementations to simplify future maintenance. This will act as the basis for implementing arm64 vdso32 in the future. apinski@cavium.com made the following claims in the original patch: This allows the compiler to optimize the divide by 1000 and remove the other divides. On ThunderX, gettimeofday improves by 32%. On ThunderX 2, gettimeofday improves by 18%. Note I noticed a bug in the old implementation of __kernel_clock_getres; it was checking only the lower 32bits of the pointer; this would work for most cases but could fail in a few. Signed-off-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Andy Lutomirski Cc: Dmitry Safonov Cc: John Stultz Cc: Mark Rutland Cc: Laura Abbott Cc: Kees Cook Cc: Ard Biesheuvel Cc: Andy Gross Cc: Kevin Brodsky Cc: Andrew Pinski Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org v2: - split first CL into 7 pieces, there were cosmetic adjustments. - make sure profiling is turned off. - kept quiet_cmd_vdsoas. v3: - changed are a result of private email review comments - rebase - move arch/arm/vdso/vgettimeofday.c to lib/vdso/vgettimeofday.c - adjust vgettimeofday.c to be a better global candidate, switch to using ARCH_PROVIDES_TIMER and __arch_counter_get() as more generic. - do not expose gettimeofday if arch does not support user space timer v4: - update commit messages to reflect reasoning here. - switch to arch_vdso_read_counter as common API. - split out ARCH_CLOCK_FIXED_MASK. - Use GENMASK_ULL macro for ARCH_CLOCK_FIXED_MASK. - dropping forced inline patch and side effects. - replace all typeof()s with the appropriate types vdso_wtm_clock_nsec_t, vdso_xtime_clock_sec, vdso_raw_time_sec_t, long (tv_nsec) and __kernel_time_t (tv_sec). - clock_getres implementation, use clock instead of clock_id to match usage elsewhere and remove an inconsistency. - simplify arm64 implementation of arch_vdso_read_counter, use read_sysreg. v5: - fixes and changes inspired by compiling with clang. Makefile and portability issues identified. clang build produced a bad arm64 vdso binary until proper compile flags were provided. - arm compile issue, replace erroneous tk->raw_time.shift with tk->tkr_raw.shift. - changes inspired by compat architectural portability, minimize include files in vgettimeofday.c that notoriously include unnecessary architectural cruft and defer them to vdso compiler.h. Problematic direct and indirectly included files are asm/arch_timer.h, asm/processor.h, asm/sysreg.h, linux/jiffies.h, linux/hrtimer.h and linux/time.h. - do not use timespec_add_ns as not accessible via uapi/linux/time.h. - strip out unused definitions in asm-offsets.c. From 1583342569880692695@xxx Mon Nov 06 18:32:22 +0000 2017 X-GM-THRID: 1583067986936830066 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread