Received: by 10.192.165.148 with SMTP id m20csp2539695imm; Sun, 22 Apr 2018 09:08:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/yCr33heD/TIZYnTBbt4nxHK6HOaovi1g6IRpNSNGBL9IGZ8do0WjiQ+zK06OCRlopx/W5 X-Received: by 2002:a17:902:aa97:: with SMTP id d23-v6mr17454134plr.293.1524413328732; Sun, 22 Apr 2018 09:08:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524413328; cv=none; d=google.com; s=arc-20160816; b=WoOVjMsQ6XhjutzMDhx0l+y63XmiVo0fGJ+9SfrX+aQG37Vvi5Vb6fooQgcjidYkDr 8wN3We9MG3xw15YmQ1Muf1OBCIPBcqJRxrSP8GK4MdlZtEhyKxPmLWPV6GRdnuTtQN/v C7UAIUj2KmbHzkh+73pzYiTRu/WqFPXDWy7BaVWW3pnb87A2KlTsManG5wdllV0mdVr7 xJJC5chaGA28Gqz+JjVMmuiUgNpJwScwsSub0IaXk+X9OdccseZKc5w+ceOMKiLbd2+M Apeo/olevr0vigi73mn0u3eqj9oa9mcTOjZfI8Cu3FGA/hIqBAOyzPuNfESZxZkPMAjM dp9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=KCN/QKNYTlT1Bp7DhsiYkanPgVUXZsR4Sh0GTkOyncs=; b=EdAudcE5bB2GV3nxeXXzZstGRpbzGPGcyfQOM9OE+8Okp3Hgewk0Vh057vJciwaLgk jDPGd62iktqvxmJ7Esp42TRjpCScqmjRKPOrC4yXY6QYsu79gW4kFCCxJMHG1EN2+uXI d21AEfj/dSCUzCi8UNIeiajklk5hlWr/6XEsHEANorCBz7ilh8kUQdLeoI+COU7NQ3Cu DuahPM0E7VhWG7RCUpfTJlUxJ+3TECRof5AdAWZQepKg+34VBu88a2vkaz/gEiUOoY7W 7EEvJl8GC6rFRv0qEqvr30/Jl/INeJvkU3EyvjtZJKUyB9B+SJG4tiZK8EXIZIL8VQv7 /s/g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9-v6si10041174plv.159.2018.04.22.09.08.34; Sun, 22 Apr 2018 09:08:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753902AbeDVN5A (ORCPT + 99 others); Sun, 22 Apr 2018 09:57:00 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45460 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753881AbeDVN44 (ORCPT ); Sun, 22 Apr 2018 09:56:56 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id AAE789CE; Sun, 22 Apr 2018 13:56:55 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ram Pai , Nicholas Piggin , Michael Ellerman Subject: [PATCH 4.16 059/196] powerpc/64s: Fix pkey support in dt_cpu_ftrs, add CPU_FTR_PKEY bit Date: Sun, 22 Apr 2018 15:51:19 +0200 Message-Id: <20180422135107.270657741@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135104.278511750@linuxfoundation.org> References: <20180422135104.278511750@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nicholas Piggin commit c130153e453cba0f37ad10fa18a1aa9c9a598a59 upstream. The pkey code added a CPU_FTR_PKEY bit, but did not add it to the dt_cpu_ftrs feature set. Although capability is supported by all processors in the base dt_cpu_ftrs set for 64s, it's a significant and sufficiently well defined feature to make it optional. So add it as a quirk for now, which can be versioned out then controlled by the firmware (once dt_cpu_ftrs gains versioning support). Fixes: cf43d3b26452 ("powerpc: Enable pkey subsystem") Cc: stable@vger.kernel.org # v4.16+ Cc: Ram Pai Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/kernel/dt_cpu_ftrs.c | 7 +++++++ 1 file changed, 7 insertions(+) --- a/arch/powerpc/kernel/dt_cpu_ftrs.c +++ b/arch/powerpc/kernel/dt_cpu_ftrs.c @@ -658,6 +658,13 @@ static void __init cpufeatures_setup_sta cur_cpu_spec->cpu_features |= CPU_FTR_ARCH_300; cur_cpu_spec->cpu_user_features2 |= PPC_FEATURE2_ARCH_3_00; } + + /* + * PKEY was not in the initial base or feature node + * specification, but it should become optional in the next + * cpu feature version sequence. + */ + cur_cpu_spec->cpu_features |= CPU_FTR_PKEY; } static bool __init cpufeatures_process_feature(struct dt_cpu_feature *f)