Received: by 10.192.165.148 with SMTP id m20csp3733557imm; Mon, 23 Apr 2018 11:22:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/SdqWekQtFTv5+ZC5F3420v+fbiuUu3+53qu0Fc65vY8L1baSadzd99QinKogjdnul5eum X-Received: by 2002:a17:902:aa94:: with SMTP id d20-v6mr22500878plr.323.1524507755331; Mon, 23 Apr 2018 11:22:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524507755; cv=none; d=google.com; s=arc-20160816; b=f/lHhvTQqU/5t3pLGXaIOmOrk0+HIDZm8ginUhxeqaJtJJyMPISNN9w5wFRQgO5zUL lpnwJj+NAjoBQW9OXVXsJZNMG/NfHNYd5F/xHee972nk7lZd0p0eVMCRU4PUEEIhTbhH oTbQwbfJ2JvutYnoXxJQ87aE6T5Cba3DLt2jxfchcZkYbb9Fq7CD1s1Ou4YTcrat3WeY tBlKXMxROHssbLVv91YaXRnBaU/wfSeUfaw29RLEawQZIKJ7UaPJpwFcyxy8BKrhpZau Y6Ztr7Tbf3+eskWP+c9n9a8zag38Qk2+c3+x1Mp87piwfMSc/7jDErlf81nXQV0Lvv8C JkGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature :arc-authentication-results; bh=GdYT6l1w4bkHvPo6EMffrTsONAryhIBjItYYY6dArHE=; b=lyOtIxOmKa0J0u4rrsVmAXvMieedzSYBN+my5J7s/nhRY6BNN6uuqcFHJOEaSUm8AZ 0DHVqALqP7DLquR2aepytVitCldNxE6qDzkz8LEg1h0x4sLxU3ZlLNh0LjZV3mCo4w/E kA40GqCMeOx8+qaIa75Qn3xrGZNdGUWGWaqK9yVQY5tRZ6zJhEahYo0KdZaMecTJVOu7 0FtjBVBARg+oTViITmuLuw8AmzU/H0jhN++ibxai1oOp8SBIY/hVkebBi23umj7SjIf3 N+dYKWf8eK1YuKJAOiuEmtxU2N6x9kvc/YTTm6r1x+zUk45S/L89g4XF72dgcYLkRwUX IzVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qGA0cDdD; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1si11226378pfm.62.2018.04.23.11.22.20; Mon, 23 Apr 2018 11:22:35 -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=@gmail.com header.s=20161025 header.b=qGA0cDdD; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932260AbeDWSUW (ORCPT + 99 others); Mon, 23 Apr 2018 14:20:22 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:38092 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932109AbeDWSUV (ORCPT ); Mon, 23 Apr 2018 14:20:21 -0400 Received: by mail-wr0-f195.google.com with SMTP id h3-v6so43865724wrh.5 for ; Mon, 23 Apr 2018 11:20:20 -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=dXIxfIwn1P2NRuvUZe2BRrtNpQ++s47cd8xil+4CiuTTeIj8kYz3GC6bCUZKYYefia DehwgW7qZrj/YZSWJmWKDmo0yU8gCx10ZK+Kbms08Vx62ddtpvaVFg7mzjZM8/mrNDl3 L0D9PFBjHkvYjxqZCDj3hlz6qusNQhE7AkafmgBxJX5Y14b7MpjyGglwR/Xj2a2sseBO gf31qaIoZcZsRhGmgvhHHFbVqQLPQCH7RDOVAdl4Udelb9675clouIaHFvGeBrWhgR44 avileKb44zp3MkOxyFGReeRe90I4Csa7jQw1dFH3VbrZjXUIC0NZsz20V4FAsXQaPQac zawQ== X-Gm-Message-State: ALQs6tD0NpXzGQdE1yDJxifJQSWdc/D30FJRCvpwaXn0DyUbW22uFxe/ dlcMATHVHe4Opd8q2D/U7j1udA== 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-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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); -- 2.16.3