process.c (728d90bdc9e480dc93913e59a0aa3c896c7aa697) process.c (b57aeab811db07295f646808b1b17c312d17f57d)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Derived from "arch/i386/kernel/process.c"
4 * Copyright (C) 1995 Linus Torvalds
5 *
6 * Updated and modified by Cort Dougan (cort@cs.nmt.edu) and
7 * Paul Mackerras (paulus@cs.anu.edu.au)
8 *

--- 701 unchanged lines hidden (view full) ---

710 __set_breakpoint(brk);
711 preempt_enable();
712}
713
714static void set_debug_reg_defaults(struct thread_struct *thread)
715{
716 thread->hw_brk.address = 0;
717 thread->hw_brk.type = 0;
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Derived from "arch/i386/kernel/process.c"
4 * Copyright (C) 1995 Linus Torvalds
5 *
6 * Updated and modified by Cort Dougan (cort@cs.nmt.edu) and
7 * Paul Mackerras (paulus@cs.anu.edu.au)
8 *

--- 701 unchanged lines hidden (view full) ---

710 __set_breakpoint(brk);
711 preempt_enable();
712}
713
714static void set_debug_reg_defaults(struct thread_struct *thread)
715{
716 thread->hw_brk.address = 0;
717 thread->hw_brk.type = 0;
718 thread->hw_brk.len = 0;
719 thread->hw_brk.hw_len = 0;
718 if (ppc_breakpoint_available())
719 set_breakpoint(&thread->hw_brk);
720}
721#endif /* !CONFIG_HAVE_HW_BREAKPOINT */
722#endif /* CONFIG_PPC_ADV_DEBUG_REGS */
723
724#ifdef CONFIG_PPC_ADV_DEBUG_REGS
725static inline int __set_dabr(unsigned long dabr, unsigned long dabrx)

--- 85 unchanged lines hidden (view full) ---

811 struct arch_hw_breakpoint *b)
812{
813 if (a->address != b->address)
814 return false;
815 if (a->type != b->type)
816 return false;
817 if (a->len != b->len)
818 return false;
720 if (ppc_breakpoint_available())
721 set_breakpoint(&thread->hw_brk);
722}
723#endif /* !CONFIG_HAVE_HW_BREAKPOINT */
724#endif /* CONFIG_PPC_ADV_DEBUG_REGS */
725
726#ifdef CONFIG_PPC_ADV_DEBUG_REGS
727static inline int __set_dabr(unsigned long dabr, unsigned long dabrx)

--- 85 unchanged lines hidden (view full) ---

813 struct arch_hw_breakpoint *b)
814{
815 if (a->address != b->address)
816 return false;
817 if (a->type != b->type)
818 return false;
819 if (a->len != b->len)
820 return false;
821 /* no need to check hw_len. it's calculated from address and len */
819 return true;
820}
821
822#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
823
824static inline bool tm_enabled(struct task_struct *tsk)
825{
826 return tsk && tsk->thread.regs && (tsk->thread.regs->msr & MSR_TM);

--- 1364 unchanged lines hidden ---
822 return true;
823}
824
825#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
826
827static inline bool tm_enabled(struct task_struct *tsk)
828{
829 return tsk && tsk->thread.regs && (tsk->thread.regs->msr & MSR_TM);

--- 1364 unchanged lines hidden ---