Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4145152ybl; Sat, 21 Dec 2019 00:34:37 -0800 (PST) X-Google-Smtp-Source: APXvYqzsUmY7yyLMDqMFIMLte0F7uO7A3PKbpkvRG6DAYXei87Vw7DevtpkE0n1nZMS3Ts8epqzb X-Received: by 2002:a9d:7ccc:: with SMTP id r12mr20775576otn.22.1576917277273; Sat, 21 Dec 2019 00:34:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576917277; cv=none; d=google.com; s=arc-20160816; b=rUbhKOCLzZF6/oVEEmtmka6oSNPJDuu6SlrjFQ1yTK0HMDY8nah1Hymj1A0331OvqE 8DWiT16G/2G257lt5fIfj9Dpuh/di5J9Elfcwfj3xi8IVt+1++gM+bMG/vt6TUI6+sVm MCwFYoxwuEm+MLAMTPABNSj/68HuSCz716ZePNPkLcPUhEUCteDb2RzJzdwOmVib6MvT 5HWQKE0NTVUXsdj+R8zH0MAWLpX476+Cu3yK5xmv4RFQDVfAZtgCGrWXj+hqe/dieUUC Ig9UUQ0vl2pIW0R29nlp8vdcl2BO/9IOoTXOD6jDe/Q7xIizutK7tQeRjvsDXXFD28HW RV/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id :dkim-signature; bh=E9RKebUP1SppGa2SP1hXCPrAmxC2lQWVebR4woXcBx4=; b=ldG5nHyb4sN7JALimdN7TkjtTTh29DtqbzlUlHKAD2LQFsifHiSzbvWrEzuKQbh4tR LkkMycclY7WD98eRpeEgWhYWuMsZb51Al0tzUIFFyRlvPoL3gpN1Zjhc3muFzvwfpZgp Ejg0d81rguDVqVy4NorOAV/Y1/o0TOrU27oqTGykiQrzxItRbwfXiLMjO//YprLWD6td 23lkszDrY0cOHjuERDWHPqVDidQw/pWw2EEs2YABr8kixgIGN99mDWP3DI+fn2LCGt04 89n3BDh15TgrZxnjM3gRABe+yQSCOOzYMMV9B9SiDjQQMaARsSqaUZi++fj6vYLZfoex R4sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b="X/CC3zVj"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u12si3344788oiv.13.2019.12.21.00.34.26; Sat, 21 Dec 2019 00:34:37 -0800 (PST) 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=@c-s.fr header.s=mail header.b="X/CC3zVj"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726138AbfLUIcZ (ORCPT + 99 others); Sat, 21 Dec 2019 03:32:25 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:29373 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725845AbfLUIcZ (ORCPT ); Sat, 21 Dec 2019 03:32:25 -0500 Received: from localhost (mailhub1-ext [192.168.12.233]) by localhost (Postfix) with ESMTP id 47fzPd2RhCz9v1Kt; Sat, 21 Dec 2019 09:32:21 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=X/CC3zVj; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 9CZTJWpIb3oz; Sat, 21 Dec 2019 09:32:21 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 47fzPd0n8yz9v1Ks; Sat, 21 Dec 2019 09:32:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1576917141; bh=E9RKebUP1SppGa2SP1hXCPrAmxC2lQWVebR4woXcBx4=; h=From:Subject:To:Cc:Date:From; b=X/CC3zVji3J7DK/g7Rrz/AyTo0Y5CoJMc25c7ql5rHqSRlTGaSqbTh4XA6EWt4SON g8dx7mQjw0IIqrUJTPNqMqOKZEn1YAyfja8qRjAHISFddOuN4hWvU9bO+610hzQw4x lGCJEXigJhDEI6ZgPMcq/MuxAcrBh5X+DBf1P/2c= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 02CFC8B77C; Sat, 21 Dec 2019 09:32:22 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id jxdAh1n2NAhk; Sat, 21 Dec 2019 09:32:21 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id ACFFE8B752; Sat, 21 Dec 2019 09:32:21 +0100 (CET) Received: by localhost.localdomain (Postfix, from userid 0) id 4B883637B6; Sat, 21 Dec 2019 08:32:21 +0000 (UTC) Message-Id: From: Christophe Leroy Subject: [PATCH v5 00/17] Enable CONFIG_VMAP_STACK on PPC32 To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , dja@axtens.net Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org Date: Sat, 21 Dec 2019 08:32:21 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The purpose of this serie is to enable CONFIG_VMAP_STACK on PPC32. rfc v1: initial support on 8xx rfc v2: added stack overflow detection. v3: - Stack overflow detection works, tested with LKDTM STACK_EXHAUST test - Support for book3s32 added v4: - Fixed build failure with CONFIG_KVM (patch 14) - Fixed boot failure with pmac32_defconfig+VMAP_STACK+KVM (new patch 15) - Fixed crash with altivec and fpu (patch 16) v5: - Reduced ifdefs around tophys/tovirt by using macros (patch 5) - Reorganised stack overflow handling, making it independent of the existing one which could go away in another series (patch 7) - Added vmapped stacks for interrupts (new patch 8) Christophe Leroy (17): powerpc/32: replace MTMSRD() by mtmsr powerpc/32: Add EXCEPTION_PROLOG_0 in head_32.h powerpc/32: save DEAR/DAR before calling handle_page_fault powerpc/32: move MSR_PR test into EXCEPTION_PROLOG_0 powerpc/32: add a macro to get and/or save DAR and DSISR on stack. powerpc/32: prepare for CONFIG_VMAP_STACK powerpc: align stack to 2 * THREAD_SIZE with VMAP_STACK powerpc/32: Add early stack overflow detection with VMAP stack. powerpc/32: Use vmapped stacks for interrupts powerpc/8xx: Use alternative scratch registers in DTLB miss handler powerpc/8xx: drop exception entries for non-existing exceptions powerpc/8xx: move DataStoreTLBMiss perf handler powerpc/8xx: split breakpoint exception powerpc/8xx: Enable CONFIG_VMAP_STACK powerpc/32s: reorganise DSI handler. powerpc/32s: avoid crossing page boundary while changing SRR0/1. powerpc/32s: Enable CONFIG_VMAP_STACK arch/powerpc/include/asm/processor.h | 6 ++ arch/powerpc/include/asm/thread_info.h | 18 ++++ arch/powerpc/kernel/asm-offsets.c | 6 ++ arch/powerpc/kernel/entry_32.S | 29 +++--- arch/powerpc/kernel/fpu.S | 3 + arch/powerpc/kernel/head_32.S | 61 ++++++----- arch/powerpc/kernel/head_32.h | 178 +++++++++++++++++++++++++++---- arch/powerpc/kernel/head_40x.S | 2 + arch/powerpc/kernel/head_8xx.S | 184 +++++++++++++++------------------ arch/powerpc/kernel/head_booke.h | 2 + arch/powerpc/kernel/head_fsl_booke.S | 1 + arch/powerpc/kernel/irq.c | 22 ++++ arch/powerpc/kernel/setup.h | 2 +- arch/powerpc/kernel/setup_32.c | 17 ++- arch/powerpc/kernel/setup_64.c | 2 +- arch/powerpc/kernel/traps.c | 9 ++ arch/powerpc/kernel/vector.S | 3 + arch/powerpc/kernel/vmlinux.lds.S | 2 +- arch/powerpc/mm/book3s32/hash_low.S | 46 ++++++--- arch/powerpc/mm/book3s32/mmu.c | 9 +- arch/powerpc/perf/8xx-pmu.c | 12 ++- arch/powerpc/platforms/Kconfig.cputype | 3 + 22 files changed, 435 insertions(+), 182 deletions(-) -- 2.13.3