From patchwork Thu Jan 25 08:05:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 125775 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp947594ljf; Thu, 25 Jan 2018 00:09:23 -0800 (PST) X-Google-Smtp-Source: AH8x226CjoRPQd/SnAevzrISljbB2MvEaDXWB9JrmBADwBXf2996lOTzRYbJ45ziodUgzdBOWycj X-Received: by 10.99.103.69 with SMTP id b66mr12491203pgc.233.1516867762883; Thu, 25 Jan 2018 00:09:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516867762; cv=none; d=google.com; s=arc-20160816; b=oR/ArVCXkO8Pnr1Mee6JNUNP6gShWON4OswO6HotWqjJmsBKmwsHGk7sjobkXT4h3/ 0ISnQlFnC8pUCsLM2LwWYOApsBuydOY+JzJDQ44SwwXWJ7+bAHiR5jPUHTDIQ+oObnAV JP3ven2299QzjWp1G0w5Olj5Pqhdoxg7sPiyQHwBaArVoS0d//ppYBrcdGpsZhgI0DR1 ioWogSYcqxV68eC+t60U10+N6Ec3mI1mhlMhazlMVj4h1qz6RCLfSOgKCP9uCDGVMeam Gd1gi4bJfE/wYGXgRP2AdlCFb7xpjGjWAqY/v+l/JvPElUfXGQQF2I5l+0CGRQ8jogvt uOsg== 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=z1EAxKBtXpjVa1Fp1TBI39yS4WRTJx73oJGiaxDNNqU=; b=cQFxK48BSBF9QzZNy+EkaO3+PB1SPFnOZTinx2m2pvEERKczeK9fdvWa1xUaYnTiNS xN5uPO/xzNE2zp/UklEvimjXuPDyOmPvgQGOhW48Ia61GsY3aqQBopd2HwXj6XSnRe3l JHuT9sTtDt6kWHfYbhk9rwLAxfAB9GuTWZ35CnhR5NHkVs74TPVWiFBYYu8NNlHN+UVG zdLjW0qTj6Sgt0Bz3vdkrPXKmUXf8yJ+yTFK/ffu1FnaaBtYPB+S9+4gNjTGly/7YiMU EEIGnSHVJc52eA+WbWxhbZTBZE3jSPP20GmE4DznvSBxmp2Ry7WsKCc96P0LelXG7DsU 0xYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jbNl3ua7; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v203si1255759pgb.474.2018.01.25.00.09.22; Thu, 25 Jan 2018 00:09:22 -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=@linaro.org header.s=google header.b=jbNl3ua7; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751287AbeAYIJU (ORCPT + 28 others); Thu, 25 Jan 2018 03:09:20 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:38850 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751081AbeAYIJT (ORCPT ); Thu, 25 Jan 2018 03:09:19 -0500 Received: by mail-pg0-f67.google.com with SMTP id y27so4594077pgc.5 for ; Thu, 25 Jan 2018 00:09:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=z1EAxKBtXpjVa1Fp1TBI39yS4WRTJx73oJGiaxDNNqU=; b=jbNl3ua7rQCfIa+CTLCK2NU/Y7LrwVQ2UMkNb64oQ89kF6mO+9Fl4JdI3YgrE2ztoa 4QMZM0Q9kSBLmwl+Oew9JnVnznucACSG6sgsKk5KXRhH8rZRt6YitdMJk43Y2/gT0gGx xhLy8MuKg6o54GYvnHWDBlwjw3Pz4HvzbNjPI= 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=z1EAxKBtXpjVa1Fp1TBI39yS4WRTJx73oJGiaxDNNqU=; b=Z34tnd4O/OUlmlZUTr459OqSpm0JCJgzKwYS/B24i05zQnZ28EQabgZi2mon9ZTIwZ i+JRRfD5emNimvVWlzex8qOSVJPkB8kfsZflqGOuOKuuNiwBa+VNeKKMRcWATV+klEe3 /29reyStnlY+fTSi9LfbznzvaCP3e6GsOiv+8fisOki2dd8ZKkZwcFdAD5Ve0l4vyd04 emELTym7J0y5YaazT180mH2FEaOF7ltVEBR31JaKZrzOSs28+fbqyGfoVp68OK1D0QUz G4cT52BJBM7I5ZT0+abAfOmlbbS5xpvGUvVaF+vECqTYFtPM5XxuIv6NJjpnncGyw3O/ 3UXQ== X-Gm-Message-State: AKwxytcv4u1vS0hvUsSG711fubX7xaq0ddfRxKY4JliDRwAk4zD9E5nl lgyo2SU6196pdhZd7xPtWu0pEo5/wF0= X-Received: by 2002:a17:902:848c:: with SMTP id c12-v6mr10876243plo.329.1516867758821; Thu, 25 Jan 2018 00:09:18 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id f80sm12059391pfa.1.2018.01.25.00.09.15 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Jan 2018 00:09:18 -0800 (PST) From: Baolin Wang To: jason.wessel@windriver.com, daniel.thompson@linaro.org Cc: baolin.wang@linaro.org, mingo@kernel.org, arnd@arndb.de, broonie@kernel.org, kgdb-bugreport@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] kdb: Change timespec to use timespec64 Date: Thu, 25 Jan 2018 16:05:54 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since struct timespec is not y2038 safe on 32 bit machines, thus replace uses of struct timespec with struct timespec64 in the kernel. Signed-off-by: Baolin Wang --- kernel/debug/kdb/kdb_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 1.7.9.5 diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index c8146d5..c20c61e 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c @@ -2488,7 +2488,7 @@ struct kdb_tm { int tm_year; /* year */ }; -static void kdb_gmtime(struct timespec *tv, struct kdb_tm *tm) +static void kdb_gmtime(struct timespec64 *tv, struct kdb_tm *tm) { /* This will work from 1970-2099, 2100 is not a leap year */ static int mon_day[] = { 31, 29, 31, 30, 31, 30, 31, @@ -2521,8 +2521,8 @@ static void kdb_gmtime(struct timespec *tv, struct kdb_tm *tm) */ static void kdb_sysinfo(struct sysinfo *val) { - struct timespec uptime; - ktime_get_ts(&uptime); + struct timespec64 uptime; + ktime_get_ts64(&uptime); memset(val, 0, sizeof(*val)); val->uptime = uptime.tv_sec; val->loads[0] = avenrun[0]; @@ -2539,7 +2539,7 @@ static void kdb_sysinfo(struct sysinfo *val) */ static int kdb_summary(int argc, const char **argv) { - struct timespec now; + struct timespec64 now; struct kdb_tm tm; struct sysinfo val; @@ -2554,7 +2554,7 @@ static int kdb_summary(int argc, const char **argv) kdb_printf("domainname %s\n", init_uts_ns.name.domainname); kdb_printf("ccversion %s\n", __stringify(CCVERSION)); - now = __current_kernel_time(); + now = current_kernel_time64(); kdb_gmtime(&now, &tm); kdb_printf("date %04d-%02d-%02d %02d:%02d:%02d " "tz_minuteswest %d\n",