Received: by 10.223.164.202 with SMTP id h10csp574887wrb; Thu, 9 Nov 2017 10:48:45 -0800 (PST) X-Google-Smtp-Source: ABhQp+RbF44/Fx8KIfWL53MkEokkLEHtACvMcToYE9ZpoH0BnVhrafJkHOzBylinHMJP15zcwzyq X-Received: by 10.84.141.131 with SMTP id 3mr1332810plv.136.1510253325540; Thu, 09 Nov 2017 10:48:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510253325; cv=none; d=google.com; s=arc-20160816; b=ezAjuwwyGeSqOGREhEl3IizerLp0xTJXNpaP4HvmwgwO301Slq2XEQrdlIor1amG22 9u1i+NWPlzp6z5TcRsXkPbGE8QIk+eHiX5BGQGU0TsYucNwuda4O9c+Etli3UCDc+T7s 3burWiCGPt6PBoi1ddZbIXmbhfg3E46lA74zbt1BogUUR5giVZRb5GXkd9kHD36SsxMy glF81+x86JFCev31vi2T+TPYVzqTppmzgR11IhnyNaLMbC8PF0+6qP/oKMfmgcScc0pi 2u86OmItJaGhmKPa44LQ4PoSYCF/BFs/+6HC5ohwr9qY6sWLDWrKSoPBV+gp77B3DM2L VlQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=Gg5GPhPdcEk56zVPM66UNzFRJi7VvhXkjrljVs9J+yo=; b=C4J9TQpBVQrkSTVTgR68QdKUcvNy1SyUZR8pu1u3n4cCOu7gMCvCflMJSTxTU+SU8P bJ2nUDGpe8wkO8Gkxzk2ZuaCPm4zY/QeuPeBLclpJ4NVHFLkIOBdaHRYgTC+iKc4G1L7 oormnMUNPCYoZnzS3Fp65+N+ZZAJSQe/7la5BS8j/CaylXIfDitK/1WAa++ixa+NRxp+ r7RHPipRf6KJ2BrmOrYDPiVnwqLkZ6uwMoqSvjgn9VkyY0O2MC6Yp21cpMe+EkySjbPt cAephMpnBZ/ZlDYbYRDtihe92Pr6ldTHe5etv7uiDTp4NvUSrG9g2+9TbBb9qeNUw9+B 3yAQ== 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 t73si7332591pfk.319.2017.11.09.10.48.33; Thu, 09 Nov 2017 10:48:45 -0800 (PST) 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 S1754272AbdKISr1 (ORCPT + 82 others); Thu, 9 Nov 2017 13:47:27 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:47054 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753227AbdKISrX (ORCPT ); Thu, 9 Nov 2017 13:47:23 -0500 Received: by mail-qt0-f193.google.com with SMTP id 1so8918718qtn.3; Thu, 09 Nov 2017 10:47:22 -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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Gg5GPhPdcEk56zVPM66UNzFRJi7VvhXkjrljVs9J+yo=; b=Gt53OIib32h2YqK4K90JUMes4/17VwUF7ntBfYSnYGANbZzffB2THehy8ANam/921M FMGyx25w2NAIz5V+CO7FIYkySKyopFOt0zd8GAMuwPFqMLbmAZreK6qUU2IcVCNudlQH UN337VUNI8CU5oGs43QmsPO1wNScn9Scjm8P72yRn6gn7/62xU/77daEwB7izeSA6d0z K57zx36eAszYhO/JObOoNc0gsCnB5ASJvCXHAD0656qVmirI1s6IiVmXV57dLfGcGaVi FMcTx5WnajZCDRTrfhwNNoonIELExcpQ1UCthSt9uzXOEGh3MlTDJ+vCh7aMih7CiVsj s07Q== X-Gm-Message-State: AJaThX46BwJZA8L5W15wKTAdpzKSzRHwvWjevspTaRlTmEYsVpQrM0x/ gKJ+SUKtb3ijp820lutU444= X-Received: by 10.200.28.69 with SMTP id j5mr2348134qtk.220.1510253242311; Thu, 09 Nov 2017 10:47:22 -0800 (PST) Received: from gmail.com ([32.104.18.243]) by smtp.gmail.com with ESMTPSA id q15sm5096915qkj.8.2017.11.09.10.47.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Nov 2017 10:47:21 -0800 (PST) Date: Thu, 9 Nov 2017 16:47:15 -0200 From: Breno Leitao To: Ram Pai Cc: mpe@ellerman.id.au, mingo@redhat.com, akpm@linux-foundation.org, corbet@lwn.net, arnd@arndb.de, linux-arch@vger.kernel.org, ebiederm@xmission.com, linux-doc@vger.kernel.org, x86@kernel.org, dave.hansen@intel.com, linux-kernel@vger.kernel.org, mhocko@kernel.org, linux-mm@kvack.org, paulus@samba.org, aneesh.kumar@linux.vnet.ibm.com, linux-kselftest@vger.kernel.org, bauerman@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org, khandual@linux.vnet.ibm.com Subject: Re: [PATCH v9 44/51] selftest/vm: powerpc implementation for generic abstraction Message-ID: <20171109184714.xs523k4cvmqghew3@gmail.com> References: <1509958663-18737-1-git-send-email-linuxram@us.ibm.com> <1509958663-18737-45-git-send-email-linuxram@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1509958663-18737-45-git-send-email-linuxram@us.ibm.com> User-Agent: NeoMutt/20170609-18-9a0a4f (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ram, On Mon, Nov 06, 2017 at 12:57:36AM -0800, Ram Pai wrote: > @@ -206,12 +209,14 @@ void signal_handler(int signum, siginfo_t *si, void *vucontext) > > trapno = uctxt->uc_mcontext.gregs[REG_TRAPNO]; > ip = uctxt->uc_mcontext.gregs[REG_IP_IDX]; > - fpregset = uctxt->uc_mcontext.fpregs; > - fpregs = (void *)fpregset; Since you removed all references for fpregset now, you probably want to remove the declaration of the variable above. > @@ -219,20 +224,21 @@ void signal_handler(int signum, siginfo_t *si, void *vucontext) > * state. We just assume that it is here. > */ > fpregs += 0x70; > -#endif > - pkey_reg_offset = pkey_reg_xstate_offset(); With this code, you removed all the reference for variable pkey_reg_offset, thus, its declaration could be removed also. > - *(u64 *)pkey_reg_ptr = 0x00000000; > + dprintf1("si_pkey from siginfo: %lx\n", si_pkey); > +#if defined(__i386__) || defined(__x86_64__) /* arch */ > + dprintf1("signal pkey_reg from xsave: %016lx\n", *pkey_reg_ptr); > + *(u64 *)pkey_reg_ptr &= reset_bits(si_pkey, PKEY_DISABLE_ACCESS); > +#elif __powerpc64__ Since the variable pkey_reg_ptr is only used for Intel code (inside #ifdefs), you probably want to #ifdef the variable declaration also, avoid triggering "unused variable" warning on non-Intel machines. From 1583306923114608730@xxx Mon Nov 06 09:05:47 +0000 2017 X-GM-THRID: 1583306923114608730 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread