Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8115009imu; Tue, 4 Dec 2018 03:15:27 -0800 (PST) X-Google-Smtp-Source: AFSGD/WHwdX5agn8fG96E2cFOYerY8nVZbXAMiSbUItbEvbc5t6S5hYlgWCXAVgQwbug8BCa69WW X-Received: by 2002:a17:902:48:: with SMTP id 66mr18737522pla.68.1543922127402; Tue, 04 Dec 2018 03:15:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543922127; cv=none; d=google.com; s=arc-20160816; b=ceYpD8iluNjTExl8LCow+XTl/jZBaHM7TGpQUcql8bCettASuBkyb+0Jl8Kc1/7CE1 3K0bBFQojHMLeYsrkX45MMbQTo9/bhfDO/AjrDVk69DtoVe7mE066g48WwMPufMrmDQT vmgmxbZ7I9j+nfrSKFTE9/HNIHecUK6WsAacfpj7VcYa1G/Q6zM8uCbce9yEaVs8ThKA 4C8bkyowKkXya2aPQpLgKEIzfYv63XTIlxG+eECZuCimz862DxdI0lh4kzEfFTa1nHTo Pa60tlrMLG0Y+9JsUpvYNGii4VSUlDtaUvVFnX7ZrmhjgVXkex16wR9HPBi32nTrYS4i xuUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=rakvCV6dmZRb2St/s19VmBea2SEft39IKfDDd9iYMQ0=; b=BHtGoARGvz/V7rPN0e9rh7N6EZDqOOxHe19RNT8cYyR/OUmI5nWXz4bdhMVHqnaTS5 /nGNHYQrWAzIMUKqCsjmiNkjEuEWu46MSrls8Eznaq83tEwOYO3aT2qnsR7SkHXEJA7Y 6xVrknTN1ZlQgeIWuA0zIxBOvew/6uuVNFzeEHvIV1PQQhap6YdLWfpi5cnX9fDjGD29 CjnQZf0LJSEck6sV0KK+vqARn9TLaP8eR0wuLx1BYnazBLKUKn5OhU4mrmxEycQFn5LL 0mEYAKrHC9ret6zhbwDxfcyuekUoMPob44iRhwBrhZuARRKwheVu5lCijXXZq5pCLaFt CFXw== ARC-Authentication-Results: i=1; mx.google.com; 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 c37si14561022pgm.156.2018.12.04.03.15.11; Tue, 04 Dec 2018 03:15:27 -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; 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 S1728539AbeLDLOg (ORCPT + 99 others); Tue, 4 Dec 2018 06:14:36 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:44537 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727777AbeLDLOf (ORCPT ); Tue, 4 Dec 2018 06:14:35 -0500 Received: from conf.hotelmediterraneo.com ([2.228.78.71] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gU8eq-0003Qh-Hb; Tue, 04 Dec 2018 12:14:28 +0100 Date: Tue, 4 Dec 2018 12:14:13 +0100 (CET) From: Thomas Gleixner To: Greg Kroah-Hartman cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Andy Lutomirski , Linus Torvalds , Jiri Kosina , Tom Lendacky , Josh Poimboeuf , Andrea Arcangeli , David Woodhouse , Tim Chen , Andi Kleen , Dave Hansen , Casey Schaufler , Asit Mallick , Arjan van de Ven , Jon Masters , Waiman Long , Dave Stewart , Kees Cook Subject: Re: [PATCH 4.14 098/146] x86/process: Consolidate and simplify switch_to_xtra() code In-Reply-To: <20181204103730.767674414@linuxfoundation.org> Message-ID: References: <20181204103726.750894136@linuxfoundation.org> <20181204103730.767674414@linuxfoundation.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 4 Dec 2018, Greg Kroah-Hartman wrote: > --- a/arch/x86/kernel/process_32.c > +++ b/arch/x86/kernel/process_32.c > @@ -234,7 +234,6 @@ __switch_to(struct task_struct *prev_p, > struct fpu *prev_fpu = &prev->fpu; > struct fpu *next_fpu = &next->fpu; > int cpu = smp_processor_id(); > - struct tss_struct *tss = &per_cpu(cpu_tss_rw, cpu); > > /* never put a printk in __switch_to... printk() calls wake_up*() indirectly */ > > @@ -266,12 +265,7 @@ __switch_to(struct task_struct *prev_p, > if (get_kernel_rpl() && unlikely(prev->iopl != next->iopl)) > set_iopl_mask(next->iopl); > > - /* > - * Now maybe handle debug registers and/or IO bitmaps > - */ > - if (unlikely(task_thread_info(prev_p)->flags & _TIF_WORK_CTXSW_PREV || > - task_thread_info(next_p)->flags & _TIF_WORK_CTXSW_NEXT)) > - __switch_to_xtra(prev_p, next_p, tss); > + switch_to_extra(prev_p, next_p); This is missing the hunk below. Thanks, tglx 8<------------------ diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 67cecc9a2b6f..c2df91eab573 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@ -59,6 +59,8 @@ #include #include +#include "process.h" + void __show_regs(struct pt_regs *regs, int all) { unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L;