From patchwork Tue Nov 24 15:50:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 11929263 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=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 AB107C63777 for ; Tue, 24 Nov 2020 15:51:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 36541206FB for ; Tue, 24 Nov 2020 15:51:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="w2TYFosR"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="sFK2P+nv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 36541206FB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=xFluvKSwF80njtWRLmwxHvI97yD3R0TwceHdcNedcOk=; b=w2TYFosRty//jM1jKVEMbKOsQ3 Q8ZG5XftEYC8p/wOR3DCA1OCc0XuGxSxq+rGpK0oVJ9WFpXH2bQ73f83Ta0rv4/yAtGkPW3VaGQr0 UKwC4lyKSKVNltdlsMospovt0mpn97HF+Wb23OfoZOhyGrVJet0AsKg3d7BKO/e4Nleyjm3/L0h0Z SuFqDQLiY3m8UMwFmX14OrwbcH/pn+81R8Jk2n/uFSkBZ7U7E82Qgumb+/uf6P0FpQnkPQwM1OcAB OOF2vDQhhq6211CHvyhzXQKIKYao3dxTLOZ0T33m9yAGA6uE2nN2k2mFaxTdBSvGrRzctoO23EsrQ U+bGbG3g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khaak-0004s4-Pn; Tue, 24 Nov 2020 15:50:54 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khaag-0004ql-L5 for linux-arm-kernel@lists.infradead.org; Tue, 24 Nov 2020 15:50:51 +0000 Received: from localhost.localdomain (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4E4FD206F7; Tue, 24 Nov 2020 15:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606233049; bh=yoeRj4z5iLRdLbFu53ck1gIL1842BAqIhWtAD0VR2Tk=; h=From:To:Cc:Subject:Date:From; b=sFK2P+nvwsOkOCUTTAQWExKGMp1llBY1idSsHQR3G8+ZfsmDfDOydQWVQwNjODzpb xA1+lEG4+iwF3Q3WJGQNW5xFPiDEAMzNJyFHnT/Ruv5t1qU+YcEdJZlaaUKTOFRHZa B2BNV2WJReTFe0YYSyXcDYrPQhYSAWXgbPogpm8g= From: Will Deacon To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 00/14] An alternative series for asymmetric AArch32 systems Date: Tue, 24 Nov 2020 15:50:25 +0000 Message-Id: <20201124155039.13804-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201124_105050_905774_8CC9F47F X-CRM114-Status: GOOD ( 14.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Marc Zyngier , kernel-team@android.com, Vincent Guittot , Juri Lelli , Quentin Perret , Peter Zijlstra , Catalin Marinas , Johannes Weiner , linux-kernel@vger.kernel.org, Qais Yousef , Suren Baghdasaryan , Ingo Molnar , Li Zefan , Greg Kroah-Hartman , Tejun Heo , Will Deacon , Morten Rasmussen Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello folks, Here's version four of the wonderful patches I previously posted here: v1: https://lore.kernel.org/r/20201027215118.27003-1-will@kernel.org v2: https://lore.kernel.org/r/20201109213023.15092-1-will@kernel.org v3: https://lore.kernel.org/r/20201113093720.21106-1-will@kernel.org and which started life as a reimplementation of some patches from Qais: https://lore.kernel.org/r/20201021104611.2744565-1-qais.yousef@arm.com The aim of this series is to allow 32-bit ARM applications to run on arm64 SoCs where not all of the CPUs support the 32-bit instruction set. Unfortunately, such SoCs are real and will continue to be productised over the next few years at least. Changes in v4 include: * Take into account the cpuset 'allowed' mask on exec * Print a warning if we forcefully override the affinity, like we do in select_fallback_rq() * Rename arch_cpu_allowed_mask() to arch_task_cpu_possible_mask() * Added a comment to adjust_compat_task_affinity() Cheers, Will Cc: Catalin Marinas Cc: Marc Zyngier Cc: Greg Kroah-Hartman Cc: Peter Zijlstra Cc: Morten Rasmussen Cc: Qais Yousef Cc: Suren Baghdasaryan Cc: Quentin Perret Cc: Tejun Heo Cc: Li Zefan Cc: Johannes Weiner Cc: Ingo Molnar Cc: Juri Lelli Cc: Vincent Guittot Cc: kernel-team@android.com --->8 Will Deacon (14): arm64: cpuinfo: Split AArch32 registers out into a separate struct arm64: Allow mismatched 32-bit EL0 support KVM: arm64: Kill 32-bit vCPUs on systems with mismatched EL0 support arm64: Kill 32-bit applications scheduled on 64-bit-only CPUs arm64: Advertise CPUs capable of running 32-bit applications in sysfs arm64: Hook up cmdline parameter to allow mismatched 32-bit EL0 sched: Introduce restrict_cpus_allowed_ptr() to limit task CPU affinity arm64: exec: Adjust affinity for compat tasks with mismatched 32-bit EL0 cpuset: Don't use the cpu_possible_mask as a last resort for cgroup v1 sched: Introduce arch_task_cpu_possible_mask() to limit fallback rq selection sched: Reject CPU affinity changes based on arch_task_cpu_possible_mask() arm64: Prevent offlining first CPU with 32-bit EL0 on mismatched system arm64: Implement arch_task_cpu_possible_mask() arm64: Remove logic to kill 32-bit tasks on 64-bit-only cores .../ABI/testing/sysfs-devices-system-cpu | 9 + .../admin-guide/kernel-parameters.txt | 7 + arch/arm64/include/asm/cpu.h | 44 ++-- arch/arm64/include/asm/cpucaps.h | 2 +- arch/arm64/include/asm/cpufeature.h | 8 +- arch/arm64/include/asm/mmu_context.h | 13 ++ arch/arm64/kernel/cpufeature.c | 219 ++++++++++++++---- arch/arm64/kernel/cpuinfo.c | 53 +++-- arch/arm64/kernel/process.c | 47 +++- arch/arm64/kvm/arm.c | 11 +- include/linux/sched.h | 1 + kernel/cgroup/cpuset.c | 6 +- kernel/sched/core.c | 90 +++++-- 13 files changed, 401 insertions(+), 109 deletions(-)