Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2357660pxf; Sat, 13 Mar 2021 17:53:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHq3bHhOQ82hVANu/+73K6VX7A2Y8sdCU3V/IhkcIj01V4YUNVm0817otbP5r/8lC4umQB X-Received: by 2002:a17:906:71d3:: with SMTP id i19mr16702503ejk.347.1615686794458; Sat, 13 Mar 2021 17:53:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615686794; cv=none; d=google.com; s=arc-20160816; b=QBsnjzK+G5QZ4u0mKOeNWhFYZ0QsYospmeLcLLMJF+3CIfu6kRy4Pv3r+PXiKp/7Zz BQsM4dZtcM0DAJP3spbLX3TFtiJUtrkbWzWyMKUWKYCfFX+CBgFZu/xl+1RRKQxdJZPG VituhzYlAkQftrv2qNthz1OTGx1efkXCuESKDyhZkLTGPUIdc2RKSE/PB7pXe5OoUe+T qZI4ldXSwcXl3FVsFcnKYgNIP/nf0VgKk9WiMXCFwXj5qxjUNHnyF5w5k0hbkrmehmyv vSkjW1Qih94nEqahoW5NDgAiMmWceK0Rbr+GwDnuomeJ6oBbLFP1bf3kLZF1DOyq4w9D e7XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=rQOE1eknqwPe7sb4PNF1o11fPcRsbtlVoGQ7PysQrKg=; b=Z8bCJ2+piIlKb5LdUBKdERWVzZzVTYEFUojkjIUjbyh9wgiR7LaW8meJgsoAjbo9TB h2ZY/QBEwqW8xqBcq4oJw62ABMZPfpcWyp1972tPXyQ8I4MYRpNz8mfsG75Lc6CPxGIB b11T2rQ/cuAOJYXouJxJxdf32/wzUNofMK/BHss4XtSOUst8N4Y+GPn8KcgKIJe7dRRK JOnJPcCJnJwhgm2x39iFAjsC6hg8R1aD9/zCkrMf4JmUgctwBWLfHM+bqXqMnXYGJWwE m5y72Z+7NBKhS1UYMMxgDCSgVLwDj7uVeJZJkt44ROl8IdFzp3ATzh4JNz8M3IeXDmbS sidw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lfIqBM61; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m23si7898284edq.397.2021.03.13.17.52.50; Sat, 13 Mar 2021 17:53:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lfIqBM61; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234668AbhCNBTL (ORCPT + 99 others); Sat, 13 Mar 2021 20:19:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:42352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231205AbhCNBSw (ORCPT ); Sat, 13 Mar 2021 20:18:52 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F329664E62 for ; Sun, 14 Mar 2021 01:18:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615684732; bh=k3lSEvG5L8w7S3VROoNto1+EQdiQn0y7S+T14iQSFAI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=lfIqBM61hja+SRAPGbOvB1Td8qzfjPqcS+ez2umM02iunhhBHXtKMvwMnDbrJz+3o fjP1pxPnJZF6ao8Pq+7NKWQWSO4/sWZeGmQeAzVA420P799J2I9hldMg1CG+Ou0sqS bjcV23XuOqGK6j5RTPWkDel5lBlfZNeBL/Xb54mDII9QsG0N561uQN++stnRaT2pmZ 2TVEF5ZPsNEDapHaHxfzDBd8OS6dcrOa6ozWEe9HZv0wGdnzRsqmuX/u4xItmPvPJW ouznZo37GwkWvYyKcccQCOXacYOOpad8tTBhshc4VNVlFYvlLC9rf8Bg8qYpdbrnKu QbDiA+npv1CZA== Received: by mail-ej1-f43.google.com with SMTP id r17so60459537ejy.13 for ; Sat, 13 Mar 2021 17:18:51 -0800 (PST) X-Gm-Message-State: AOAM532RJNhWgRAsdprTluWzyov7/evGJKiIsFQD8+t6qz/ld0L66m/a OrWMQJTWgFNkLOOA9qLH+bmdAdim/Q/BeRChEom9UA== X-Received: by 2002:a17:906:1494:: with SMTP id x20mr16325195ejc.101.1615684730514; Sat, 13 Mar 2021 17:18:50 -0800 (PST) MIME-Version: 1.0 References: <20210308100602.GC7951@C02TD0UTHF1T.local> In-Reply-To: <20210308100602.GC7951@C02TD0UTHF1T.local> From: Andy Lutomirski Date: Sat, 13 Mar 2021 17:18:39 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 07/11] kentry: Make entry/exit_to_user_mode() arm64-only To: Mark Rutland Cc: Andy Lutomirski , X86 ML , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 8, 2021 at 2:06 AM Mark Rutland wrote: > > On Thu, Mar 04, 2021 at 11:06:00AM -0800, Andy Lutomirski wrote: > > exit_to_user_mode() does part, but not all, of the exit-to-user-mode work. > > It's used only by arm64, and arm64 should stop using it (hint, hint!). > > Compile it out on other architectures to minimize the chance of error. > > For context, I do plan to move over, but there's a reasonable amount of > preparatory work needed first (e.g. factoring out the remaining asm > entry points, and reworking our pseudo-NMI management to play nicely > with the common entry code). > > > enter_from_user_mode() is a legacy way to spell > > kentry_enter_from_user_mode(). It's also only used by arm64. Give it > > the same treatment. > > I think you can remove these entirely, no ifdeferry necessary. > > Currently arm64 cannot select CONFIG_GENERIC_ENTRY, so we open-code > copies of these in arch/arm64/kernel/entry-common.c, and doesn't use > these common versions at all. When we move over to the common code we > can move directly to the kentry_* versions. If we are relying on the > prototypes anywhere, that's a bug as of itself. I got faked out! Fixed for the next version.