From patchwork Mon Apr 23 18:20:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Pateenok X-Patchwork-Id: 903135 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WQuliRta"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="qGA0cDdD"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40VFBb2bJ5z9s1p for ; Tue, 24 Apr 2018 04:20:39 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=/bOgiSqXgDhMoOB9INPTXZK6iwZE7hOWpTN0CgMvr18=; b=WQuliRtaekvp3g Lkan0Xdd8hl7LtlsJO5GglbJGjik6QnlO/DBd5MBK6h3w4GDnds3myt9p5jdxO3MK++rjpeXsJfFC U06VTy4dG5GFspOuqVulqhgI94ZFUeRHtfsyu/VdUfNQ2kT78V60rTOCssJKeqksCr4VEsB6GBlCu SDqj1YNzMLeTDtSyYP1v/n1L+AYOMh7Zg0OejTmOOx3f71HGa0wbHjMJsPt/vzqq1Ftuw8FLZxXdz nGTmaRML9XacDDfAfLoBYYj6wsQgYABqbjkqsTErpQNLeRsYDBrDWpu52o/A6obsEVGJFKAiQg/iZ a/f8AA/ngJLRXi8c9t6Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fAg4q-0000se-WF; Mon, 23 Apr 2018 18:20:37 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fAg4n-0000rp-Kk for linux-um@lists.infradead.org; Mon, 23 Apr 2018 18:20:35 +0000 Received: by mail-wr0-x242.google.com with SMTP id p18-v6so24647019wrm.1 for ; Mon, 23 Apr 2018 11:20:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=GdYT6l1w4bkHvPo6EMffrTsONAryhIBjItYYY6dArHE=; b=qGA0cDdD5FA2UaeylH8Rqo7toM+eS3pWAzks0YySYgdRHUz65+qQ8159CrhJ147AyR +FqRONMixONzRDSg8+Kf0V775MIfimpyCYs9YD+AfHtmm+2/6M6TuN473EPX54OwE+qh kqWevmhxxDFmlzh5WRcmkPVFUWZ29JPXC4e7oDZM79sl4M48MIpsuXVunUyXqjP/euT+ UG3m6p+i+1aefGAdBEl4AWWHxMUuOiwXs3AEcwhp2RFNaH/mUtfknxKh7RxBWJCdkG4T u15/iaq7D/Fwm+JW95OlBeW7WOTzsuP3KORkkE5zERbTJau3/O8RUJmwLbOqPVvdsh3j 21EA== 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:subject:message-id:mime-version :content-disposition:user-agent; bh=GdYT6l1w4bkHvPo6EMffrTsONAryhIBjItYYY6dArHE=; b=g2teJ2Lv9utXd/h+rOqCmLBk6hqnQFZq5kYQcEpYBuUGjnuGN0ZLT+mOUq6fa5WMQX 8mTcyh7iaKnK97jbmmk/Yq+bg6m+pTLU/pcAm4UMRO1TPFe4GeLhJzDoerrXUxzwW768 56b/vvrSyDmpvaeWPfRh348T/2z5eJ/QN/dLZb0pU2b5TMqgNV9Z0+HryFSow1qqJww8 s/fedPjOiTNMdATraPrLfZS56jUFtjkqa0GZqsM2FCDFXprA9xoIIYFlLhofZDxMigZr prXkU5oCVfgXSf3/Qe/kbNSO8zPg2O6a6lXyZ4l3Qg2Emq+tfVicFAGVkXt7OAHsl8ku IK4w== X-Gm-Message-State: ALQs6tBVzsixmF79xWs9OuNY4mNiqL3aOanfLbcY7CMbME1gC09EFe3S FqfAeFsE68V6u0u7eZv5MNY= X-Google-Smtp-Source: AIpwx4/qBw+QaoodizKK9D+/q/hXTDcSiwDkhzgBn4mEXbLn3Ne7je2Hrkigawv/+lk+s0wIzS5AyQ== X-Received: by 2002:adf:9615:: with SMTP id b21-v6mr18721039wra.253.1524507620076; Mon, 23 Apr 2018 11:20:20 -0700 (PDT) Received: from K55DR ([93.171.161.239]) by smtp.gmail.com with ESMTPSA id a13-v6sm3866139wrn.6.2018.04.23.11.20.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Apr 2018 11:20:19 -0700 (PDT) Date: Mon, 23 Apr 2018 21:20:17 +0300 From: Alexander Pateenok To: Jeff Dike , Richard Weinberger , user-mode-linux-devel@lists.sourceforge.net, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] um: remove uml initcalls Message-ID: <20180423182017.oxlfhnsrekk34q3b@K55DR> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170912 (1.9.0) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180423_112033_704882_495DF2A1 X-CRM114-Status: UNSURE ( 9.16 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c0c:0:0:0:242 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (pateenoc[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org __uml_initcall() is not used and .uml.initcall.init section is empty: $ grep -r '__uml_initcall(' arch/um/include/shared/init.h:#define __uml_initcall(fn) \ $ readelf -s ../umobj/linux | grep __uml_initcall 23214: 00000000603b75d8 0 NOTYPE GLOBAL DEFAULT 32 __uml_initcall_start 25337: 00000000603b75d8 0 NOTYPE GLOBAL DEFAULT 32 __uml_initcall_end So it is unnecessary. Signed-off-by: Alexander Pateenok --- arch/um/include/asm/common.lds.S | 6 ------ arch/um/include/shared/init.h | 5 ----- arch/um/os-Linux/main.c | 12 ------------ 3 files changed, 23 deletions(-) diff --git a/arch/um/include/asm/common.lds.S b/arch/um/include/asm/common.lds.S index b30d73ca29d0..7adb4e6b658a 100644 --- a/arch/um/include/asm/common.lds.S +++ b/arch/um/include/asm/common.lds.S @@ -53,12 +53,6 @@ CON_INITCALL } - .uml.initcall.init : { - __uml_initcall_start = .; - *(.uml.initcall.init) - __uml_initcall_end = .; - } - SECURITY_INIT .exitcall : { diff --git a/arch/um/include/shared/init.h b/arch/um/include/shared/init.h index b3f5865a92c9..c66de434a983 100644 --- a/arch/um/include/shared/init.h +++ b/arch/um/include/shared/init.h @@ -64,14 +64,10 @@ struct uml_param { int (*setup_func)(char *, int *); }; -extern initcall_t __uml_initcall_start, __uml_initcall_end; extern initcall_t __uml_postsetup_start, __uml_postsetup_end; extern const char *__uml_help_start, *__uml_help_end; #endif -#define __uml_initcall(fn) \ - static initcall_t __uml_initcall_##fn __uml_init_call = fn - #define __uml_exitcall(fn) \ static exitcall_t __uml_exitcall_##fn __uml_exit_call = fn @@ -108,7 +104,6 @@ extern struct uml_param __uml_setup_start, __uml_setup_end; */ #define __uml_init_setup __used __section(.uml.setup.init) #define __uml_setup_help __used __section(.uml.help.init) -#define __uml_init_call __used __section(.uml.initcall.init) #define __uml_postsetup_call __used __section(.uml.postsetup.init) #define __uml_exit_call __used __section(.uml.exitcall.exit) diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c index 5f970ece5ac3..f1fee2b91239 100644 --- a/arch/um/os-Linux/main.c +++ b/arch/um/os-Linux/main.c @@ -40,17 +40,6 @@ static void set_stklim(void) } } -static __init void do_uml_initcalls(void) -{ - initcall_t *call; - - call = &__uml_initcall_start; - while (call < &__uml_initcall_end) { - (*call)(); - call++; - } -} - static void last_ditch_exit(int sig) { uml_cleanup(); @@ -151,7 +140,6 @@ int __init main(int argc, char **argv, char **envp) scan_elf_aux(envp); #endif - do_uml_initcalls(); change_sig(SIGPIPE, 0); ret = linux_main(argc, argv);