lpar.c (ecd740c6f2f092b90b95fa35f757973589eaaca2) lpar.c (cc1adb5f32557f10f48e8febbef7278a2db9d593)
1/*
2 * pSeries_lpar.c
3 * Copyright (C) 2001 Todd Inglett, IBM Corporation
4 *
5 * pSeries LPAR support.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

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

21
22/* Enables debugging of low-level hash table routines - careful! */
23#undef DEBUG
24
25#include <linux/kernel.h>
26#include <linux/dma-mapping.h>
27#include <linux/console.h>
28#include <linux/export.h>
1/*
2 * pSeries_lpar.c
3 * Copyright (C) 2001 Todd Inglett, IBM Corporation
4 *
5 * pSeries LPAR support.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

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

21
22/* Enables debugging of low-level hash table routines - careful! */
23#undef DEBUG
24
25#include <linux/kernel.h>
26#include <linux/dma-mapping.h>
27#include <linux/console.h>
28#include <linux/export.h>
29#include <linux/static_key.h>
29#include <asm/processor.h>
30#include <asm/mmu.h>
31#include <asm/page.h>
32#include <asm/pgtable.h>
33#include <asm/machdep.h>
34#include <asm/mmu_context.h>
35#include <asm/iommu.h>
36#include <asm/tlbflush.h>

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

644
645 pSeries_set_page_state(page, order, H_PAGE_SET_UNUSED);
646}
647EXPORT_SYMBOL(arch_free_page);
648
649#endif
650
651#ifdef CONFIG_TRACEPOINTS
30#include <asm/processor.h>
31#include <asm/mmu.h>
32#include <asm/page.h>
33#include <asm/pgtable.h>
34#include <asm/machdep.h>
35#include <asm/mmu_context.h>
36#include <asm/iommu.h>
37#include <asm/tlbflush.h>

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

645
646 pSeries_set_page_state(page, order, H_PAGE_SET_UNUSED);
647}
648EXPORT_SYMBOL(arch_free_page);
649
650#endif
651
652#ifdef CONFIG_TRACEPOINTS
653#ifdef CONFIG_JUMP_LABEL
654struct static_key hcall_tracepoint_key = STATIC_KEY_INIT;
655
656void hcall_tracepoint_regfunc(void)
657{
658 static_key_slow_inc(&hcall_tracepoint_key);
659}
660
661void hcall_tracepoint_unregfunc(void)
662{
663 static_key_slow_dec(&hcall_tracepoint_key);
664}
665#else
652/*
653 * We optimise our hcall path by placing hcall_tracepoint_refcount
654 * directly in the TOC so we can check if the hcall tracepoints are
655 * enabled via a single load.
656 */
657
658/* NB: reg/unreg are called while guarded with the tracepoints_mutex */
659extern long hcall_tracepoint_refcount;
660
666/*
667 * We optimise our hcall path by placing hcall_tracepoint_refcount
668 * directly in the TOC so we can check if the hcall tracepoints are
669 * enabled via a single load.
670 */
671
672/* NB: reg/unreg are called while guarded with the tracepoints_mutex */
673extern long hcall_tracepoint_refcount;
674
661/*
662 * Since the tracing code might execute hcalls we need to guard against
663 * recursion. One example of this are spinlocks calling H_YIELD on
664 * shared processor partitions.
665 */
666static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
667
668void hcall_tracepoint_regfunc(void)
669{
670 hcall_tracepoint_refcount++;
671}
672
673void hcall_tracepoint_unregfunc(void)
674{
675 hcall_tracepoint_refcount--;
676}
675void hcall_tracepoint_regfunc(void)
676{
677 hcall_tracepoint_refcount++;
678}
679
680void hcall_tracepoint_unregfunc(void)
681{
682 hcall_tracepoint_refcount--;
683}
684#endif
677
685
686/*
687 * Since the tracing code might execute hcalls we need to guard against
688 * recursion. One example of this are spinlocks calling H_YIELD on
689 * shared processor partitions.
690 */
691static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
692
693
678void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
679{
680 unsigned long flags;
681 unsigned int *depth;
682
683 /*
684 * We cannot call tracepoints inside RCU idle regions which
685 * means we must not trace H_CEDE.

--- 89 unchanged lines hidden ---
694void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
695{
696 unsigned long flags;
697 unsigned int *depth;
698
699 /*
700 * We cannot call tracepoints inside RCU idle regions which
701 * means we must not trace H_CEDE.

--- 89 unchanged lines hidden ---