From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72FAEC47095 for ; Wed, 7 Oct 2020 15:13:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 32563214DB for ; Wed, 7 Oct 2020 15:13:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728715AbgJGPNL (ORCPT ); Wed, 7 Oct 2020 11:13:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726152AbgJGPNL (ORCPT ); Wed, 7 Oct 2020 11:13:11 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36E9AC061755 for ; Wed, 7 Oct 2020 08:13:11 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kQB7n-000z4I-Jk; Wed, 07 Oct 2020 17:13:03 +0200 Message-ID: <0817bfdee3ee28ae8b94251ed559cf4e844a5ea4.camel@sipsolutions.net> Subject: Re: [RFC v7 02/21] um: add os init and exit calls From: Johannes Berg To: Hajime Tazaki , linux-um@lists.infradead.org, jdike@addtoit.com, richard@nod.at, anton.ivanov@cambridgegreys.com Cc: tavi.purdila@gmail.com, linux-kernel-library@freelists.org, linux-arch@vger.kernel.org, Octavian Purdila , retrage01@gmail.com Date: Wed, 07 Oct 2020 17:13:02 +0200 In-Reply-To: <184f5b2c6a0c399edf519d27989519a35ab90700.1601960644.git.thehajime@gmail.com> References: <184f5b2c6a0c399edf519d27989519a35ab90700.1601960644.git.thehajime@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On Tue, 2020-10-06 at 18:44 +0900, Hajime Tazaki wrote: > > -#define __define_initcall(level,fn) \ > - static initcall_t __initcall_##fn __used \ > - __attribute__((__section__(".initcall" level ".init"))) = fn > - > -/* Userspace initcalls shouldn't depend on anything in the kernel, so we'll > - * make them run first. > - */ > -#define __initcall(fn) __define_initcall("1", fn) > +#undef __uml_exit_call > +#define __uml_exit_call __used __section(os_exitcalls) Doesn't that break calling of sigio_cleanup and remove_umid_dir? After all, > +void __weak os_exitcalls(void) > +{ > +} This does nothing so far. Also, why the __weak? johannes From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQB7q-0002Go-TM for linux-um@lists.infradead.org; Wed, 07 Oct 2020 15:13:08 +0000 Message-ID: <0817bfdee3ee28ae8b94251ed559cf4e844a5ea4.camel@sipsolutions.net> Subject: Re: [RFC v7 02/21] um: add os init and exit calls From: Johannes Berg Date: Wed, 07 Oct 2020 17:13:02 +0200 In-Reply-To: <184f5b2c6a0c399edf519d27989519a35ab90700.1601960644.git.thehajime@gmail.com> References: <184f5b2c6a0c399edf519d27989519a35ab90700.1601960644.git.thehajime@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: Hajime Tazaki , linux-um@lists.infradead.org, jdike@addtoit.com, richard@nod.at, anton.ivanov@cambridgegreys.com Cc: tavi.purdila@gmail.com, linux-kernel-library@freelists.org, retrage01@gmail.com, Octavian Purdila , linux-arch@vger.kernel.org On Tue, 2020-10-06 at 18:44 +0900, Hajime Tazaki wrote: > > -#define __define_initcall(level,fn) \ > - static initcall_t __initcall_##fn __used \ > - __attribute__((__section__(".initcall" level ".init"))) = fn > - > -/* Userspace initcalls shouldn't depend on anything in the kernel, so we'll > - * make them run first. > - */ > -#define __initcall(fn) __define_initcall("1", fn) > +#undef __uml_exit_call > +#define __uml_exit_call __used __section(os_exitcalls) Doesn't that break calling of sigio_cleanup and remove_umid_dir? After all, > +void __weak os_exitcalls(void) > +{ > +} This does nothing so far. Also, why the __weak? johannes _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um