From patchwork Fri Jun 1 12:24:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 9079 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 86CE623E1B for ; Fri, 1 Jun 2012 12:26:38 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 548C0A18AA5 for ; Fri, 1 Jun 2012 12:26:38 +0000 (UTC) Received: by yhpp61 with SMTP id p61so1741930yhp.11 for ; Fri, 01 Jun 2012 05:26:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=CbFQxV1vOJM1A8FthiJTgKCxiJxTCyzwUeSxRS2+TXM=; b=e7y4oSJDnilnxO8pYjrSJv+uqD/evML0NZDG+nqVrJNZeOjPAq6stGAT44ZUjJSA6t hW9EwoRLWuA7s/sTE2dWNoqvEvYK5Kvz0CjaDIFMeIoAEvhrrG/ic0WzO5E2wIpUDpbs DSUGqZLkACUYFyUh7umoK14lGBceg9FGhNWXrigdIA9enoiWnvZwaJiwdPwuP/zb/Zu4 gCSuhozP0dv+IuA/0uXsZ7gduZjY+3UKO3hmMsJ40GH96hGF8VpOsI0o9sxHxILxm2L5 nZpgUUocq8/Pt7al9JpIjmOwDl7qOaKrxq1023Q6OhlnW8MgYfZsqtQ+tb9OgmWYD4XS npeQ== Received: by 10.42.155.73 with SMTP id t9mr1416939icw.48.1338553597587; Fri, 01 Jun 2012 05:26:37 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp313884ibb; Fri, 1 Jun 2012 05:26:37 -0700 (PDT) Received: by 10.68.222.9 with SMTP id qi9mr9584521pbc.164.1338553596878; Fri, 01 Jun 2012 05:26:36 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id kg6si4294258pbc.185.2012.06.01.05.26.36 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 01 Jun 2012 05:26:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) smtp.mail=anton.vorontsov@linaro.org Received: by mail-pb0-f50.google.com with SMTP id rr4so3360376pbb.37 for ; Fri, 01 Jun 2012 05:26:36 -0700 (PDT) Received: by 10.68.129.200 with SMTP id ny8mr9632054pbb.113.1338553596670; Fri, 01 Jun 2012 05:26:36 -0700 (PDT) Received: from localhost (c-71-204-165-222.hsd1.ca.comcast.net. [71.204.165.222]) by mx.google.com with ESMTPS id ub8sm2609540pbc.44.2012.06.01.05.26.35 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 01 Jun 2012 05:26:35 -0700 (PDT) From: Anton Vorontsov To: Pekka Enberg Cc: Leonid Moiseichuk , KOSAKI Motohiro , Minchan Kim , Bartlomiej Zolnierkiewicz , John Stultz , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, patches@linaro.org, kernel-team@android.com Subject: [PATCH 5/5] vmevent: Rename one-shot mode to edge trigger mode Date: Fri, 1 Jun 2012 05:24:06 -0700 Message-Id: <1338553446-22292-5-git-send-email-anton.vorontsov@linaro.org> X-Mailer: git-send-email 1.7.9.2 In-Reply-To: <20120601122118.GA6128@lizard> References: <20120601122118.GA6128@lizard> X-Gm-Message-State: ALoCoQnfM7WAQerlEunri1KtuolWL+efTn71WvMnGHUDrBbFQFQj8K+5dBUUVjvGdE58gBfM2fCX VMEVENT_ATTR_STATE_ONE_SHOT is misleading name. That is effect as edge trigger shot, not only once. Suggested-by: KOSAKI Motohiro Suggested-by: Pekka Enberg Signed-off-by: Anton Vorontsov --- include/linux/vmevent.h | 4 ++-- mm/vmevent.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/vmevent.h b/include/linux/vmevent.h index b8ec0ac..b1c4016 100644 --- a/include/linux/vmevent.h +++ b/include/linux/vmevent.h @@ -31,9 +31,9 @@ enum { */ VMEVENT_ATTR_STATE_VALUE_EQ = (1UL << 2), /* - * One-shot mode. + * Edge trigger mode. */ - VMEVENT_ATTR_STATE_ONE_SHOT = (1UL << 3), + VMEVENT_ATTR_STATE_EDGE_TRIGGER = (1UL << 3), __VMEVENT_ATTR_STATE_INTERNAL = (1UL << 30) | (1UL << 31), diff --git a/mm/vmevent.c b/mm/vmevent.c index e64a92d..46c1d18 100644 --- a/mm/vmevent.c +++ b/mm/vmevent.c @@ -104,7 +104,7 @@ static bool vmevent_match(struct vmevent_watch *watch) continue; if (attr_lt || attr_gt || attr_eq) { - bool one_shot = state & VMEVENT_ATTR_STATE_ONE_SHOT; + bool edge = state & VMEVENT_ATTR_STATE_EDGE_TRIGGER; u32 was_lt_mask = VMEVENT_ATTR_STATE_VALUE_WAS_LT; u32 was_gt_mask = VMEVENT_ATTR_STATE_VALUE_WAS_GT; u64 value = vmevent_sample_attr(watch, attr); @@ -117,7 +117,7 @@ static bool vmevent_match(struct vmevent_watch *watch) bool ret = false; if (((attr_lt && lt) || (attr_gt && gt) || - (attr_eq && eq)) && !one_shot) + (attr_eq && eq)) && !edge) return true; if (attr_eq && eq && was_eq) {