Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp4007670ybh; Tue, 17 Mar 2020 10:27:54 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsnw1DmhLzyjAX3rFUREMHReAe6djj7/L1HQWFQXdpN9Ca8xfW8bMGymNnNDaGbmRUH1hNm X-Received: by 2002:a05:6830:1190:: with SMTP id u16mr265973otq.298.1584466073685; Tue, 17 Mar 2020 10:27:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584466073; cv=none; d=google.com; s=arc-20160816; b=eH6IL6XsbuLehWmFx9l8EgJnIeaX5n5bdsYncaFn4+/ezeV1wmYu6TWAEUygcqXtW4 PAxqucJzrz421CX36ixi46US0mLyLhSLLVV8x7mZdGjToQMNBpvhO1fi2WdxB3V54vkp 02O6iZqgPO8nrnUfGCSjjpw3S+ZVzPtzgVnEUROjhMK5WqgBKVRm9/VNV0a0p+Po58OY gTi8Zc5pQe3M1sluXXGJ5XzWhfmzc9c2tPvrgHvtDsPiyBwgYE24SxpfHXWGJ508h31P U/J44uVNkvEcBST7cPt94crbcsGfQort8gnl7JmSh0Owc8p5LqFHIgLys6upe0PRZNuw 4IcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=tmM036UedKoKmLv+RPQrJy6cg5QxGe0RJ3PRxmL1/ps=; b=GUNpxR0SiJ5t1dYIjozlXi2Cefy9xvsuXvMF0NZtjyy+mGbCCA+C4q3TYrCYHtxzcs kicl5SIDG4aIk262/svzG0lJvJvy564ZUF4WcHCg7XBYBKUM9ywwul+uzMozEOKfzIBK Xjx9FPE1hRLO8pZnNcr4g0XKHt5epPp5R6VP90MTjYFozFmKDul6lu7KryALf+qNM3zj sF8KJurWsd6mkTBsgZr+wRQSl1KRt5AZMGZY98gwYLgHqKpWc3PoQS1Grgx7bU8A5cX8 RIxzvf9IrrOyQxN6fIG28B1QotcznymHaVTkGkUueEW4i+EOUVGqoguPsaqkOgaG8Gl8 gKSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=vbIGY2kW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c28si2298250otd.215.2020.03.17.10.27.29; Tue, 17 Mar 2020 10:27:53 -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; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=vbIGY2kW; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726388AbgCQR1K (ORCPT + 99 others); Tue, 17 Mar 2020 13:27:10 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:37388 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726082AbgCQR1K (ORCPT ); Tue, 17 Mar 2020 13:27:10 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02HHJ4f2127061; Tue, 17 Mar 2020 17:26:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=tmM036UedKoKmLv+RPQrJy6cg5QxGe0RJ3PRxmL1/ps=; b=vbIGY2kWpY9S82HDJ80TFO83/u93b2u2CKhJ6USynQnjbj427qLOKpp4/wup0FEN5k7t VMpH8ZQuWMW4DbsP+UAW9Ky2QV8hCzdDyAfT1jXG9t5uC676B82x7jrI5MbmhAXIvw+W xpEHH81IsBZgndFGmLF9mqUAt9tV2M8DtT+FUeNhHI8ENhipFbe54WHbydD1rKK9upep /Mc1epa6dE1vl+p++Nnu7OHptbJcCwJJu4T6r1rdlFHthOh7QClqvPfPCiY3+V4nMvN0 U5sHnzbhT4jekpXh6pw164sQms6UBXlQmIdmE4NZTo8hQL76QuprbG0LaA5P2HIY4ctO NA== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 2yrq7kx88b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Mar 2020 17:26:52 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02HHKjsl185935; Tue, 17 Mar 2020 17:24:52 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 2ys8ts7c9s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Mar 2020 17:24:51 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 02HHOokm014044; Tue, 17 Mar 2020 17:24:51 GMT Received: from [192.168.1.206] (/71.63.128.209) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 17 Mar 2020 10:24:50 -0700 Subject: Re: [PATCH] mm/hugetlb: Fix build failure with HUGETLB_PAGE but not HUGEBTLBFS To: Christophe Leroy , Andrew Morton , Nishanth Aravamudan , Nick Piggin , Adam Litke , Andi Kleen Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org References: <7e8c3a3c9a587b9cd8a2f146df32a421b961f3a2.1584432148.git.christophe.leroy@c-s.fr> From: Mike Kravetz Message-ID: <671b00e8-2a7a-6c19-b55b-ba2d6d0f5ad8@oracle.com> Date: Tue, 17 Mar 2020 10:24:49 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <7e8c3a3c9a587b9cd8a2f146df32a421b961f3a2.1584432148.git.christophe.leroy@c-s.fr> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9563 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 mlxscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003170069 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9563 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 suspectscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 priorityscore=1501 clxscore=1015 malwarescore=0 mlxscore=0 phishscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003170069 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/17/20 1:04 AM, Christophe Leroy wrote: > When CONFIG_HUGETLB_PAGE is set but not CONFIG_HUGETLBFS, the > following build failure is encoutered: > > In file included from arch/powerpc/mm/fault.c:33:0: > ./include/linux/hugetlb.h: In function 'hstate_inode': > ./include/linux/hugetlb.h:477:9: error: implicit declaration of function 'HUGETLBFS_SB' [-Werror=implicit-function-declaration] > return HUGETLBFS_SB(i->i_sb)->hstate; > ^ > ./include/linux/hugetlb.h:477:30: error: invalid type argument of '->' (have 'int') > return HUGETLBFS_SB(i->i_sb)->hstate; > ^ > > Gate hstate_inode() with CONFIG_HUGETLBFS instead of CONFIG_HUGETLB_PAGE. > > Reported-by: kbuild test robot > Link: https://patchwork.ozlabs.org/patch/1255548/#2386036 > Fixes: a137e1cc6d6e ("hugetlbfs: per mount huge page sizes") > Cc: stable@vger.kernel.org > Signed-off-by: Christophe Leroy As hugetlb.h evolved over time, I suspect nobody imagined a configuration with CONFIG_HUGETLB_PAGE and not CONFIG_HUGETLBFS. This patch does address the build issues. So, Reviewed-by: Mike Kravetz However, there are many definitions in that file not behind #ifdef CONFIG_HUGETLBFS that make no sense unless CONFIG_HUGETLBFS is defined. Such cleanup is way beyond the scope of this patch/effort. I will add it to the list of hugetlb/hugetlbfs things that can be cleaned up. -- Mike Kravetz