From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751601AbbCSUv0 (ORCPT ); Thu, 19 Mar 2015 16:51:26 -0400 Received: from verein.lst.de ([213.95.11.211]:56005 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751569AbbCSUvX (ORCPT ); Thu, 19 Mar 2015 16:51:23 -0400 Date: Thu, 19 Mar 2015 21:51:20 +0100 From: Torsten Duwe To: ppc-dev Cc: Linux Kernel Mailing List Subject: [PATCH v0 3/4] ppc64le: kgraft support Message-ID: <20150319205120.GD19524@lst.de> References: <20150319203522.GA19524@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150319203522.GA19524@lst.de> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The kgraft hooks for ppc64. Just massaged a bit to get them to compile and not interfere. Feel free to test them if you're daring ;) diff --git a/arch/powerpc/include/asm/kgraft.h b/arch/powerpc/include/asm/kgraft.h new file mode 100644 index 0000000..7f8600d --- /dev/null +++ b/arch/powerpc/include/asm/kgraft.h @@ -0,0 +1,33 @@ +/* + * kGraft Online Kernel Patching + * + * Copyright (c) 2013-2014 SUSE + * Authors: Jiri Kosina + * Vojtech Pavlik + * Jiri Slaby + */ + +/* + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + */ + +#ifndef ASM_KGR_H +#define ASM_KGR_H + +#include +#include + +static inline void kgr_set_regs_ip(struct pt_regs *regs, unsigned long ip) +{ + regs->link = ip; +} + +static inline bool kgr_needs_lazy_migration(struct task_struct *p) +{ + return true; +} + +#endif diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index b034ecd..aa6a084 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h @@ -92,6 +92,7 @@ static inline struct thread_info *current_thread_info(void) TIF_NEED_RESCHED */ #define TIF_32BIT 4 /* 32 bit binary */ #define TIF_RESTORE_TM 5 /* need to restore TM FP/VEC/VSX */ +#define TIF_KGR_IN_PROGRESS 6 /* kGraft patching in progress */ #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ #define TIF_SINGLESTEP 8 /* singlestepping active */ #define TIF_NOHZ 9 /* in adaptive nohz mode */ @@ -115,8 +117,10 @@ static inline struct thread_info *current_thread_info(void) #define _TIF_POLLING_NRFLAG (1<