From patchwork Mon Feb 3 21:04:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dennis Zhou X-Patchwork-Id: 11363473 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1A27A139A for ; Mon, 3 Feb 2020 21:04:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DF51E2087E for ; Mon, 3 Feb 2020 21:04:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF51E2087E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 323036B0005; Mon, 3 Feb 2020 16:04:55 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2AE156B0006; Mon, 3 Feb 2020 16:04:55 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 19B506B0007; Mon, 3 Feb 2020 16:04:55 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0037.hostedemail.com [216.40.44.37]) by kanga.kvack.org (Postfix) with ESMTP id F363F6B0005 for ; Mon, 3 Feb 2020 16:04:54 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id A1F5A2DFC for ; Mon, 3 Feb 2020 21:04:54 +0000 (UTC) X-FDA: 76450045308.20.coil72_821cdf1d04616 X-Spam-Summary: 2,0,0,42f1e8ea93b67dbf,d41d8cd98f00b204,dennisszhou@gmail.com,:torvalds@linux-foundation.org:tj@kernel.org:cl@linux.com::linux-kernel@vger.kernel.org,RULES_HIT:41:69:355:379:421:973:988:989:1260:1277:1312:1313:1314:1345:1437:1516:1518:1519:1535:1543:1593:1594:1595:1596:1711:1730:1747:1777:1792:1981:2194:2199:2393:2559:2562:2918:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3873:3874:4321:4362:4605:5007:6119:6261:9592:10004:10400:10967:11026:11473:11658:11914:12043:12297:12438:12517:12519:12555:12679:12683:12740:12895:12986:13071:13161:13229:13439:13895:14180:14181:14721:14819:21060:21080:21444:21451:21627:30029:30054,0,RBL:209.85.216.67:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: coil72_821cdf1d04616 X-Filterd-Recvd-Size: 5280 Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Mon, 3 Feb 2020 21:04:53 +0000 (UTC) Received: by mail-pj1-f67.google.com with SMTP id q39so310679pjc.0 for ; Mon, 03 Feb 2020 13:04:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=vyNNYPWQk9h02ZhB6qKtVaaQp9UclxRqVnPIxFZJ0Xg=; b=Hhoy1DFi4HM70GEXD24ABzHsbpnuZ8eyzJlmE46tJOzf08TIsp4HfGyGPdNotJpiXj 0IL4RCYOiMRyhHd/g83e6WJiwjLPI5YzzbiLxV4aTcyfcLqI/YfUqb2ng0K+BmkaFs4F d1PRDLd92oniKnyOxNSWDigzgd9YdG3FcW/zYC5a8YM196XzKIMEIUR09bizk7y17PXT vt3PGcMRcZb/wLNlnP7Ob44tea0v0gINi9M+FBCftPGY2rlOxq/S4oeKxs1Gtdw+m6Nv Wd439nhQyKAs2qW3N6BIbebyb1IgNUB9d5RC2rT0/6Y9PZOjAvZmbCubEqfKGNRehHC9 lRWA== X-Gm-Message-State: APjAAAWaaL5BasdqSBbCVgrahypZBfTxUQinx9gUGDyuiweHutD2gvX7 Ha8l/H8SULxyygVzSVAPU0Q= X-Google-Smtp-Source: APXvYqxAc+JfYnIeiZ3l4QBGTk8ktRMRb0WhEJyp/cK6P4XpYNuXTMPbItEy0LRdFTU94m4K6dXnHQ== X-Received: by 2002:a17:90b:243:: with SMTP id fz3mr1196684pjb.29.1580763892984; Mon, 03 Feb 2020 13:04:52 -0800 (PST) Received: from dennisz-mbp.dhcp.thefacebook.com ([2620:10d:c090:200::3:1a15]) by smtp.gmail.com with ESMTPSA id r28sm20736910pgk.39.2020.02.03.13.04.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2020 13:04:52 -0800 (PST) Date: Mon, 3 Feb 2020 13:04:50 -0800 From: Dennis Zhou To: Linus Torvalds Cc: Tejun Heo , Christoph Lameter , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] percpu changes for v5.6-rc1 Message-ID: <20200203210450.GA25544@dennisz-mbp.dhcp.thefacebook.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.12.2 (2019-09-21) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Linus, This pull request separates out variables that can be decrypted into their own page anytime encryption can be enabled and fixes __percpu annotations in asm-generic for sparse. Thanks, Dennis The following changes since commit aedc0650f9135f3b92b39cbed1a8fe98d8088825: Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm (2019-12-04 11:08:30 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git for-5.6 for you to fetch changes up to 264b0d2bee148073c117e7bbbde5be7125a53be1: percpu: Separate decrypted varaibles anytime encryption can be enabled (2020-01-31 11:15:59 -0800) ---------------------------------------------------------------- Erdem Aktas (1): percpu: Separate decrypted varaibles anytime encryption can be enabled Luc Van Oostenryck (1): percpu: fix __percpu annotation in asm-generic include/asm-generic/percpu.h | 10 +++++----- include/linux/percpu-defs.h | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index c2de013b2cf4..35e4a53b83e6 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h @@ -74,7 +74,7 @@ do { \ #define raw_cpu_generic_add_return(pcp, val) \ ({ \ - typeof(&(pcp)) __p = raw_cpu_ptr(&(pcp)); \ + typeof(pcp) *__p = raw_cpu_ptr(&(pcp)); \ \ *__p += val; \ *__p; \ @@ -82,7 +82,7 @@ do { \ #define raw_cpu_generic_xchg(pcp, nval) \ ({ \ - typeof(&(pcp)) __p = raw_cpu_ptr(&(pcp)); \ + typeof(pcp) *__p = raw_cpu_ptr(&(pcp)); \ typeof(pcp) __ret; \ __ret = *__p; \ *__p = nval; \ @@ -91,7 +91,7 @@ do { \ #define raw_cpu_generic_cmpxchg(pcp, oval, nval) \ ({ \ - typeof(&(pcp)) __p = raw_cpu_ptr(&(pcp)); \ + typeof(pcp) *__p = raw_cpu_ptr(&(pcp)); \ typeof(pcp) __ret; \ __ret = *__p; \ if (__ret == (oval)) \ @@ -101,8 +101,8 @@ do { \ #define raw_cpu_generic_cmpxchg_double(pcp1, pcp2, oval1, oval2, nval1, nval2) \ ({ \ - typeof(&(pcp1)) __p1 = raw_cpu_ptr(&(pcp1)); \ - typeof(&(pcp2)) __p2 = raw_cpu_ptr(&(pcp2)); \ + typeof(pcp1) *__p1 = raw_cpu_ptr(&(pcp1)); \ + typeof(pcp2) *__p2 = raw_cpu_ptr(&(pcp2)); \ int __ret = 0; \ if (*__p1 == (oval1) && *__p2 == (oval2)) { \ *__p1 = nval1; \ diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h index a6fabd865211..176bfbd52d97 100644 --- a/include/linux/percpu-defs.h +++ b/include/linux/percpu-defs.h @@ -175,8 +175,7 @@ * Declaration/definition used for per-CPU variables that should be accessed * as decrypted when memory encryption is enabled in the guest. */ -#if defined(CONFIG_VIRTUALIZATION) && defined(CONFIG_AMD_MEM_ENCRYPT) - +#ifdef CONFIG_AMD_MEM_ENCRYPT #define DECLARE_PER_CPU_DECRYPTED(type, name) \ DECLARE_PER_CPU_SECTION(type, name, "..decrypted")