Subject: Unused functions
To: None <tech-kern@netbsd.org>
From: Krister Walfridsson <cato@df.lth.se>
List: tech-kern
Date: 10/11/2002 22:23:50
I have amused myself by hunting for unused functions in the kernel. While
the biggest offenders have been removed, there are still a lot of unused
stuff in a standard kernel.
Below is the list of unreferenced symbols in the i386 GENERIC kernel (source
CVS:ed an hour ago). Please look through the list to see if something may be
removed/suitable #ifdef:ed in your favourite part of the source.
/Krister
aarp.o D aarptab_size
aarp.o T aarp_clean
ad1848.o T ad_xwrite
adv.o T adv_detach
advlib.o T AscResetDevice
agp.o T agp_acquire
agp.o T agp_alloc_memory
agp.o T agp_bind_memory
agp.o T agp_enable
agp.o T agp_find_device
agp.o T agp_free_gatt
agp.o T agp_free_memory
agp.o T agp_get_info
agp.o T agp_memory_info
agp.o T agp_release
agp.o T agp_state
agp.o T agp_unbind_memory
aic6360.o T aic_dump6360
aic6360.o T aic_dump_driver
aic6360.o T aic_print_active_acb
aic6915.o D sf_copy_small
aic7xxx.o T ahc_activate
aic7xxx.o T ahc_detach
am79c930.o T am79c930_gcr_read
an.o T an_shutdown
arc4.o T arc4_decrypt
auconv.o T change_sign16_swap_bytes_be
auconv.o T linear16_to_linear8_be
auconv.o T linear8_to_linear16_be
auconv.o T slinear16_to_ulinear8_be
auconv.o T ulinear8_to_slinear16_be
bha.o T bha_nextmbi
bha.o T bha_nextmbo
bha.o T bha_reset_ccb
bios32.o T bios32_service
bridgestp.o T bstp_disable_change_detection
bridgestp.o T bstp_enable_change_detection
bridgestp.o T bstp_set_bridge_priority
bridgestp.o T bstp_set_path_cost
bridgestp.o T bstp_set_port_priority
bus_machdep.o T _bus_dmamap_sync
bus_machdep.o T _i386_memio_map
bus_machdep.o T _i386_memio_unmap
cd.o T lba2msf
cd.o T msf2lba
clnp_debug.o C clnp_debug
clnp_input.o C eonstat
clnp_output.o T clnp_ctloutput
clnp_subr.o T clnp_ypocb
clock.o T mc146818_write
clock.o T sysbeep
cltp_usrreq.o T cltp_ctlinput
cnmagic.o T cn_destroy_magic
coda_namecache.o T coda_nc_name
coda_namecache.o T coda_nc_zapvnode
coda_subr.o T coda_debugoff
coda_subr.o T coda_debugon
coda_venus.o T venus_read
coda_venus.o T venus_readdir
coda_venus.o T venus_write
coda_vfsops.o T coda_vptofh
coda_vfsops.o T getNewVnode
coda_vnops.o T print_cred
cons.o T cnbell
cons.o T nullcnpollc
cs89x0.o T cs_activate
cy82c693.o T cy82c693_read
cz.o T cz_reset_board
db_dbgreg.o T dr0
db_dbgreg.o T dr1
db_dbgreg.o T dr2
db_dbgreg.o T dr3
db_dbgreg.o T dr6
db_dbgreg.o T inb
db_dbgreg.o T inl
db_dbgreg.o T inw
db_dbgreg.o T outb
db_dbgreg.o T outl
db_dbgreg.o T outw
db_interface.o D ddb_cpu
db_run.o T db_single_step
db_sym.o T db_symstr
db_trace.o T db_find_trace_symbols
db_variables.o R db_evars
db_variables.o T db_set_variable
dp8390.o D dp8390_debug
eisa_machdep.o T eisa_conf_read_dma
eisa_machdep.o T eisa_conf_read_io
eisa_machdep.o T eisa_conf_read_irq
eisa_machdep.o T eisa_conf_read_mem
eisa_machdep.o T eisa_intr_evcnt
eisa_machdep.o T eisa_mem_alloc
eisa_machdep.o T eisa_mem_free
elinkxl.o T ex_activate
elinkxl.o T ex_detach
elinkxl.o T ex_printstats
esp_pcmcia.o T esp_pcmcia_enable
ess.o T ess_config_addr
fd.o T fd_dev_to_type
ffs_softdep.o D debug20
ffs_softdep.o D debug21
ffs_softdep.o D debug23
ffs_softdep.o D debug24
ffs_softdep.o D debug25
ffs_softdep.o D debug26
ffs_softdep.o D debug27
ffs_softdep.o D debug28
ffs_softdep.o D debug29
ffs_softdep.o D debug30
ffs_vnops.o D doclusterread
ffs_vnops.o D doclusterwrite
fil.o D icmptoicmp6unreach
gdt.o T gdt_alloc_cpu
gus.o T gus_get_in_gain
gus.o T gus_get_out_gain
gus.o T gus_set_in_gain
hd64570.o D sca_debug
i82365_isa.o D pcicisa_debug
i82557.o T fxp_activate
i82557.o T fxp_detach
ibcs2_exec.o D ibcs2_debug
if.o T if_clone_detach
if.o T ifa_ifwithaf
if_arp.o C arp_intimer
if_arp.o T arpioctl
if_bge.o D bge_swapbits
if_bge.o D bge_swapindex
if_bge.o T bge_shutdown
if_bridge.o R bridge_control_table_size
if_bridge.o T bridge_ifdetach
if_ec.o T ec_readmem
if_hippisubr.o T hippi_ip_input
if_lmc_media.o D lmc_t1_cables
if_media.o T ifmedia_list_add
if_spppsubr.o T sppp_pick
if_strip.o T strip_timeout
if_wm.o D wm_copy_small
if_x25subr.o T x25_dg_rtinit
if_x25subr.o T x25_ifoutput
if_x25subr.o T x25_iftimeout
in6.o R in6addr_linklocal_allrouters
in6.o R in6mask0
in6.o R in6mask96
in6.o T in6_ifawithifp
in6.o T in6_ifindex2scopeid
in6.o T in6_is_addr_deprecated
in6_proto.o D pmtu_probe
in6_src.o T in6_clearscope
ioconf.o R amrcf_locnames
ioconf.o R cardbuscf_locnames
ioconf.o R cbbuscf_locnames
ioconf.o R commulticf_locnames
ioconf.o R cpcbuscf_locnames
ioconf.o R cpucf_locnames
ioconf.o R fwbuscf_locnames
ioconf.o R pciidecf_locnames
ioconf.o R pckbcportcf_locnames
ioconf.o R pcmciaslotcf_locnames
ioconf.o R pnpbioscf_locnames
ioconf.o R psscf_locnames
ioconf.o R skgeccf_locnames
ioconf.o R upccf_locnames
ioconf.o R vmecf_locnames
ioconf.o R wsdisplaydevcf_locnames
ioconf.o R xdccf_locnames
ioconf.o R xyccf_locnames
iop.o T iop_table_add_row
iop.o T iop_table_clear
ip6_input.o C ip6_forward_srcrt
ip6_input.o C ip6_sourcecheck
ip6_input.o C ip6_sourcecheck_interval
ip6_mroute.o D ip6_mrtproto
ip_auth.o D fr_authsize
ip_ecn.o T ip6_ecn_ingress
ip_encap.o T encap_attach
ip_fil.o T fr_forgetifp
ip_fil.o T iplinit
ip_icmp.o D icmpmask
ip_icmp.o T ip_next_mtu
ip_input.o C in_ifaddrentries
ip_input.o T ip_stripoptions
ip_proxy.o C ap_sess_tab
ip_proxy.o T appr_add
ip_proxy.o T appr_del
ip_proxy.o T ippr_h245_in
isa.o T isa_intr_typename
isa_machdep.o T isa_intr_evcnt
isa_machdep.o T isa_mem_free
isa_machdep.o T isa_reinit_irq
isadma.o T _isa_dmafreeze
isadma.o T _isa_dmathaw
isapnp.o T isapnp_unconfig
isapnpdevs.o R isapnp_cs_devinfo
isapnpdevs.o R isapnp_fmv_devinfo
isapnpdevs.o R isapnp_mpu_devinfo
iso.o T iso_ck_addr
iso.o T iso_hashchar
iso_pcb.o D zeroiso_addr
iso_snpac.o T snpac_ownmulti
iso_snpac.o T snpac_rtrequest
kern_clock.o C callwheelbits
kern_clock.o C tickfix
kern_clock.o C tickfixinterval
kern_descrip.o T fdavail
kern_descrip.o T fdclear
kern_lkm.o T lkm_nofunc
kern_lkm.o T lkmdispatch
kern_lock.o D simple_lock_debugger
kern_lock.o T spinlock_acquire_count
kern_lock.o T spinlock_release_all
kern_malloc.o C kmemstats
kern_malloc.o R memname
kern_malloc.o T dump_kmemstats
kern_ntptime.o T sysctl_ntptime
kern_proc.o C proclist_lock
kern_sig.o T killproc
kern_subr.o T dopowerhooks
kern_subr.o T exithook_disestablish
kern_subr.o T mountroothook_disestablish
kern_synch.o D sched_lock
kern_synch.o T awaken
kern_synch.o T bpendtsleep
kern_sysctl.o T sysctl_struct
layer_subr.o T layer_checkvp
lfs_syscalls.o D debug_cleaner
lfs_syscalls.o D verbose_debug
lfs_vnops.o D lfs_no_inactive
lfs_vnops.o T lfs_itimes
linux_sigcode.o T linux_rt_esigcode
linux_sigcode.o T linux_rt_sigcode
llc_subr.o D frame_names
llc_subr.o T llc_trace
llc_subr.o T sdl_checkaddrif
locore.o A kernel_text
locore.o D eintrcnt
locore.o T Xintrspurious
locore.o T eintrnames
locore.o T fillw
locore.o T intrnames
locore.o T mpidle
locore.o T start
machdep.o C cpu_info_store
machdep.o C cpu_serial
machdep.o C dumpmem_high
machdep.o C dumpmem_low
machdep.o D dumpmag
machdep.o T i386_init_pcb_tss_ldt
machdep.o T idt_vec_alloc
machdep.o T idt_vec_free
machdep.o T idt_vec_set
mca_machdep.o T mca_dma_set_ioport
mfs_vfsops.o T mfs_initminiroot
midisyn.o T midisyn_finetune
midway.o T en_dump
midway.o T en_dumpmem
mtrr_i686.o D i686_mtrr_funcs
mtrr_i686.o T i686_mtrr_init_first
mtrr_k6.o D k6_mtrr_funcs
mtrr_k6.o T k6_mtrr_init_first
mulaw.o T alaw_to_slinear16_be
mulaw.o T alaw_to_ulinear16_be
mulaw.o T mulaw_to_slinear16_be
mulaw.o T mulaw_to_ulinear16_be
mulaw.o T slinear16_to_alaw_be
ncr53c9x.o D ncr53c9x_debug
ncr53c9x.o T ncr53c9x_readregs
ncr53c9x.o T ncr53c9x_scsi_reset
nfs_vnops.o T nfs_null
ntfs_subr.o T ntfs_times
opl.o T opl_detach
opl.o T oplsyn_loadpatch
opl.o T oplsyn_reset
oplinstrs.o R opl3_instrs
param.o D fscale
pas.o D E_C_MPU401_IRQ_translate
pas.o D I_C_2_PCM_DMA_translate
pas.o D I_C_3_PCM_IRQ_translate
pci.o T pci_get_powerstate
pci.o T pci_set_powerstate
pci_machdep.o D pci_conf_slock
pci_machdep.o T pci_intr_evcnt
pcic_pci_machdep.o T pcic_pci_machdep_chip_intr_disestablish
pcic_pci_machdep.o T pcic_pci_machdep_chip_intr_establish
pcic_pci_machdep.o T pcic_pci_machdep_pcic_intr_establish
pciide.o T acard_pci_intr
pk_llcsubr.o T npaidb_enrich
pk_output.o D pk_output_cache
pk_timer.o D pk_t22
pmap.o T pmap_test_attrs
rndpool.o T rndpool_get_pool
rndpool.o T rndpool_get_poolsize
rndpool.o T rndpool_increment_entropy_count
route.o C wildcard
rrunner.o T esh_fpstrategy
rtl81x9.o T rtk_activate
rtl81x9.o T rtk_detach
sb.o D sb_device
scsi_base.o T scsi_change_def
scsipi_base.o R scsipi_nsyncparams
scsipi_base.o T scsipi_grow_resources
scsipi_base.o T scsipi_thread_call_callback
sd.o T sd_reassign_blocks
siop.o D E_abs_script_sched_slot0_Used
siop.o D E_abs_tag0_Used
siop.o D E_abs_targ0_Used
siop.o T siop_dump_script
siop.o T siop_printstats
siop_common.o T siop_minphys
siop_common.o T siop_ppr_neg
spec_vnops.o R devcls
spec_vnops.o R devin
spec_vnops.o R devio
spec_vnops.o R devioc
spec_vnops.o R devopn
spec_vnops.o R devout
spec_vnops.o R devwait
spp_debug.o C spp_debug
spp_debug.o C spp_debx
spp_debug.o D sppconsdebug
spp_debug.o R sanames
spp_debug.o R spptimers
spp_usrreq.o D NspcbSize
spp_usrreq.o D SppcbSize
subr_autoconf.o T config_activate
subr_autoconf.o T config_attach_pseudo
subr_autoconf.o T config_cfattach_detach
subr_autoconf.o T config_cfdriver_detach
subr_autoconf.o T config_finalize_register
subr_autoconf.o T evcnt_attach_dynamic
subr_autoconf.o T evcnt_detach
subr_disk.o D disklist_slock
subr_disk.o T disk_find
subr_disk.o T disk_resetstat
subr_pool.o D pool_head_slock
subr_pool.o D pool_logsize
subr_pool.o T pool_chk
subr_pool.o T pool_prime
subr_pool.o T pool_print
subr_pool.o T pool_sethiwat
subr_prf.o T db_vprintf
subr_prf.o T vlog
subr_prf.o T vsprintf
subr_prop.o T prop_copy
subr_prop.o T prop_delete
subr_prop.o T prop_get
subr_prop.o T prop_list
subr_prop.o T prop_objs
subr_prop.o T prop_set
subr_prop.o T propdb_create
subr_prop.o T propdb_destroy
subr_userconf.o D userconf_maxlocnames
subr_userconf.o T userconf_add_read
subr_xxx.o T enoioctl
subr_xxx.o T enosys
subr_xxx.o T enxio
svr4_net.o T svr4_netattach
sysmon_wdog.o D sysmon_wdog_list_slock
sysmon_wdog.o D sysmon_wdog_slock
sysmon_wdog.o T sysmon_wdog_unregister
tcic2.o T tcic_create_event_thread
tcp_timer.o R tcp_totbackoff
tp_astring.o D tp_estring
tp_astring.o D tp_sstring
tp_inet.o T tpin_quench
tp_timer.o T tp_ctimeout_MIN
tp_timer.o T tp_cuntimeout
tp_timer.o T tp_euntimeout
tp_usrreq.o C TNew
tp_usrreq.o C TPNagle1
tp_usrreq.o C TPNagle2
tp_usrreq.o C tp_intercepts
tp_usrreq.o T tp_ltrace
tropic.o T tr_activate
tropic.o T tr_detach
tty_conf.o T ttyldisc_remove
tty_subr.o T cinit
tulip.o R tlp_al981_phy_regmap_size
tulip.o R tlp_winb_txthresh_tab
tulip.o T tlp_activate
tulip.o T tlp_detach
tulip.o T tlp_dm9102_reset
ufs_quota.o T dqref
uhidev.o D repproto
uipc_domain.o T pfctlinput2
uipc_mbuf.o T m_copyup
ukbd.o T ukbd_cnattach
usbdi.o T usbd_get_buffer
usbdi.o T usbd_get_endpoint_descriptor
usbdi.o T usbd_get_interface
usbdi.o T usbd_pipe2device_handle
usbdi_util.o T usbd_clear_hub_feature
usbdi_util.o T usbd_get_hub_status
usbdi_util.o T usbd_get_protocol
usbdi_util.o T usbd_set_hub_feature
usbdi_util.o T usbd_set_protocol
uvm_amap.o T amap_share_protect
uvm_bio.o T ubc_flush
uvm_map.o T uvmspace_unshare
uvm_pager.o C uvm_aiobuf_pool
uvm_stat.o T uvmcnt_dump
uvm_unix.o T uvm_grow
vers.o R sccs
vfs_bio.o T breada
vfs_bio.o T count_lock_queue
vfs_subr.o C kinfo_vgetfailed
vfs_subr.o C rootfs
vfs_subr.o D spechash_slock
vfs_subr.o D vnode_free_list_slock
vga_isa.o T vga_isa_cnattach
vga_pci.o T vga_pci_cnattach
vm_machdep.o T kvtop
vnd.o T vnddetach
vnd.o T vndshutdown
vnode_if.o R vfs_op_descs
vnode_if.o T VOP_REALLOCBLKS
wdc.o D wdc_nxfer
wdc.o T wdcrestart
wds.o T wdsminphys
wsdisplay.o D wsdisplay_noemul_ca
wsdisplay.o T wsdisplaydevprint
wsfont.o T wsfont_enum
wsfont.o T wsfont_map_unichar
zlib.o R deflate_copyright
zlib.o R inflate_copyright