Skip to content

Commit

Permalink
include: move target page bits declaration to page-vary.h
Browse files Browse the repository at this point in the history
Since the implementation unit is page-vary.c.

Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
elmarco authored and bonzini committed Apr 6, 2022
1 parent 1f269c1 commit ec5f7ca
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 20 deletions.
18 changes: 18 additions & 0 deletions include/exec/page-vary.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,22 @@ extern bool set_preferred_target_page_bits_common(int bits);
extern void finalize_target_page_bits_common(int min);
#endif

/**
* set_preferred_target_page_bits:
* @bits: number of bits needed to represent an address within the page
*
* Set the preferred target page size (the actual target page
* size may be smaller than any given CPU's preference).
* Returns true on success, false on failure (which can only happen
* if this is called after the system has already finalized its
* choice of page size and the requested page size is smaller than that).
*/
bool set_preferred_target_page_bits(int bits);

/**
* finalize_target_page_bits:
* Commit the final value set by set_preferred_target_page_bits.
*/
void finalize_target_page_bits(void);

#endif /* EXEC_PAGE_VARY_H */
17 changes: 0 additions & 17 deletions include/qemu-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,6 @@
int qemu_main(int argc, char **argv, char **envp);
#endif

/**
* set_preferred_target_page_bits:
* @bits: number of bits needed to represent an address within the page
*
* Set the preferred target page size (the actual target page
* size may be smaller than any given CPU's preference).
* Returns true on success, false on failure (which can only happen
* if this is called after the system has already finalized its
* choice of page size and the requested page size is smaller than that).
*/
bool set_preferred_target_page_bits(int bits);

/**
* finalize_target_page_bits:
* Commit the final value set by set_preferred_target_page_bits.
*/
void finalize_target_page_bits(void);

void qemu_progress_init(int enabled, float min_skip);
void qemu_progress_end(void);
Expand Down
2 changes: 1 addition & 1 deletion page-vary.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define IN_PAGE_VARY 1

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "exec/page-vary.h"
#include "exec/exec-all.h"

bool set_preferred_target_page_bits(int bits)
Expand Down
2 changes: 1 addition & 1 deletion softmmu/physmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "exec/page-vary.h"
#include "qapi/error.h"

#include "qemu/cutils.h"
Expand Down
1 change: 1 addition & 0 deletions softmmu/vl.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "qemu/datadir.h"
#include "qemu/units.h"
#include "exec/cpu-common.h"
#include "exec/page-vary.h"
#include "hw/qdev-properties.h"
#include "qapi/compat-policy.h"
#include "qapi/error.h"
Expand Down
2 changes: 1 addition & 1 deletion target/arm/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "qemu/qemu-print.h"
#include "qemu/timer.h"
#include "qemu/log.h"
#include "qemu-common.h"
#include "exec/page-vary.h"
#include "target/arm/idau.h"
#include "qemu/module.h"
#include "qapi/error.h"
Expand Down

0 comments on commit ec5f7ca

Please sign in to comment.