From patchwork Wed Jun 14 09:10:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 105487 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp194936qgd; Wed, 14 Jun 2017 02:12:37 -0700 (PDT) X-Received: by 10.84.208.102 with SMTP id f35mr3915070plh.53.1497431557398; Wed, 14 Jun 2017 02:12:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497431557; cv=none; d=google.com; s=arc-20160816; b=a0rLDRebLZu/w0ivFkQusXll6ACUJTPEeFhkv63a3S+GIWrMpfiMyA6jc0AK5LdIfr Wv0wIBxPSaugl37N2wJF+YsjMGdCe0lwObhFuSnOxU03cacNCeynhzVkTW1XYG2Jmn77 izWBa/BQpQAfav2+z5NPEn+ADOTDSpvv1kH70TEboANLTltDUN2uNFBbkA4rSetKLQwT /Dkr7J+82Sn4VoHXayZXuypjIG6E9d9lU/zc4FaPl9+EYI5wX31YOwHsTQFXzK40Wqtp Yg7Svcp8kUco07/CrWhwnWCjT98ZuxuChrXgkk3WJuXhE5FAu01FiYaKeXD1TtY2IyNW Rr3A== 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=BshG5LLXI1Zz0s6naJsWV6Qc+AIPglnX+BxHiPrLAls=; b=cTXn8V+HyU2m7N8l+qgagy6/0xT7HyikZBXbpzDJ3ufLvTba3lGlcJ1TnWwiF/VG1v PLEZ+AGcbRym2wXI5iHiFtmnEK8nsJTZ8LbwRXV3Da4wH8altzxhOZ3P1xGIKUzLE4b4 kqi6BS6YywBHhE4vH8Ygt2HFcVR1q9DB/pEYBIQV3s+awq0bQ8BVwg2y2xCTSRrihbIC XrZyT2I8SQkhawOOZO7BflbAwbKM9IEO822Uzn/GbNDyWnhPCW8iV2N5VPngt3S42M3/ l+QshNRfpljt5MgvNZ9VPTp67QJzDVIAPWmoSS7WpwumVyKHl1iK8SY945ad/5SasWva xnQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=eWg9+ogg; 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 l30si233860pli.420.2017.06.14.02.12.37; Wed, 14 Jun 2017 02:12:37 -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; dkim=pass header.i=@linaro.org header.b=eWg9+ogg; 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 S1752200AbdFNJMT (ORCPT + 25 others); Wed, 14 Jun 2017 05:12:19 -0400 Received: from mail-wr0-f180.google.com ([209.85.128.180]:35628 "EHLO mail-wr0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751459AbdFNJMR (ORCPT ); Wed, 14 Jun 2017 05:12:17 -0400 Received: by mail-wr0-f180.google.com with SMTP id q97so179924899wrb.2 for ; Wed, 14 Jun 2017 02:12:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BshG5LLXI1Zz0s6naJsWV6Qc+AIPglnX+BxHiPrLAls=; b=eWg9+oggI0SpKk6KpU1aOdN06bM0LJWkoZe3CqXdO0r2lh0qqHtKWrzDJKTGXPc0qd K79PqTGdz55Q9CoRoTZI0GvVKi677fd8R2mR4q5nf8VzIevaUJLV3DHyEiFp9e8ZPslf QyclVoCqI/AjROn27oet2M0HxLfnQc2jaO5hk= 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=BshG5LLXI1Zz0s6naJsWV6Qc+AIPglnX+BxHiPrLAls=; b=AFoc3x6nWbVnN5PsKNtPqf9t63mRUe1r0kG4/D6Gqwknr+uzHUm7CIE1nLvxbpd1K2 9017/cVxkAn5j/cG6Kv38RfVJM6RVPwgnCGYjw67Ugqoks1mErxrOflwAxjsegZl6frK wIBpgMD05AqkfvJYbikC6igZPBE3G637gPlUbCDHj8AKV+FbpeTvjzrBfLH+4erqbGYn uXaVBR5okviPYSlHJXagdjkjUSpeiwALvUSVBaZfOpZux0dhfvnW7/g2UYz1rWHw7ylA M8Yw+2XjetVIwej0TUV9aEkKvhV9Vb+fSwD548ehh4vEeaDPsMmpyE9cUh279jiRT0IP fXEw== X-Gm-Message-State: AKS2vOzbFQiSPWGAbMs2zT3PBJDFCyOORz796iypTjTvnQ5N45J9LCnx JTzkFz8eMnA9AEyo X-Received: by 10.28.71.91 with SMTP id u88mr245777wma.9.1497431516579; Wed, 14 Jun 2017 02:11:56 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:19a:b336:54d7:46e9]) by smtp.gmail.com with ESMTPSA id y17sm444935wrb.39.2017.06.14.02.11.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Jun 2017 02:11:56 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de Cc: Frank Rowand , Marc Zyngier , Mark Rutland , linux-arm-kernel@lists.infradead.org (moderated list:ARM ARCHITECTED T...), linux-kernel@vger.kernel.org (open list:CLOCKSOURCE, CLOC...) Subject: [PATCH 1/2] clocksource/drivers/arm_arch_timer: Fix read and iounmap of incorrect variable Date: Wed, 14 Jun 2017 11:10:42 +0200 Message-Id: <1497431443-14634-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20170614091021.GG2261@mai> References: <20170614091021.GG2261@mai> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Frank Rowand Fix boot warning 'Trying to vfree() nonexistent vm area' from arch_timer_mem_of_init(). Refactored code attempts to read and iounmap using address frame instead of address ioremap(frame->cntbase). Fixes: c389d701dfb70 ("clocksource: arm_arch_timer: split MMIO timer probing.") Signed-off-by: Frank Rowand Reviewed-by: Fu Wei Acked-by: Marc Zyngier Signed-off-by: Daniel Lezcano --- drivers/clocksource/arm_arch_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 4bed671..8b5c300 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -1209,9 +1209,9 @@ arch_timer_mem_frame_get_cntfrq(struct arch_timer_mem_frame *frame) return 0; } - rate = readl_relaxed(frame + CNTFRQ); + rate = readl_relaxed(base + CNTFRQ); - iounmap(frame); + iounmap(base); return rate; } From patchwork Wed Jun 14 09:10:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 105486 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp194813qgd; Wed, 14 Jun 2017 02:12:16 -0700 (PDT) X-Received: by 10.101.73.193 with SMTP id t1mr3302551pgs.115.1497431536206; Wed, 14 Jun 2017 02:12:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497431536; cv=none; d=google.com; s=arc-20160816; b=yKLr2Bi1b5+Xo43py2SQJv4KPrfKzDVWBpnXOOwjJX7oBkSCe9+zNroHLFa3LoVxKK GZm1lQgdNv1qarjSyiCU8Vpx+rfKky0yi60fU3TxrAXCQZ0/qbmdXD0IHnpwtEAP5Ujt fSLQ1f9Lt333eH9k7Hz/HGkfvGTgW3ixZAJzBkNgpv32s89rN5jzihmBDco6KrNVrzA8 tuuFGcF5QxTjTHc7zzrTYMnQUPvRVpdz+mt14poQw4D5nd0U7nEv8ZXT84DakyJJygd0 qUZNYnnovk0a9QJ3kUAYXmycDaLZrn/FvAxFQb0z8yHLCLgO7puG1H5Mn9Lvb06yLyC5 DmBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=bPGnTjLkPnAv/4EjxPXVfz7ZzS8HZGJ/F+tT92cyJkQ=; b=u+sLVS+AIVhpF4kZiYrE64CfZuHldSEJHyEB1DxWWJ0M8vnK6Sd3WqGf59vEeNNvOq VJWPWurWibOLBAT0ZL83KhYQCto3DfL548C3WkIWb3WF07kllnvxXybWqYVZ+gsKuPNy byfoAcgg9ixXQpSjSW5efBhLoX2+bbIXAxDtqE+SD3rUdNu8oYsh5oUoHo57OiMDuhnL Vy4ZcK8WuptmJJI+o+BUvzYG6xmCuMihcXXB50pfYF/ywPgnJ7ZJy3L08+ZKpdf4bWOr AXvZcGPirvH23mc3O/tiZ3Ovv1oTcjwjqjIQOWQ8sxFtqaXr6qiW416Lt7OTavlPVKAx 0Pvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=Pr5SkgRO; 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 d12si255975pln.23.2017.06.14.02.12.15; Wed, 14 Jun 2017 02:12:16 -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; dkim=pass header.i=@linaro.org header.b=Pr5SkgRO; 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 S1752139AbdFNJMG (ORCPT + 25 others); Wed, 14 Jun 2017 05:12:06 -0400 Received: from mail-wr0-f175.google.com ([209.85.128.175]:36401 "EHLO mail-wr0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751898AbdFNJME (ORCPT ); Wed, 14 Jun 2017 05:12:04 -0400 Received: by mail-wr0-f175.google.com with SMTP id 36so57990167wry.3 for ; Wed, 14 Jun 2017 02:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bPGnTjLkPnAv/4EjxPXVfz7ZzS8HZGJ/F+tT92cyJkQ=; b=Pr5SkgRO99v7u2omhD7aCJPm3vWVoSxJ187exJJhEcLjBkK27bi4ih2ElXNSYh3hh/ xl3bubW+xtt6jcIwBYEHn8y3+iHLfkJb5CsejTzwq21i10ZyQ1a1pk3Gg3QlyCCE11po 0gaC7XauG/IjuoM03rUFrrPZe0mZnqWi2B3f8= 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:mime-version:content-transfer-encoding; bh=bPGnTjLkPnAv/4EjxPXVfz7ZzS8HZGJ/F+tT92cyJkQ=; b=Sj5yiQAFaznFPyjHF1dQIouxEBbz2GKapB7XFBuo5MVEbVIEFQQtIMGXZfJ05Zj5pC Dz4LUnECW8iUwY9j9R765xD47gv0JYxiF8nQOloKYpr/hphiGVBkH6ghKoFluKkGT/8K kNZ9DL2LIlOqlZclKIxdu9+F/Tb3OV1/VJrFlNGfXn28WbkzB58uGBmaS0icpRs2GxsS 0FVJnVPgoasLCIw02NilLfVv/Md8FYeE+BqcBlTdHMa2J8bIznHrbKD5521Qg9p0iY94 3RgLwcUc0qmvJJX3TXsbSG0C1ToU5Tb1wGKNVpEHfHsyI5fNz7NQJ6b6UrnJD6Z+5NgL Nyhw== X-Gm-Message-State: AKS2vOx39JlZyAZKgRaTaPE6dHoHmGfpaHiMsjcd851HgyviNIEIpxmn ppRfJxnl3zb2OTbH X-Received: by 10.28.54.154 with SMTP id y26mr238157wmh.53.1497431518187; Wed, 14 Jun 2017 02:11:58 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:19a:b336:54d7:46e9]) by smtp.gmail.com with ESMTPSA id y17sm444935wrb.39.2017.06.14.02.11.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Jun 2017 02:11:57 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de Cc: Stephen Rothwell , Michal Simek , =?utf-8?q?S=C3=B6ren_Brinkmann?= , Maxime Ripard , Chen-Yu Tsai , kbuild test robot , linux-arm-kernel@lists.infradead.org (moderated list:ARM/ZYNQ ARCHITEC...), linux-kernel@vger.kernel.org (open list:CLOCKSOURCE, CLOC...) Subject: [PATCH 2/2] clocksource: Explicitly include linux/clocksource.h when needed Date: Wed, 14 Jun 2017 11:10:43 +0200 Message-Id: <1497431443-14634-2-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497431443-14634-1-git-send-email-daniel.lezcano@linaro.org> References: <20170614091021.GG2261@mai> <1497431443-14634-1-git-send-email-daniel.lezcano@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stephen Rothwell The kbuild test robot reported errors in these files when doing an ia64 allmodconfig build. drivers/clocksource/timer-sun5i.c:52:21: error: field 'clksrc' has incomplete type struct clocksource clksrc; ^~~~~~ drivers/clocksource/cadence_ttc_timer.c:92:21: error: field 'cs' has incomplete type struct clocksource cs; ^~ (and many more errors for these files) Cc: Michal Simek Cc: "Sören Brinkmann" Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Maxime Ripard Cc: Chen-Yu Tsai Reported-by: kbuild test robot Signed-off-by: Stephen Rothwell Acked-by: Michal Simek Signed-off-by: Daniel Lezcano --- drivers/clocksource/cadence_ttc_timer.c | 1 + drivers/clocksource/timer-sun5i.c | 1 + 2 files changed, 2 insertions(+) -- 2.7.4 diff --git a/drivers/clocksource/cadence_ttc_timer.c b/drivers/clocksource/cadence_ttc_timer.c index 44e5e95..8e64b84 100644 --- a/drivers/clocksource/cadence_ttc_timer.c +++ b/drivers/clocksource/cadence_ttc_timer.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/clocksource/timer-sun5i.c b/drivers/clocksource/timer-sun5i.c index 2e9c830..c4656c4 100644 --- a/drivers/clocksource/timer-sun5i.c +++ b/drivers/clocksource/timer-sun5i.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include