Skip to content

Commit

Permalink
x86/xen: eliminate some private header files
Browse files Browse the repository at this point in the history
Under arch/x86/xen there is one large private header file xen-ops.h
containing most of the Xen-private x86 related declarations, and then
there are several small headers with a handful of declarations each.

Merge the small headers into xen-ops.h.

While doing that, move the declaration of xen_fifo_events from
xen-ops.h into include/xen/events.h where it should have been from the
beginning.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Message-ID: <20240710093718.14552-3-jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
  • Loading branch information
Juergen Gross committed Jul 11, 2024
1 parent 337c628 commit bcea31e
Show file tree
Hide file tree
Showing 23 changed files with 152 additions and 206 deletions.
2 changes: 0 additions & 2 deletions arch/x86/xen/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include <xen/xen.h>
#include <xen/interface/physdev.h>
#include "xen-ops.h"
#include "pmu.h"
#include "smp.h"

static unsigned int xen_io_apic_read(unsigned apic, unsigned reg)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/xen/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <linux/debugfs.h>
#include <linux/slab.h>

#include "debugfs.h"
#include "xen-ops.h"

static struct dentry *d_xen_debug;

Expand Down
7 changes: 0 additions & 7 deletions arch/x86/xen/debugfs.h

This file was deleted.

2 changes: 0 additions & 2 deletions arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#include <asm/setup.h>

#include "xen-ops.h"
#include "smp.h"
#include "pmu.h"

EXPORT_SYMBOL_GPL(hypercall_page);

Expand Down
2 changes: 0 additions & 2 deletions arch/x86/xen/enlighten_hvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
#include <asm/xen/page.h>

#include "xen-ops.h"
#include "mmu.h"
#include "smp.h"

static unsigned long shared_info_pfn;

Expand Down
4 changes: 0 additions & 4 deletions arch/x86/xen/enlighten_pv.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@
#endif

#include "xen-ops.h"
#include "mmu.h"
#include "smp.h"
#include "multicalls.h"
#include "pmu.h"

#include "../kernel/cpu/cpu.h" /* get_cpu_cap() */

Expand Down
3 changes: 1 addition & 2 deletions arch/x86/xen/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
#include <asm/xen/hypercall.h>
#include <xen/interface/memory.h>

#include "multicalls.h"
#include "mmu.h"
#include "xen-ops.h"

unsigned long arbitrary_virt_to_mfn(void *vaddr)
{
Expand Down
24 changes: 0 additions & 24 deletions arch/x86/xen/mmu.h

This file was deleted.

2 changes: 1 addition & 1 deletion arch/x86/xen/mmu_hvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <xen/interface/xen.h>
#include <xen/hvm.h>

#include "mmu.h"
#include "xen-ops.h"

#ifdef CONFIG_PROC_VMCORE
/*
Expand Down
4 changes: 1 addition & 3 deletions arch/x86/xen/mmu_pv.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@
#include <xen/hvc-console.h>
#include <xen/swiotlb-xen.h>

#include "multicalls.h"
#include "mmu.h"
#include "debugfs.h"
#include "xen-ops.h"

/*
* Prototypes for functions called via PV_CALLEE_SAVE_REGS_THUNK() in order
Expand Down
3 changes: 1 addition & 2 deletions arch/x86/xen/multicalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@

#include <asm/xen/hypercall.h>

#include "multicalls.h"
#include "debugfs.h"
#include "xen-ops.h"

#define MC_BATCH 32

Expand Down
69 changes: 0 additions & 69 deletions arch/x86/xen/multicalls.h

This file was deleted.

2 changes: 0 additions & 2 deletions arch/x86/xen/p2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
#include <xen/balloon.h>
#include <xen/grant_table.h>

#include "multicalls.h"
#include "xen-ops.h"

#define P2M_MID_PER_PAGE (PAGE_SIZE / sizeof(unsigned long *))
Expand Down Expand Up @@ -795,7 +794,6 @@ int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops,

#ifdef CONFIG_XEN_DEBUG_FS
#include <linux/debugfs.h>
#include "debugfs.h"
static int p2m_dump_show(struct seq_file *m, void *v)
{
static const char * const type_name[] = {
Expand Down
1 change: 0 additions & 1 deletion arch/x86/xen/pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <xen/interface/xenpmu.h>

#include "xen-ops.h"
#include "pmu.h"

/* x86_pmu.handle_irq definition */
#include "../events/perf_event.h"
Expand Down
22 changes: 0 additions & 22 deletions arch/x86/xen/pmu.h

This file was deleted.

1 change: 0 additions & 1 deletion arch/x86/xen/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <xen/features.h>
#include <xen/hvc-console.h>
#include "xen-ops.h"
#include "mmu.h"

#define GB(x) ((uint64_t)(x) * 1024 * 1024 * 1024)

Expand Down
1 change: 0 additions & 1 deletion arch/x86/xen/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#include <xen/hvc-console.h>
#include "xen-ops.h"
#include "smp.h"

static DEFINE_PER_CPU(struct xen_common_irq, xen_resched_irq) = { .irq = -1 };
static DEFINE_PER_CPU(struct xen_common_irq, xen_callfunc_irq) = { .irq = -1 };
Expand Down
51 changes: 0 additions & 51 deletions arch/x86/xen/smp.h

This file was deleted.

2 changes: 0 additions & 2 deletions arch/x86/xen/smp_hvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#include <xen/events.h>

#include "xen-ops.h"
#include "smp.h"


static void __init xen_hvm_smp_prepare_boot_cpu(void)
{
Expand Down
3 changes: 0 additions & 3 deletions arch/x86/xen/smp_pv.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@

#include <xen/hvc-console.h>
#include "xen-ops.h"
#include "mmu.h"
#include "smp.h"
#include "pmu.h"

cpumask_var_t xen_cpu_initialized_map;

Expand Down
2 changes: 0 additions & 2 deletions arch/x86/xen/suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#include <asm/fixmap.h>

#include "xen-ops.h"
#include "mmu.h"
#include "pmu.h"

static DEFINE_PER_CPU(u64, spec_ctrl);

Expand Down
Loading

0 comments on commit bcea31e

Please sign in to comment.