From patchwork Fri Nov 10 22:42:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 118606 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp8488820qgn; Fri, 10 Nov 2017 14:44:00 -0800 (PST) X-Google-Smtp-Source: AGs4zMbHGd/H1WTcLWIlA2mEwNWd1Wf7nPhJa6Ci6XeGAePqRaBGNaMJiz4/5jDdreZEUT2LViE4 X-Received: by 10.84.174.1 with SMTP id q1mr1906448plb.220.1510353840719; Fri, 10 Nov 2017 14:44:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510353840; cv=none; d=google.com; s=arc-20160816; b=Em77JBgwsZYIQSvAuXIx/AykFB6+6jR0XoTIm+LZ2DtnaRzGW10A2zhR1ivaIvaSy2 ZPL6gMiOmJsyICRk51g6jUg7jkjxdIc8uwZCf6eFI+F66O85YoBcvBVAvpLSway/fUS7 ywD4inGLoVIW2GXEAoOYiC7SgoOHzb8F/OrWHz9AIk/2oNP2R2b4299Uq+xlq36KLxzK Zl0MgRpjzLliXQwRoMo7HAdxYpQnFmyND/9xt9/nb7azGd8ICA6CEndZWCGM6780vrJ5 FhQsGh/hNnIRRSRJXXeN7Q1cNfFSMrtnshlHleny/7ye7gc1nKkd6e85QmYPbkbH4S4+ c/sA== 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:dkim-signature:arc-authentication-results; bh=OYe9yututHFLlA6rMkPfxZOYIH3VPJV8GqqrL+2NFxs=; b=eARAdeN5nz5c34DUqEmyoEc4j3hIZx3J/GtKyqyEHRW48BZ2dBs0PQArNfOokdbDL9 gaO2RG0oAxv7W2vHQAAOPLDeTwouiOekXE2UzdYXvuky4Ob+DAW1t0X0L3QwpuwIDZ29 gk9LQXj+6UaCYIFHuPhyZifw4lbyw+q/xBjMVch9BPT4+PfqvPTLN9kQoqUyXdZuNImS MYhZAelvXtkKDiMGfb0bCnPLlJk2TjHuKX4tZh52YCvaMHtGMQXDXFPtoj2fOAfHWVPl WkamVlC4LG3l/Id1O0AumCIfH6G65gNu8FibrSSiCEHHYhpQ1tpx9OTua+F/BANenp97 Uucw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=arKLrRan; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f10si3718583pfe.208.2017.11.10.14.44.00; Fri, 10 Nov 2017 14:44:00 -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=@gmail.com header.s=20161025 header.b=arKLrRan; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754940AbdKJWn7 (ORCPT + 27 others); Fri, 10 Nov 2017 17:43:59 -0500 Received: from mail-qk0-f193.google.com ([209.85.220.193]:51046 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754877AbdKJWn4 (ORCPT ); Fri, 10 Nov 2017 17:43:56 -0500 Received: by mail-qk0-f193.google.com with SMTP id p7so13721112qkd.7 for ; Fri, 10 Nov 2017 14:43:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OYe9yututHFLlA6rMkPfxZOYIH3VPJV8GqqrL+2NFxs=; b=arKLrRansGa5prIHQm/HiN4DJMry1GOv2p6Y12s0qqjtDVyEfhXFIg3cGptKQwkfxh c8e2yCMXivdnJ8nHuubmyr+friGzjkDnmlzkO1aqhqvmRmx78RXG2+oNK0tF1OZINLQW fUYssJNWA2uf0E6tQxAjuKjRQ5rzN8RbGW4FYKF/q37b5dZaq0MHrW0PEFWDGcPWxinO GrTXG0BCfol4tVzdVHbVe5NLiT9rlssBFtS3OR7cdP6rAPQRLc0+k7TFpR3fpCFCeo3H cQWaMWpuOWEqN2d2YS7BY2KwOSAlWDdUt6Awp0/8u0IksJMxuig8/dm9HEGcNqpgyVc5 jq/g== 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:in-reply-to :references; bh=OYe9yututHFLlA6rMkPfxZOYIH3VPJV8GqqrL+2NFxs=; b=CEDoLEKy3IkdLPjskjhb2Isht//WETvU+jjHIL7MIYZ09B2bzb5zFZ9BQl47d3a8UB /Kldl1dHVHpXjLEfkDtt8ZWv52vYN5Unb9lAKVcTTd6moxyHly4ATP0rSgSC7ze6+bNm +T+s2PCYU5d+kPcwjCfvXQ5G0ZvB5kCaxtH2PuovmJUwqts0c5ge98hb8uoIOHAruKZ1 HfmwCkeqjc2WWB5ZAdmOHCBjJUKYO2+ieRrqNVuSG8Z0joTrIIOSGbc9BR/n0mqDvPFu 6jGuyq8iEx+sJJ8oxHW3uOgmjBuPJV0MBsyxXM3cQz5mI1AoIr/K4n1TEeeCaSOfkHup jK+Q== X-Gm-Message-State: AJaThX7RDrB3dSCVb75kvlsKHxPPTohwmjlIU1QkWjNuEHBHykTZ18aM a3VGNUr01P5npcCPzHLHdIk= X-Received: by 10.55.44.3 with SMTP id s3mr3215737qkh.122.1510353835731; Fri, 10 Nov 2017 14:43:55 -0800 (PST) Received: from localhost.localdomain ([2601:647:5000:6620:39ae:25d9:c1b6:63dd]) by smtp.gmail.com with ESMTPSA id y7sm6997341qke.58.2017.11.10.14.43.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Nov 2017 14:43:55 -0800 (PST) From: Deepa Dinamani To: tglx@linutronix.de, john.stultz@linaro.org Cc: linux-kernel@vger.kernel.org, arnd@arndb.de, y2038@lists.linaro.org Subject: [PATCH 5/9] y2038: introduce CONFIG_64BIT_TIME Date: Fri, 10 Nov 2017 14:42:55 -0800 Message-Id: <20171110224259.15930-6-deepa.kernel@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171110224259.15930-1-deepa.kernel@gmail.com> References: <20171110224259.15930-1-deepa.kernel@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann There are a total of 53 system calls (aside from ioctl) that pass a time_t or derived data structure as an argument, and in order to extend time_t to 64-bit, we have to replace them with new system calls and keep providing backwards compatibility. To avoid adding completely new and untested code for this purpose, we introduce a new CONFIG_64BIT_TIME symbol. Every architecture that supports new 64 bit time_t syscalls enables this config via ARCH_HAS_64BIT_TIME. After this is done for all architectures, the CONFIG_64BIT_TIME symbol can be made a user-selected option, to enable users to build a kernel that only provides y2038-safe system calls by making 32 time_t syscalls conditionally included based on the above config. Signed-off-by: Arnd Bergmann Signed-off-by: Deepa Dinamani --- arch/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.11.0 diff --git a/arch/Kconfig b/arch/Kconfig index 8911ff37335a..3266ac1a4ff7 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -875,6 +875,17 @@ config OLD_SIGACTION config COMPAT_OLD_SIGACTION bool +config ARCH_HAS_64BIT_TIME + def_bool n + +config CONFIG_64BIT_TIME + def_bool ARCH_HAS_64BIT_TIME + help + This should be selected by all architectures that need to support + new system calls with a 64-bit time_t. This is relevant on all 32-bit + architectures, and 64-bit architectures as part of compat syscall + handling. + config ARCH_NO_COHERENT_DMA_MMAP bool