Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 337c628

Browse files
committed
x86/xen: make some functions static
Some functions and variables in arch/x86/xen are used locally only, make them static. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Message-ID: <20240710093718.14552-2-jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com>
1 parent 942d917 commit 337c628

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

arch/x86/xen/mmu.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn);
1717

1818
void set_pte_mfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags);
1919

20-
pte_t xen_ptep_modify_prot_start(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep);
21-
void xen_ptep_modify_prot_commit(struct vm_area_struct *vma, unsigned long addr,
22-
pte_t *ptep, pte_t pte);
23-
2420
unsigned long xen_read_cr2_direct(void);
2521

2622
extern void xen_init_mmu_ops(void);

arch/x86/xen/mmu_pv.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static DEFINE_SPINLOCK(xen_reservation_lock);
128128
* looking at another vcpu's cr3 value, it should use this variable.
129129
*/
130130
DEFINE_PER_CPU(unsigned long, xen_cr3); /* cr3 stored as physaddr */
131-
DEFINE_PER_CPU(unsigned long, xen_current_cr3); /* actual vcpu cr3 */
131+
static DEFINE_PER_CPU(unsigned long, xen_current_cr3); /* actual vcpu cr3 */
132132

133133
static phys_addr_t xen_pt_base, xen_pt_size __initdata;
134134

@@ -305,16 +305,17 @@ static void xen_set_pte(pte_t *ptep, pte_t pteval)
305305
__xen_set_pte(ptep, pteval);
306306
}
307307

308-
pte_t xen_ptep_modify_prot_start(struct vm_area_struct *vma,
309-
unsigned long addr, pte_t *ptep)
308+
static pte_t xen_ptep_modify_prot_start(struct vm_area_struct *vma,
309+
unsigned long addr, pte_t *ptep)
310310
{
311311
/* Just return the pte as-is. We preserve the bits on commit */
312312
trace_xen_mmu_ptep_modify_prot_start(vma->vm_mm, addr, ptep, *ptep);
313313
return *ptep;
314314
}
315315

316-
void xen_ptep_modify_prot_commit(struct vm_area_struct *vma, unsigned long addr,
317-
pte_t *ptep, pte_t pte)
316+
static void xen_ptep_modify_prot_commit(struct vm_area_struct *vma,
317+
unsigned long addr,
318+
pte_t *ptep, pte_t pte)
318319
{
319320
struct mmu_update u;
320321

arch/x86/xen/xen-ops.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ void xen_copy_trap_info(struct trap_info *traps);
2323

2424
DECLARE_PER_CPU_ALIGNED(struct vcpu_info, xen_vcpu_info);
2525
DECLARE_PER_CPU(unsigned long, xen_cr3);
26-
DECLARE_PER_CPU(unsigned long, xen_current_cr3);
2726

2827
extern struct start_info *xen_start_info;
2928
extern struct shared_info xen_dummy_shared_info;

0 commit comments

Comments
 (0)