static patches
v2 cover static patches
v2: extract function removal patches, skip ARM
Blue Swirl (6):
target-sparc: make do_unaligned_access static
vl.c: add missing static
vnc: add missing static
ppc: add missing static
target-ppc: make some functions static
exec: make some functions static
console.h | 2 -- cpu-common.h | 5 ----- exec-all.h | 2 -- exec.c | 15 +++++++++------ hw/adb.c | 8 ++++---- hw/adb.h | 4 ---- hw/nvram.h | 10 +--------- hw/ppc.c | 16 ++++++++-------- memory-internal.h | 2 -- sysemu.h | 5 ----- target-ppc/cpu.h | 7 ------- target-ppc/mmu_helper.c | 11 ++++++----- target-sparc/cpu.h | 3 --- target-sparc/ldst_helper.c | 8 ++++++-- ui/vnc-jobs.c | 10 +++++----- ui/vnc-jobs.h | 1 - ui/vnc.c | 14 +++++++------- ui/vnc.h | 5 ----- vl.c | 21 ++++++++++++--------- 19 files changed, 58 insertions(+), 91 deletions(-)
Signature · 1 line
1.7.2.5
PATCH v2 1/6 target-sparc: make do_unaligned_access static
--- target-sparc/cpu.h | 3 --- target-sparc/ldst_helper.c | 8 ++++++-- 2 files changed, 6 insertions(+), 5 deletions(-)
target-sparc/cpu.h +0 -3
@@ -711,9 +711,6 @@ uint64_t cpu_tick_get_count(CPUTimer *timer);void cpu_tick_set_limit (CPUTimer *timer,uint64_t limit);trap_state *cpu_tsptr (CPUSPARCState * env);#endif -void QEMU_NORETURN do_unaligned_access(CPUSPARCState *env, target_ulong addr, -int is_write,int is_user, -uintptr_t retaddr);void cpu_restore_state2 (CPUSPARCState *env,uintptr_t retaddr);#define TB_FLAG_FPU_ENABLED (1 << 4)
target-sparc/ldst_helper.c +6 -2
@@ -65,6 +65,9 @@#define QT1 (env->qt1)#if !defined(CONFIG_USER_ONLY ) +static void QEMU_NORETURN do_unaligned_access(CPUSPARCState *env, +target_ulong addr,int is_write, +int is_user,uintptr_t retaddr);#include "softmmu_exec.h" #define MMUSUFFIX _mmu#define ALIGNED_ONLY
@@ -2407,8 +2410,9 @@ void cpu_restore_state2(CPUSPARCState *env, uintptr_t retaddr) }#if !defined(CONFIG_USER_ONLY ) -void do_unaligned_access (CPUSPARCState *env,target_ulong addr,int is_write, -int is_user,uintptr_t retaddr) +static void QEMU_NORETURN do_unaligned_access(CPUSPARCState *env, +target_ulong addr,int is_write, +int is_user,uintptr_t retaddr) {#ifdef DEBUG_UNALIGNED printf("Unaligned access to 0x" TARGET_FMT_lx " from 0x" TARGET_FMT_lx
Signature · 1 line
1.7.2.5
PATCH v2 2/6 vl.c: add missing static
In reply to Blue SwirlAdd missing 'static' qualifiers.
--- sysemu.h | 5 ----- vl.c | 21 ++++++++++++--------- 2 files changed, 12 insertions(+), 14 deletions(-)
sysemu.h +0 -5
@@ -19,7 +19,6 @@ extern uint8_t qemu_uuid[];int qemu_uuid_parse (const char *str,uint8_t *uuid);#define UUID_FMT "%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx" -void runstate_init (void );bool runstate_check (RunState state);void runstate_set (RunState new_state);int runstate_is_running (void );
@@ -57,11 +56,7 @@ void qemu_system_debug_request(void);void qemu_system_vmstop_request (RunState reason);int qemu_shutdown_requested_get (void );int qemu_reset_requested_get (void ); -int qemu_shutdown_requested (void ); -int qemu_reset_requested (void ); -int qemu_powerdown_requested (void );void qemu_system_killed (int signal,pid_t pid); -void qemu_kill_report (void );void qemu_devices_reset (void );void qemu_system_reset (bool report);
vl.c +12 -9
@@ -180,7 +180,7 @@ static const char *data_dir;const char *bios_name =NULL ;enum vga_retrace_method vga_retrace_method =VGA_RETRACE_DUMB ;DisplayType display_type =DT_DEFAULT ; -int display_remote =0 ; +static int display_remote;const char * keyboard_layout =NULL ;ram_addr_t ram_size;const char *mem_path =NULL ;
@@ -215,7 +215,7 @@ const char *vnc_display;int acpi_enabled =1 ;int no_hpet =0 ;int fd_bootchk =1 ; -int no_reboot =0 ; +static int no_reboot;int no_shutdown =0 ;int cursor_hide =1 ;int graphic_rotate =0 ;
@@ -243,7 +243,8 @@ struct FWBootEntry {char *suffix; }; -QTAILQ_HEAD(, FWBootEntry) fw_boot_order = QTAILQ_HEAD_INITIALIZER(fw_boot_order); +static QTAILQ_HEAD(, FWBootEntry) fw_boot_order = +QTAILQ_HEAD_INITIALIZER (fw_boot_order);int nb_numa_nodes;uint64_t node_mem[MAX_NODES ];
@@ -397,7 +398,7 @@ bool runstate_check(RunState state)return current_run_state == state; } -void runstate_init (void ) +static void runstate_init (void ) {const RunStateTransition *p;
@@ -1373,14 +1374,14 @@ int qemu_reset_requested_get(void)return reset_requested; } -int qemu_shutdown_requested (void ) +static int qemu_shutdown_requested (void ) {int r = shutdown_requested; shutdown_requested =0 ;return r; } -void qemu_kill_report (void ) +static void qemu_kill_report (void ) {if (!qtest_enabled () && shutdown_signal !=-1 ) {fprintf (stderr,"qemu: terminating on signal %d" , shutdown_signal);
@@ -1396,7 +1397,7 @@ void qemu_kill_report(void) } } -int qemu_reset_requested (void ) +static int qemu_reset_requested (void ) {int r = reset_requested; reset_requested =0 ;
@@ -1417,7 +1418,7 @@ static int qemu_wakeup_requested(void)return r; } -int qemu_powerdown_requested (void ) +static int qemu_powerdown_requested (void ) {int r = powerdown_requested; powerdown_requested =0 ;
@@ -2043,7 +2044,9 @@ struct device_config {Location loc;QTAILQ_ENTRY (device_config) next; }; -QTAILQ_HEAD(, device_config) device_configs = QTAILQ_HEAD_INITIALIZER(device_configs); + +static QTAILQ_HEAD(, device_config) device_configs = +QTAILQ_HEAD_INITIALIZER (device_configs);static void add_device_config (int type,const char *cmdline) {
Signature · 1 line
1.7.2.5
PATCH v2 3/6 vnc: add missing static
In reply to Blue SwirlAdd missing 'static' qualifiers.
--- console.h | 2 -- ui/vnc-jobs.c | 10 +++++----- ui/vnc-jobs.h | 1 - ui/vnc.c | 14 +++++++------- ui/vnc.h | 5 ----- 5 files changed, 12 insertions(+), 20 deletions(-)
console.h +0 -2
@@ -377,10 +377,8 @@ void cocoa_display_init(DisplayState *ds, int full_screen);/* vnc.c */ void vnc_display_init (DisplayState *ds); -void vnc_display_close (DisplayState *ds);void vnc_display_open (DisplayState *ds,const char *display,Error **errp);void vnc_display_add_client (DisplayState *ds,int csock,int skipauth); -int vnc_display_disable_login (DisplayState *ds);char *vnc_display_local_addr (DisplayState *ds);#ifdef CONFIG_VNC int vnc_display_password (DisplayState *ds,const char *password);
ui/vnc-jobs.c +5 -5
@@ -320,6 +320,11 @@ static void *vnc_worker_thread(void *arg)return NULL ; } +static bool vnc_worker_thread_running (void ) +{ +return queue;/* Check global queue */ +} +void vnc_start_worker_thread (void ) {VncJobQueue *q;
@@ -332,11 +337,6 @@ void vnc_start_worker_thread(void) queue = q;/* Set global queue */ } -bool vnc_worker_thread_running (void ) -{ -return queue;/* Check global queue */ -} -void vnc_stop_worker_thread (void ) {if (!vnc_worker_thread_running ())
ui/vnc-jobs.h +0 -1
@@ -40,7 +40,6 @@ void vnc_jobs_join(VncState *vs);void vnc_jobs_consume_buffer (VncState *vs);void vnc_start_worker_thread (void ); -bool vnc_worker_thread_running (void );void vnc_stop_worker_thread (void );/* Locks */
ui/vnc.c +7 -7
@@ -479,12 +479,12 @@ void buffer_reserve(Buffer *buffer, size_t len) } } -int buffer_empty (Buffer *buffer) +static int buffer_empty (Buffer *buffer) {return buffer->offset ==0 ; } -uint8_t *buffer_end (Buffer *buffer) +static uint8_t *buffer_end (Buffer *buffer) {return buffer->buffer + buffer->offset; }
@@ -1376,17 +1376,17 @@ void vnc_flush(VncState *vs)vnc_unlock_output (vs); } -uint8_t read_u8 (uint8_t *data,size_t offset) +static uint8_t read_u8 (uint8_t *data,size_t offset) {return data[offset]; } -uint16_t read_u16 (uint8_t *data,size_t offset) +static uint16_t read_u16 (uint8_t *data,size_t offset) {return ((data[offset] &0xFF ) <<8 ) | (data[offset +1 ] &0xFF ); } -int32_t read_s32 (uint8_t *data,size_t offset) +static int32_t read_s32 (uint8_t *data,size_t offset) {return (int32_t )((data[offset] <<24 ) | (data[offset +1 ] <<16 ) | (data[offset +2 ] <<8 ) | data[offset +3 ]);
@@ -2763,7 +2763,7 @@ void vnc_display_init(DisplayState *ds) } -void vnc_display_close (DisplayState *ds) +static void vnc_display_close (DisplayState *ds) {VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
@@ -2785,7 +2785,7 @@ void vnc_display_close(DisplayState *ds)#endif } -int vnc_display_disable_login (DisplayState *ds) +static int vnc_display_disable_login (DisplayState *ds) {VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;
ui/vnc.h +0 -5
@@ -493,9 +493,6 @@ void vnc_read_when(VncState *vs, VncReadEvent *func, size_t expecting);/* Buffer I/O functions */ -uint8_t read_u8 (uint8_t *data,size_t offset); -uint16_t read_u16 (uint8_t *data,size_t offset); -int32_t read_s32 (uint8_t *data,size_t offset);uint32_t read_u32 (uint8_t *data,size_t offset);/* Protocol stage functions */
@@ -507,8 +504,6 @@ void start_auth_vnc(VncState *vs);/* Buffer management */ void buffer_reserve (Buffer *buffer,size_t len); -int buffer_empty (Buffer *buffer); -uint8_t *buffer_end (Buffer *buffer);void buffer_reset (Buffer *buffer);void buffer_free (Buffer *buffer);void buffer_append (Buffer *buffer,const void *data,size_t len);
Signature · 1 line
1.7.2.5
PATCH v2 4/6 ppc: add missing static
In reply to Blue SwirlAdd missing 'static' qualifiers.
--- hw/adb.c | 8 ++++---- hw/adb.h | 4 ---- hw/nvram.h | 10 +--------- hw/ppc.c | 16 ++++++++-------- target-ppc/cpu.h | 1 - 5 files changed, 13 insertions(+), 26 deletions(-)
hw/adb.c +4 -4
@@ -108,10 +108,10 @@ int adb_poll(ADBBusState *s, uint8_t *obuf)return olen; } -ADBDevice *adb_register_device (ADBBusState *s,int devaddr, -ADBDeviceRequest *devreq, -ADBDeviceReset *devreset, -void *opaque) +static ADBDevice *adb_register_device (ADBBusState *s,int devaddr, +ADBDeviceRequest *devreq, +ADBDeviceReset *devreset, +void *opaque) {ADBDevice *d;if (s->nb_devices >=MAX_ADB_DEVICES )
hw/adb.h +0 -4
@@ -56,10 +56,6 @@ int adb_request(ADBBusState *s, uint8_t *buf_out, const uint8_t *buf, int len);int adb_poll (ADBBusState *s,uint8_t *buf_out); -ADBDevice *adb_register_device (ADBBusState *s,int devaddr, -ADBDeviceRequest *devreq, -ADBDeviceReset *devreset, -void *opaque);void adb_kbd_init (ADBBusState *bus);void adb_mouse_init (ADBBusState *bus);
hw/nvram.h +1 -9
@@ -10,17 +10,9 @@ typedef struct nvram_t {nvram_write_t write_fn; } nvram_t; -void NVRAM_set_byte (nvram_t *nvram,uint32_t addr,uint8_t value); -uint8_t NVRAM_get_byte (nvram_t *nvram,uint32_t addr); -void NVRAM_set_word (nvram_t *nvram,uint32_t addr,uint16_t value); -uint16_t NVRAM_get_word (nvram_t *nvram,uint32_t addr); -void NVRAM_set_lword (nvram_t *nvram,uint32_t addr,uint32_t value);uint32_t NVRAM_get_lword (nvram_t *nvram,uint32_t addr); -void NVRAM_set_string (nvram_t *nvram,uint32_t addr, -const char *str,uint32_t max);int NVRAM_get_string (nvram_t *nvram,uint8_t *dst,uint16_t addr,int max); -void NVRAM_set_crc (nvram_t *nvram,uint32_t addr, -uint32_t start,uint32_t count); + int PPC_NVRAM_set_params (nvram_t *nvram, uint16_t NVRAM_size, const char *arch, uint32_t RAM_size, int boot_device,
hw/ppc.c +8 -8
@@ -721,7 +721,7 @@ static void cpu_ppc_hdecr_cb (void *opaque)_cpu_ppc_store_hdecr (opaque,0x00000000 ,0xFFFFFFFF ,1 ); } -void cpu_ppc_store_purr (CPUPPCState *env,uint64_t value) +static void cpu_ppc_store_purr (CPUPPCState *env,uint64_t value) {ppc_tb_t *tb_env = env->tb_env;
@@ -1152,23 +1152,23 @@ static inline void nvram_write (nvram_t *nvram, uint32_t addr, uint32_t val) (*nvram->write_fn)(nvram->opaque, addr, val); } -void NVRAM_set_byte (nvram_t *nvram,uint32_t addr,uint8_t value) +static void NVRAM_set_byte (nvram_t *nvram,uint32_t addr,uint8_t value) {nvram_write (nvram, addr, value); } -uint8_t NVRAM_get_byte (nvram_t *nvram,uint32_t addr) +static uint8_t NVRAM_get_byte (nvram_t *nvram,uint32_t addr) {return nvram_read (nvram, addr); } -void NVRAM_set_word (nvram_t *nvram,uint32_t addr,uint16_t value) +static void NVRAM_set_word (nvram_t *nvram,uint32_t addr,uint16_t value) {nvram_write (nvram, addr, value >>8 );nvram_write (nvram, addr +1 , value &0xFF ); } -uint16_t NVRAM_get_word (nvram_t *nvram,uint32_t addr) +static uint16_t NVRAM_get_word (nvram_t *nvram,uint32_t addr) {uint16_t tmp;
@@ -1178,7 +1178,7 @@ uint16_t NVRAM_get_word (nvram_t *nvram, uint32_t addr)return tmp; } -void NVRAM_set_lword (nvram_t *nvram,uint32_t addr,uint32_t value) +static void NVRAM_set_lword (nvram_t *nvram,uint32_t addr,uint32_t value) {nvram_write (nvram, addr, value >>24 );nvram_write (nvram, addr +1 , (value >>16 ) &0xFF );
@@ -1198,8 +1198,8 @@ uint32_t NVRAM_get_lword (nvram_t *nvram, uint32_t addr)return tmp; } -void NVRAM_set_string (nvram_t *nvram,uint32_t addr, -const char *str,uint32_t max) +static void NVRAM_set_string (nvram_t *nvram,uint32_t addr,const char *str, +uint32_t max) {int i;
target-ppc/cpu.h +0 -1
@@ -1178,7 +1178,6 @@ void cpu_ppc_store_decr (CPUPPCState *env, uint32_t value);uint32_t cpu_ppc_load_hdecr (CPUPPCState *env);void cpu_ppc_store_hdecr (CPUPPCState *env,uint32_t value);uint64_t cpu_ppc_load_purr (CPUPPCState *env); -void cpu_ppc_store_purr (CPUPPCState *env,uint64_t value);uint32_t cpu_ppc601_load_rtcl (CPUPPCState *env);uint32_t cpu_ppc601_load_rtcu (CPUPPCState *env);#if !defined(CONFIG_USER_ONLY )
Signature · 1 line
1.7.2.5
Re: [Qemu-devel] [PATCH v2 4/6] ppc: add missing static
Quoted 3 lines · Blue Swirl
Add missing 'static' qualifiers.
Signed-off-by Blue Swirl <[email protected]>
Alex
PATCH v2 5/6 target-ppc: make some functions static
In reply to Blue Swirl--- target-ppc/cpu.h | 6 ------ target-ppc/mmu_helper.c | 11 ++++++----- 2 files changed, 6 insertions(+), 11 deletions(-)
target-ppc/cpu.h +0 -6
@@ -1141,10 +1141,6 @@ int cpu_ppc_signal_handler (int host_signum, void *pinfo,int cpu_ppc_handle_mmu_fault (CPUPPCState *env,target_ulong address,int rw,int mmu_idx);#define cpu_handle_mmu_fault cpu_ppc_handle_mmu_fault -#if !defined(CONFIG_USER_ONLY ) -int get_physical_address (CPUPPCState *env,mmu_ctx_t *ctx,target_ulong vaddr, -int rw,int access_type); -#endif void do_interrupt (CPUPPCState *env);void ppc_hw_interrupt (CPUPPCState *env);
@@ -1189,8 +1185,6 @@ void store_40x_dbcr0 (CPUPPCState *env, uint32_t val);void store_40x_sler (CPUPPCState *env,uint32_t val);void store_booke_tcr (CPUPPCState *env,target_ulong val);void store_booke_tsr (CPUPPCState *env,target_ulong val); -void booke206_flush_tlb (CPUPPCState *env,int flags,const int check_iprot); -hwaddr booke206_tlb_to_page_size (CPUPPCState *env,ppcmas_tlb_t *tlb);int ppcmas_tlb_check (CPUPPCState *env,ppcmas_tlb_t *tlb,hwaddr *raddrp,target_ulong address,uint32_t pid);
target-ppc/mmu_helper.c +6 -5
@@ -1276,7 +1276,8 @@ static int mmubooke_get_physical_address(CPUPPCState *env, mmu_ctx_t *ctx,return ret; } -void booke206_flush_tlb (CPUPPCState *env,int flags,const int check_iprot) +static void booke206_flush_tlb (CPUPPCState *env,int flags, +const int check_iprot) {int tlb_size;int i, j;
@@ -1297,8 +1298,8 @@ void booke206_flush_tlb(CPUPPCState *env, int flags, const int check_iprot)tlb_flush (env,1 ); } -hwaddr booke206_tlb_to_page_size (CPUPPCState *env, -ppcmas_tlb_t *tlb) +static hwaddr booke206_tlb_to_page_size (CPUPPCState *env, +ppcmas_tlb_t *tlb) {int tlbm_size;
@@ -1708,8 +1709,8 @@ static inline int check_physical(CPUPPCState *env, mmu_ctx_t *ctx,return ret; } -int get_physical_address (CPUPPCState *env,mmu_ctx_t *ctx,target_ulong eaddr, -int rw,int access_type) +static int get_physical_address (CPUPPCState *env,mmu_ctx_t *ctx, +target_ulong eaddr,int rw,int access_type) {int ret;
Signature · 1 line
1.7.2.5
Re: [Qemu-devel] [PATCH v2 5/6] target-ppc: make some functions static
Quoted 1 line · Blue Swirl
Signed-off-by Blue Swirl <[email protected]>
Alex
Quoted 68 lines
---
target-ppc/cpu.h| 6 ------target-ppc/mmu_helper.c| 11 ++++++-----2 files changed, 6 insertions(+), 11 deletions(-)target-ppc/cpu.h +0
-6@@ -1141,10 +1141,6 @@ int cpu_ppc_signal_handler (int host_signum, void *pinfo,int cpu_ppc_handle_mmu_fault (CPUPPCState *env,target_ulong address,int rw,int mmu_idx);#define cpu_handle_mmu_fault cpu_ppc_handle_mmu_fault -#if !defined(CONFIG_USER_ONLY ) -int get_physical_address (CPUPPCState *env,mmu_ctx_t *ctx,target_ulong vaddr, -int rw,int access_type); -#endif void do_interrupt (CPUPPCState *env);void ppc_hw_interrupt (CPUPPCState *env);@@ -1189,8 +1185,6 @@ void store_40x_dbcr0 (CPUPPCState *env, uint32_t val);void store_40x_sler (CPUPPCState *env,uint32_t val);void store_booke_tcr (CPUPPCState *env,target_ulong val);void store_booke_tsr (CPUPPCState *env,target_ulong val); -void booke206_flush_tlb (CPUPPCState *env,int flags,const int check_iprot); -hwaddr booke206_tlb_to_page_size (CPUPPCState *env,ppcmas_tlb_t *tlb);int ppcmas_tlb_check (CPUPPCState *env,ppcmas_tlb_t *tlb,hwaddr *raddrp,target_ulong address,uint32_t pid);target-ppc/mmu_helper.c +6
-5@@ -1276,7 +1276,8 @@ static int mmubooke_get_physical_address(CPUPPCState *env, mmu_ctx_t *ctx,return ret; } -void booke206_flush_tlb (CPUPPCState *env,int flags,const int check_iprot) +static void booke206_flush_tlb (CPUPPCState *env,int flags, +const int check_iprot) {int tlb_size;int i, j;@@ -1297,8 +1298,8 @@ void booke206_flush_tlb(CPUPPCState *env, int flags, const int check_iprot)tlb_flush (env,1 ); } -hwaddr booke206_tlb_to_page_size (CPUPPCState *env, -ppcmas_tlb_t *tlb) +static hwaddr booke206_tlb_to_page_size (CPUPPCState *env, +ppcmas_tlb_t *tlb) {int tlbm_size;@@ -1708,8 +1709,8 @@ static inline int check_physical(CPUPPCState *env, mmu_ctx_t *ctx,return ret; } -int get_physical_address (CPUPPCState *env,mmu_ctx_t *ctx,target_ulong eaddr, -int rw,int access_type) +static int get_physical_address (CPUPPCState *env,mmu_ctx_t *ctx, +target_ulong eaddr,int rw,int access_type) {int ret;Signature · 1 line
1.7.2.5
PATCH v2 6/6 exec: make some functions static
In reply to Blue Swirl--- cpu-common.h | 5 ----- exec-all.h | 2 -- exec.c | 15 +++++++++------ memory-internal.h | 2 -- 4 files changed, 9 insertions(+), 15 deletions(-)
cpu-common.h +0 -5
@@ -39,10 +39,6 @@ typedef uint32_t CPUReadMemoryFunc(void *opaque, hwaddr addr);void qemu_ram_remap (ram_addr_t addr,ram_addr_t length);/* This should only be used for ram local to a device. */ void *qemu_get_ram_ptr (ram_addr_t addr); -void *qemu_ram_ptr_length (ram_addr_t addr,ram_addr_t *size); -/* Same but slower, to use for migration, where the order of -* RAMBlocks must not change. */ -void *qemu_safe_ram_ptr (ram_addr_t addr);void qemu_put_ram_ptr (void *addr);/* This should not be used by devices. */ int qemu_ram_addr_from_host (void *ptr,ram_addr_t *ram_addr);
@@ -67,7 +63,6 @@ void *cpu_physical_memory_map(hwaddr addr,void cpu_physical_memory_unmap (void *buffer,hwaddr len,int is_write,hwaddr access_len);void *cpu_register_map_client (void *opaque,void (*callback)(void *opaque)); -void cpu_unregister_map_client (void *cookie);bool cpu_physical_memory_is_io (hwaddr phys_addr);
exec-all.h +0 -2
@@ -194,8 +194,6 @@ static inline unsigned int tb_phys_hash_func(tb_page_addr_t pc)void tb_free (TranslationBlock *tb);void tb_flush (CPUArchState *env); -void tb_link_page (TranslationBlock *tb, -tb_page_addr_t phys_pc,tb_page_addr_t phys_page2);void tb_phys_invalidate (TranslationBlock *tb,tb_page_addr_t page_addr);extern TranslationBlock *tb_phys_hash[CODE_GEN_PHYS_HASH_SIZE ];
exec.c +9 -6
@@ -188,9 +188,12 @@ static unsigned phys_map_nodes_nb, phys_map_nodes_nb_alloc;static void io_mem_init (void );static void memory_map_init (void ); +static void *qemu_safe_ram_ptr (ram_addr_t addr);static MemoryRegion io_mem_watch;#endif +static void tb_link_page (TranslationBlock *tb,tb_page_addr_t phys_pc, +tb_page_addr_t phys_page2);/* statistics */ static int tb_flush_count;
@@ -1349,8 +1352,8 @@ static inline void tb_alloc_page(TranslationBlock *tb,/* add a new TB and link it to the physical page tables. phys_page2 is (-1) to indicate that only one page contains the TB. */ -void tb_link_page (TranslationBlock *tb, -tb_page_addr_t phys_pc,tb_page_addr_t phys_page2) +static void tb_link_page (TranslationBlock *tb,tb_page_addr_t phys_pc, +tb_page_addr_t phys_page2) {unsigned int h;TranslationBlock **ptb;
@@ -1859,7 +1862,7 @@ void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t end, } } -int cpu_physical_memory_set_dirty_tracking (int enable) +static int cpu_physical_memory_set_dirty_tracking (int enable) {int ret =0 ; in_migration = enable;
@@ -2741,7 +2744,7 @@ void *qemu_get_ram_ptr(ram_addr_t addr)/* Return a host pointer to ram allocated with qemu_ram_alloc. * Same as qemu_get_ram_ptr but avoid reordering ramblocks. */ -void *qemu_safe_ram_ptr (ram_addr_t addr) +static void *qemu_safe_ram_ptr (ram_addr_t addr) {RAMBlock *block;
@@ -2771,7 +2774,7 @@ void *qemu_safe_ram_ptr(ram_addr_t addr)/* Return a host pointer to guest's ram. Similar to qemu_get_ram_ptr * but takes a size argument */ -void *qemu_ram_ptr_length (ram_addr_t addr,ram_addr_t *size) +static void *qemu_ram_ptr_length (ram_addr_t addr,ram_addr_t *size) {if (*size ==0 ) {return NULL ;
@@ -3519,7 +3522,7 @@ void *cpu_register_map_client(void *opaque, void (*callback)(void *opaque))return client; } -void cpu_unregister_map_client (void *_client) +static void cpu_unregister_map_client (void *_client) {MapClient *client = (MapClient *)_client;
memory-internal.h +0 -2
@@ -55,8 +55,6 @@ struct MemoryRegionSection;void qemu_register_coalesced_mmio (hwaddr addr,ram_addr_t size);void qemu_unregister_coalesced_mmio (hwaddr addr,ram_addr_t size); -int cpu_physical_memory_set_dirty_tracking (int enable); -#define VGA_DIRTY_FLAG 0x01#define CODE_DIRTY_FLAG 0x02#define MIGRATION_DIRTY_FLAG 0x08
Signature · 1 line
1.7.2.5
Quoted 22 lines · Blue Swirl
v2: extract function removal patches, skip ARM
Blue Swirl (6):
target-sparc: makedo_unaligned_accessstatic
vl.c: add missing static
vnc: add missing static
ppc: add missing static
target-ppc: make some functions static
exec: make some functions staticconsole.h | 2 -- cpu-common.h | 5 ----- exec-all.h | 2 -- exec.c | 15 +++++++++------ hw/adb.c | 8 ++++---- hw/adb.h | 4 ---- hw/nvram.h | 10 +--------- hw/ppc.c | 16 ++++++++-------- memory-internal.h | 2 -- sysemu.h | 5 ----- target-ppc/cpu.h | 7 ------- target-ppc/mmu_helper.c | 11 ++++++-----
Quoted 13 lines
target-sparc/cpu.h | 3 --- target-sparc/ldst_helper.c | 8 ++++++-- ui/vnc-jobs.c | 10 +++++----- ui/vnc-jobs.h | 1 - ui/vnc.c | 14 +++++++------- ui/vnc.h | 5 ----- vl.c | 21 ++++++++++++--------- 19 files changed, 58 insertions(+), 91 deletions(-)Signature · 1 line
1.7.2.5
Waiting a bit before merging so experts in the various areas touched can take a look.
Stefan Hajnoczi
AppliedQuoted 22 lines · Blue Swirl
v2: extract function removal patches, skip ARM
Blue Swirl (6):
target-sparc: makedo_unaligned_accessstatic
vl.c: add missing static
vnc: add missing static
ppc: add missing static
target-ppc: make some functions static
exec: make some functions staticconsole.h | 2 -- cpu-common.h | 5 ----- exec-all.h | 2 -- exec.c | 15 +++++++++------ hw/adb.c | 8 ++++---- hw/adb.h | 4 ---- hw/nvram.h | 10 +--------- hw/ppc.c | 16 ++++++++-------- memory-internal.h | 2 -- sysemu.h | 5 ----- target-ppc/cpu.h | 7 ------- target-ppc/mmu_helper.c | 11 ++++++-----
Quoted 13 lines
target-sparc/cpu.h | 3 --- target-sparc/ldst_helper.c | 8 ++++++-- ui/vnc-jobs.c | 10 +++++----- ui/vnc-jobs.h | 1 - ui/vnc.c | 14 +++++++------- ui/vnc.h | 5 ----- vl.c | 21 ++++++++++++--------- 19 files changed, 58 insertions(+), 91 deletions(-)Signature · 1 line
1.7.2.5
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan