Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6415998imm; Wed, 27 Jun 2018 07:23:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKhgyj3o7oNO9f+10C/gI+0xWHChqFbAeq0TMi23ft8nAT+ub80uydGrGDwoUtdkm/n8JCL X-Received: by 2002:a17:902:5602:: with SMTP id h2-v6mr6422155pli.314.1530109398425; Wed, 27 Jun 2018 07:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530109398; cv=none; d=google.com; s=arc-20160816; b=GKGYTCt1W4bSiQMLGjQpedZLMXGFj5GbasVvPzUrPqm4HLXBJmggBvZs4T0z+XkcyR oEXoi5D9KpqpTTPHlMK5qUTFfUU2bUqW8HE88dmkWABACBTWTE1y56OyRnLVzjkvKs3J oWa9/iNXqFIpREhs5oQC7v7z2okzc24rCDDCB5VexETQfTDss/TmaHBVphYcOt/NrXXI KQau0tk1tew6X7Q1VpZaWlUSlYtKtq2XJAp3ZCKQFHkvfTlFxRt/wGP+I562slrZVbtW nxQP9YYWjud1DxKIgE6uHztR3WqH/3UAAjYn9xqtyxOrgIzk+OjPvnx6INZc590fZ6PC MM8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ESUSYi8ZtnKAb4t2407Qvuw8NiIBJluqwBWh6vlN2HI=; b=GHmAfIk0oAUcNWnK9FONpxUmzRs/H2azJd108aT+T1fSTvAVxtTEE2VbJR9AmYCkJ+ Sn6vY4wFT8us08qy23UVGbT8BTwqbt2ribXGHkL4bhB96dh9MX/+JTyPurtfDKRgsylD B6FCm5HgH/Y6wjWle/LlSJkChpa1P62ow4+34hpL9dDkZ9fyvCTdkrJTOPSr2GI2NyIZ g/OZfHHMlsz7G/kHS/Z4HVLBLj4ZKLEyDtwOojQgVHbBGNzwR2GY9wUthRez3oyruIz1 GfK4EclyuX5A5H6GXNaDawES6ihCF8Ia6BHLjBQztI9l9R2PNarHjlZ89PAu8pdVEl4C 7U7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Nevxtr2i; 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 g33-v6si4294516plb.297.2018.06.27.07.23.04; Wed, 27 Jun 2018 07:23:18 -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=Nevxtr2i; 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 S965339AbeF0OU5 (ORCPT + 99 others); Wed, 27 Jun 2018 10:20:57 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:37056 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965209AbeF0OU4 (ORCPT ); Wed, 27 Jun 2018 10:20:56 -0400 Received: by mail-pg0-f67.google.com with SMTP id o11-v6so990717pgv.4 for ; Wed, 27 Jun 2018 07:20:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ESUSYi8ZtnKAb4t2407Qvuw8NiIBJluqwBWh6vlN2HI=; b=Nevxtr2iyaMQ9crpXgQAvPurVGikgKH5J7ou2cws8CH2zus30PUU35/uyy7spmJiOd ojqT9jYW/j0O5bIiJPd5vWJOx8JRIij1QMRD2pmHWPiS1X7GA+sPXeXu04JlNzCpUx3p 4v0XHK+4ey8VbdhW4TuGFH6Z2YZzdJEeevVTBkDhv74/KAuuEszvRwWB43rqsaY6lV1v nu5EB9s3Vx3lAP2MnTGb2YdLRsv4D0q1BiV8cz/8Fu1hcRYBHbuAPmwLU6Gh0xbKWIQa ZFGmKrRJTS0D7vzN//FSClq6aCGFMjhWMVI57B4BY2TfdvPQ20pgWBoC1/lFUmFnqccy ruIg== 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:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ESUSYi8ZtnKAb4t2407Qvuw8NiIBJluqwBWh6vlN2HI=; b=V9ZMnFzjr/l0wEXk7ZIOGXkk77qOs23jNwMbUk9Ylw89V1m4Yubw9XyUELVcqfqZxc oG3iADnbLQRgi4WUoyQi/WOYPpWIhHpropGMLAo8BWkZdCbYYxJM/L7McdTfVJkR77ha V8PW+Q0vzYJyhYhmsAgpuRdZXfCYq6N963zlSb3G25yye/jIDKnels1x+AzKIMtj8U// lT1FyAp4pQaQwgZ2MyviNK01CwDUwGQZu38GHWcu/tq/KH4/DID4xTCT1AFOph0LhiyU EDZxsOSN33dn4y5QQQLFlW+FEQnZ5GR/9PUTvyK4dorLSIjG4DRfbFflSSoSn0cGyDA8 G8bw== X-Gm-Message-State: APt69E0OhAfir29OTvLRubpmxOLq2nS9MoXNTuKIGQrWj6dfswsc5Ys4 7mp0eJx2jLbnYeDPOqLIpEU= X-Received: by 2002:a63:790b:: with SMTP id u11-v6mr3242985pgc.111.1530109256140; Wed, 27 Jun 2018 07:20:56 -0700 (PDT) Received: from localhost ([121.137.63.184]) by smtp.gmail.com with ESMTPSA id n6-v6sm13789021pfk.36.2018.06.27.07.20.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Jun 2018 07:20:55 -0700 (PDT) Date: Wed, 27 Jun 2018 23:20:53 +0900 From: Sergey Senozhatsky To: Ard Biesheuvel Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , Kees Cook , Will Deacon , Michael Ellerman , Thomas Garnier , Thomas Gleixner , "Serge E. Hallyn" , Bjorn Helgaas , Benjamin Herrenschmidt , Russell King , Paul Mackerras , Catalin Marinas , Petr Mladek , Ingo Molnar , James Morris , Andrew Morton , Nicolas Pitre , Josh Poimboeuf , Steven Rostedt , Sergey Senozhatsky , Linus Torvalds , Jessica Yu , linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org Subject: Re: [PATCH v9 4/6] init: allow initcall tables to be emitted using relative references Message-ID: <20180627142053.GB477@tigerII.localdomain> References: <20180626182802.19932-1-ard.biesheuvel@linaro.org> <20180626182802.19932-5-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180626182802.19932-5-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (06/26/18 20:27), Ard Biesheuvel wrote: > /* > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index 247808333ba4..688a27b0888c 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -2772,7 +2772,8 @@ EXPORT_SYMBOL(unregister_console); > void __init console_init(void) > { > int ret; > - initcall_t *call; > + initcall_t call; > + initcall_entry_t *ce; > > /* Setup the default TTY line discipline. */ > n_tty_init(); > @@ -2781,13 +2782,14 @@ void __init console_init(void) > * set up the console device so that later boot sequences can > * inform about problems etc.. > */ > - call = __con_initcall_start; > + ce = __con_initcall_start; > trace_initcall_level("console"); > - while (call < __con_initcall_end) { > - trace_initcall_start((*call)); > - ret = (*call)(); > - trace_initcall_finish((*call), ret); > - call++; > + while (ce < __con_initcall_end) { > + call = initcall_from_entry(ce); > + trace_initcall_start(call); > + ret = call(); > + trace_initcall_finish(call, ret); > + ce++; > } > } printk bits look OK to me. The patch set works fine on my x86_64 and does reduce the size of vmlinux. Acked-by: Sergey Senozhatsky -ss