From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751488AbdH1Pqp convert rfc822-to-8bit (ORCPT ); Mon, 28 Aug 2017 11:46:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35956 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751294AbdH1Pqm (ORCPT ); Mon, 28 Aug 2017 11:46:42 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3EE6A80463 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jglisse@redhat.com Date: Mon, 28 Aug 2017 11:46:40 -0400 (EDT) From: Jerome Glisse To: Michal Hocko Cc: Stephen Rothwell , Randy Dunlap , akpm@linux-foundation.org, mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-next@vger.kernel.org, broonie@kernel.org Message-ID: <1201125186.4681340.1503935200216.JavaMail.zimbra@redhat.com> In-Reply-To: <20170828083157.GE17097@dhcp22.suse.cz> References: <59a0a9d1.jzOblYrHfdIDuDZw%akpm@linux-foundation.org> <3c9df006-0cc5-3a32-b715-1fbb43cb9ea8@infradead.org> <20170828075931.GC17097@dhcp22.suse.cz> <20170828182705.150afe66@canb.auug.org.au> <20170828083157.GE17097@dhcp22.suse.cz> Subject: Re: mmotm 2017-08-25-15-50 uploaded MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [10.19.160.49, 10.4.195.29] Thread-Topic: mmotm 2017-08-25-15-50 uploaded Thread-Index: 7MTj/69ghGGvWJXodubaHAyaOh6AxA== X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 28 Aug 2017 15:46:42 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Mon 28-08-17 18:27:05, Stephen Rothwell wrote: > > Hi Michal, > > > > On Mon, 28 Aug 2017 09:59:31 +0200 Michal Hocko wrote: > > > > > > From 31d551dbcb1b7987a4cd07767c1e2805849b7a26 Mon Sep 17 00:00:00 2001 > > > From: Michal Hocko > > > Date: Mon, 28 Aug 2017 09:41:39 +0200 > > > Subject: [PATCH] > > > mm-hmm-struct-hmm-is-only-use-by-hmm-mirror-functionality-v2-fix > > > > > > Compiler is complaining for allnoconfig > > > > > > kernel/fork.c: In function 'mm_init': > > > kernel/fork.c:814:2: error: implicit declaration of function > > > 'hmm_mm_init' [-Werror=implicit-function-declaration] > > > hmm_mm_init(mm); > > > ^ > > > kernel/fork.c: In function '__mmdrop': > > > kernel/fork.c:893:2: error: implicit declaration of function > > > 'hmm_mm_destroy' [-Werror=implicit-function-declaration] > > > hmm_mm_destroy(mm); > > > > > > Make sure that hmm_mm_init/hmm_mm_destroy empty stups are defined when > > > CONFIG_HMM is disabled. > > > > > > Signed-off-by: Michal Hocko > > > --- > > > include/linux/hmm.h | 7 +++---- > > > 1 file changed, 3 insertions(+), 4 deletions(-) > > > > > > diff --git a/include/linux/hmm.h b/include/linux/hmm.h > > > index 9583d9a15f9c..aeb94e682dda 100644 > > > --- a/include/linux/hmm.h > > > +++ b/include/linux/hmm.h > > > @@ -508,11 +508,10 @@ static inline void hmm_mm_init(struct mm_struct > > > *mm) > > > { > > > mm->hmm = NULL; > > > } > > > -#else /* IS_ENABLED(CONFIG_HMM_MIRROR) */ > > > +#endif > > > + > > > +#else /* IS_ENABLED(CONFIG_HMM) */ > > > static inline void hmm_mm_destroy(struct mm_struct *mm) {} > > > static inline void hmm_mm_init(struct mm_struct *mm) {} > > > -#endif /* IS_ENABLED(CONFIG_HMM_MIRROR) */ > > > - > > > - > > > #endif /* IS_ENABLED(CONFIG_HMM) */ > > > #endif /* LINUX_HMM_H */ > > > > What happens when CONFIG_HMM is defined but CONFIG_HMM_MIRROR is not? > > Or is that not possible (in which case why would we have > > CONFIG_HMM_MIRROR)? > > This is something to Jerome to answer but hmm_mm_init/hmm_mm_destroy are > used regardless of the specific HMM configuration so an empty stub > should be defined unconditionally AFAIU. Sorry for the build issue i posted a patch on friday that i tested against all combination : https://lkml.org/lkml/2017/8/25/802 Michal is right this function needs to be defined no matter what but they only need to be stub if HMM_MIRROR is not enabled. The fix i posted has the correct logic. I missplaced the endif when i was fixing Arnd build issue when HMM_MIRROR was not enabled but other HMM feature were. Jérôme From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 28 Aug 2017 11:46:40 -0400 (EDT) From: Jerome Glisse To: Michal Hocko Cc: Stephen Rothwell , Randy Dunlap , akpm@linux-foundation.org, mm-commits@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-next@vger.kernel.org, broonie@kernel.org Message-ID: <1201125186.4681340.1503935200216.JavaMail.zimbra@redhat.com> In-Reply-To: <20170828083157.GE17097@dhcp22.suse.cz> References: <59a0a9d1.jzOblYrHfdIDuDZw%akpm@linux-foundation.org> <3c9df006-0cc5-3a32-b715-1fbb43cb9ea8@infradead.org> <20170828075931.GC17097@dhcp22.suse.cz> <20170828182705.150afe66@canb.auug.org.au> <20170828083157.GE17097@dhcp22.suse.cz> Subject: Re: mmotm 2017-08-25-15-50 uploaded MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: > On Mon 28-08-17 18:27:05, Stephen Rothwell wrote: > > Hi Michal, > >=20 > > On Mon, 28 Aug 2017 09:59:31 +0200 Michal Hocko wro= te: > > > > > > From 31d551dbcb1b7987a4cd07767c1e2805849b7a26 Mon Sep 17 00:00:00 200= 1 > > > From: Michal Hocko > > > Date: Mon, 28 Aug 2017 09:41:39 +0200 > > > Subject: [PATCH] > > > mm-hmm-struct-hmm-is-only-use-by-hmm-mirror-functionality-v2-fix > > >=20 > > > Compiler is complaining for allnoconfig > > >=20 > > > kernel/fork.c: In function 'mm_init': > > > kernel/fork.c:814:2: error: implicit declaration of function > > > 'hmm_mm_init' [-Werror=3Dimplicit-function-declaration] > > > hmm_mm_init(mm); > > > ^ > > > kernel/fork.c: In function '__mmdrop': > > > kernel/fork.c:893:2: error: implicit declaration of function > > > 'hmm_mm_destroy' [-Werror=3Dimplicit-function-declaration] > > > hmm_mm_destroy(mm); > > >=20 > > > Make sure that hmm_mm_init/hmm_mm_destroy empty stups are defined whe= n > > > CONFIG_HMM is disabled. > > >=20 > > > Signed-off-by: Michal Hocko > > > --- > > > include/linux/hmm.h | 7 +++---- > > > 1 file changed, 3 insertions(+), 4 deletions(-) > > >=20 > > > diff --git a/include/linux/hmm.h b/include/linux/hmm.h > > > index 9583d9a15f9c..aeb94e682dda 100644 > > > --- a/include/linux/hmm.h > > > +++ b/include/linux/hmm.h > > > @@ -508,11 +508,10 @@ static inline void hmm_mm_init(struct mm_struct > > > *mm) > > > { > > > =09mm->hmm =3D NULL; > > > } > > > -#else /* IS_ENABLED(CONFIG_HMM_MIRROR) */ > > > +#endif > > > + > > > +#else /* IS_ENABLED(CONFIG_HMM) */ > > > static inline void hmm_mm_destroy(struct mm_struct *mm) {} > > > static inline void hmm_mm_init(struct mm_struct *mm) {} > > > -#endif /* IS_ENABLED(CONFIG_HMM_MIRROR) */ > > > - > > > - > > > #endif /* IS_ENABLED(CONFIG_HMM) */ > > > #endif /* LINUX_HMM_H */ > >=20 > > What happens when CONFIG_HMM is defined but CONFIG_HMM_MIRROR is not? > > Or is that not possible (in which case why would we have > > CONFIG_HMM_MIRROR)? >=20 > This is something to Jerome to answer but hmm_mm_init/hmm_mm_destroy are > used regardless of the specific HMM configuration so an empty stub > should be defined unconditionally AFAIU. Sorry for the build issue i posted a patch on friday that i tested against all combination : https://lkml.org/lkml/2017/8/25/802 Michal is right this function needs to be defined no matter what but they only need to be stub if HMM_MIRROR is not enabled. The fix i posted has the correct logic. I missplaced the endif when i was fixing Arnd build issue when HMM_MIRROR was not enabled but other HMM featu= re were. J=C3=A9r=C3=B4me -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org