From patchwork Tue Apr 29 21:21:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 29375 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0F42C202DD for ; Tue, 29 Apr 2014 21:21:39 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id x10sf3203744pdj.7 for ; Tue, 29 Apr 2014 14:21:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=AlnJsV/2K73UUnjzXJnc1mOlIZvyxr9kyeTW+pnsR+g=; b=OdqK4/v7mrp78YoDKNutC9b6jAd5ZjrFezORyEqbDuIUueYWSNkchkqfMqvX9EpRDs Tbzjii+CgOcByCiaPhle6TmKQykeAJoCh623vnA4j3a6SLSRkIbgd6LncHN3XDB+vhtY pIUXYUcw0ewC29x2s9hVT6gN0DjCaleBwtjMK2ifUa3to/QazgFHUTtvaoPvbxPBfXkv OsKVtfV6VB/BD2sKaZbiCAL1LpBoHkLyIOTjWbDCeDSOLg/YlCu7cyjaMHaBxLOMmqGR pQjSnfaEkPstCEe7kVx4dkUrYFEvprKgMZc0BOTam5KrWobwBTNiqjBnvXKWrlXpZ0W0 ZmCQ== X-Gm-Message-State: ALoCoQnP5r2/MCjWpkRqj2DDVuOKcZNyrZSjw2cvJmI2ees6RrixM5GqlGWcQGZz8zn8exgsKQdE X-Received: by 10.66.233.65 with SMTP id tu1mr121486pac.35.1398806499000; Tue, 29 Apr 2014 14:21:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.203 with SMTP id 69ls308012qgl.35.gmail; Tue, 29 Apr 2014 14:21:38 -0700 (PDT) X-Received: by 10.220.83.4 with SMTP id d4mr101507vcl.39.1398806498843; Tue, 29 Apr 2014 14:21:38 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id tc5si4841110vcb.215.2014.04.29.14.21.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Apr 2014 14:21:38 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id jy13so1036990veb.2 for ; Tue, 29 Apr 2014 14:21:38 -0700 (PDT) X-Received: by 10.220.191.134 with SMTP id dm6mr193250vcb.16.1398806498728; Tue, 29 Apr 2014 14:21:38 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp228812vcb; Tue, 29 Apr 2014 14:21:38 -0700 (PDT) X-Received: by 10.66.227.104 with SMTP id rz8mr645644pac.74.1398806497540; Tue, 29 Apr 2014 14:21:37 -0700 (PDT) Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by mx.google.com with ESMTPS id oz6si14313900pac.92.2014.04.29.14.21.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Apr 2014 14:21:37 -0700 (PDT) Received-SPF: none (google.com: john.stultz@linaro.org does not designate permitted sender hosts) client-ip=209.85.192.175; Received: by mail-pd0-f175.google.com with SMTP id fp1so717299pdb.34 for ; Tue, 29 Apr 2014 14:21:37 -0700 (PDT) X-Received: by 10.66.191.134 with SMTP id gy6mr457941pac.27.1398806496962; Tue, 29 Apr 2014 14:21:36 -0700 (PDT) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id yv7sm118814095pac.33.2014.04.29.14.21.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Apr 2014 14:21:36 -0700 (PDT) From: John Stultz To: LKML Cc: John Stultz , Andrew Morton , Android Kernel Team , Johannes Weiner , Robert Love , Mel Gorman , Hugh Dickins , Dave Hansen , Rik van Riel , Dmitry Adamushko , Neil Brown , Andrea Arcangeli , Mike Hommey , Taras Glek , Jan Kara , KOSAKI Motohiro , Michel Lespinasse , Minchan Kim , Keith Packard , "linux-mm@kvack.org" Subject: [PATCH 1/4] swap: Cleanup how special swap file numbers are defined Date: Tue, 29 Apr 2014 14:21:20 -0700 Message-Id: <1398806483-19122-2-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1398806483-19122-1-git-send-email-john.stultz@linaro.org> References: <1398806483-19122-1-git-send-email-john.stultz@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The SWP_HWPOISON and SWP_MIGRATION numbers are defined in a fairly awkward way. Since they are stolen from the top few values of the 1<). As long as the enum values are added to the top of the enum instead of the bottom, the values for the types will be preserved. Cc: Andrew Morton Cc: Android Kernel Team Cc: Johannes Weiner Cc: Robert Love Cc: Mel Gorman Cc: Hugh Dickins Cc: Dave Hansen Cc: Rik van Riel Cc: Dmitry Adamushko Cc: Neil Brown Cc: Andrea Arcangeli Cc: Mike Hommey Cc: Taras Glek Cc: Jan Kara Cc: KOSAKI Motohiro Cc: Michel Lespinasse Cc: Minchan Kim Cc: Keith Packard Cc: linux-mm@kvack.org Signed-off-by: John Stultz --- include/linux/swap.h | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/include/linux/swap.h b/include/linux/swap.h index 3507115..a32c3da 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -49,29 +49,38 @@ static inline int current_is_kswapd(void) * actions on faults. */ +enum { + /* + * NOTE: We use the high bits here (subtracting from + * 1<