Message ID | 1528164594-23823-4-git-send-email-linuxram@us.ibm.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show
Return-Path: <linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org> X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 410Fqg17tKz9rxs for <patchwork-incoming@ozlabs.org>; Tue, 5 Jun 2018 12:19:27 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=us.ibm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FfLVTnHe"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 410Fqf6pHCzF1QD for <patchwork-incoming@ozlabs.org>; Tue, 5 Jun 2018 12:19:26 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=us.ibm.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FfLVTnHe"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400d:c0d::22a; helo=mail-qt0-x22a.google.com; envelope-from=ram.n.pai@gmail.com; receiver=<UNKNOWN>) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=us.ibm.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FfLVTnHe"; dkim-atps=neutral Received: from mail-qt0-x22a.google.com (mail-qt0-x22a.google.com [IPv6:2607:f8b0:400d:c0d::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 410FdK40pfzF1SJ for <linuxppc-dev@lists.ozlabs.org>; Tue, 5 Jun 2018 12:10:29 +1000 (AEST) Received: by mail-qt0-x22a.google.com with SMTP id i18-v6so817034qtp.12 for <linuxppc-dev@lists.ozlabs.org>; Mon, 04 Jun 2018 19:10:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=5ryqiJI37HO+n8CSXcXRn7rnWjLlvyldS9jd192nSX0=; b=FfLVTnHegSPgACwwCuxu8yAA5u0XLh6dvYCpTuvQqxdHixaTgThdPC3hz9s62GhBrd OEsyypm85KKzKxL8tWxLIiRieSBQ0zOcFYJFQ4MFT3Hl+EkT20WzJVp7LujZTztoU29F B8PvMu2OSM7qbdRVE2GLxfgV4Y8/B0BTOh1ut0fBOH+NikLguWISzeL1osyVZWnYqKrx INb6cOgebXxe4VWb6iF1z59A1TVHlWWZetEcOL1KK+H49nqJu3HeDdTclIZTMt/F06TI zyEGniv/jOlXFwNY93PbRrKJGjcDLF15HDY7Zgn2LFk6op+iswGo3pUpFm74wv3lDayn 3YLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=5ryqiJI37HO+n8CSXcXRn7rnWjLlvyldS9jd192nSX0=; b=TPptAtVVX4NVDXNmOaUufEBEHlAeYXTP8ODiySa52bQrSGU3AMDKxiioOmDCEy6f6S c9Qqhz1qY+sXhSyCyp2/zwNv53L6edwEdG14I3Da4UpIFo2pBJx4lU4bLhxInccHRlNC 0zpJeDcUhPG6qUSpPHC0CPtaDahCA1Ku1UuFiNIwXviHmWDGu+jQM7Yd9Yf7zRZ+NkhA gbh3pLmBdlIpCuykcerEyiTG2u9/O1vkvpj8jGxBOyuN7hKbQgXWwqob6dJQVqzSMngH gKuXUZky1Mf5zHzlbi3BNYmWAURP7AT5vOjrFX0yEjH00eCkI8GgoQGEjOxAjBhEjb+T iv5A== X-Gm-Message-State: APt69E3VZ1jiaRZv1ouFPnKC4yG/8oiEzR7o2b8OffrCHOQVdkshH3aV je0emaBH8DKehmVInrtC5UI= X-Google-Smtp-Source: ADUXVKI/5judXHhjpdDP5yHJQCIZe01UUaCfq0KQ46g6QAWyLnUTZiBOcelB0j0YgtTEINpYgCg4CA== X-Received: by 2002:ac8:29fd:: with SMTP id 58-v6mr6587944qtt.174.1528164627106; Mon, 04 Jun 2018 19:10:27 -0700 (PDT) Received: from localhost.localdomain (50-39-100-161.bvtn.or.frontiernet.net. [50.39.100.161]) by smtp.gmail.com with ESMTPSA id b52-v6sm39476917qta.58.2018.06.04.19.10.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 19:10:26 -0700 (PDT) From: Ram Pai <linuxram@us.ibm.com> To: mpe@ellerman.id.au Subject: [PATCH 3/5] powerpc/pkeys: fix calculation of total pkeys. Date: Mon, 4 Jun 2018 19:09:52 -0700 Message-Id: <1528164594-23823-4-git-send-email-linuxram@us.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1528164594-23823-1-git-send-email-linuxram@us.ibm.com> References: <1528164594-23823-1-git-send-email-linuxram@us.ibm.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/linuxppc-dev>, <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/linuxppc-dev/> List-Post: <mailto:linuxppc-dev@lists.ozlabs.org> List-Help: <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/linuxppc-dev>, <mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe> Cc: fweimer@redhat.com, Ulrich.Weigand@de.ibm.com, linuxram@us.ibm.com, mhocko@kernel.org, dave.hansen@intel.com, aneesh.kumar@linux.vnet.ibm.com, luto@kernel.org, bauerman@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" <linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org> |
Series |
powerpc/pkeys: fixes to pkeys
|
expand
|
diff --git a/arch/powerpc/mm/pkeys.c b/arch/powerpc/mm/pkeys.c index 6fc56f4..90ab793 100644 --- a/arch/powerpc/mm/pkeys.c +++ b/arch/powerpc/mm/pkeys.c @@ -92,7 +92,7 @@ int pkey_initialize(void) * arch-neutral code. */ pkeys_total = min_t(int, pkeys_total, - (ARCH_VM_PKEY_FLAGS >> VM_PKEY_SHIFT)); + ((ARCH_VM_PKEY_FLAGS >> VM_PKEY_SHIFT)+1)); if (!pkey_mmu_enabled() || radix_enabled() || !pkeys_total) static_branch_enable(&pkey_disabled);
Total number of pkeys calculation is off by 1. Fix it. CC: Florian Weimer <fweimer@redhat.com> CC: Michael Ellerman <mpe@ellerman.id.au> CC: Thiago Jung Bauermann <bauerman@linux.ibm.com> Signed-off-by: Ram Pai <linuxram@us.ibm.com> --- arch/powerpc/mm/pkeys.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)