Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753303AbdHJWFA (ORCPT ); Thu, 10 Aug 2017 18:05:00 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:37980 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752192AbdHJWE7 (ORCPT ); Thu, 10 Aug 2017 18:04:59 -0400 Date: Thu, 10 Aug 2017 15:04:58 -0700 (PDT) Message-Id: <20170810.150458.937727046893542981.davem@davemloft.net> To: zi.yan@sent.com Cc: sam@ravnborg.org, linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org, zi.yan@cs.rutgers.edu Subject: Re: [PATCH] mm: add pmd_t initializer __pmd() to work around a GCC bug. From: David Miller In-Reply-To: <20170803131721.74011-1-zi.yan@sent.com> References: <20170803131721.74011-1-zi.yan@sent.com> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 10 Aug 2017 15:04:58 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 654 Lines: 17 From: Zi Yan Date: Thu, 3 Aug 2017 09:17:21 -0400 > From: Zi Yan > > THP migration is added but only supports x86_64 at the moment. For all > other architectures, swp_entry_to_pmd() only returns a zero pmd_t. > > Due to a GCC zero initializer bug #53119, the standard (pmd_t){0} > initializer is not accepted by all GCC versions. __pmd() is a feasible > workaround. In addition, sparc32's pmd_t is an array instead of a single > value, so we need (pmd_t){ {0}, } instead of (pmd_t){0}. Thus, > a different __pmd() definition is needed in sparc32. > > Signed-off-by: Zi Yan Applied.