Removed some unused variables and functions.

This commit is contained in:
Kees van Reeuwijk 2010-06-02 19:41:38 +00:00
parent fc29251444
commit ed0b81c25c
10 changed files with 11 additions and 79 deletions

View file

@ -602,7 +602,6 @@ PRIVATE int disable_int(int chan) {
PRIVATE int get_samples_in_buf (u32_t *samples_in_buf, int *len, int chan) { PRIVATE int get_samples_in_buf (u32_t *samples_in_buf, int *len, int chan) {
u16_t samp_ct_reg; u16_t samp_ct_reg;
u16_t curr_samp_ct_reg; u16_t curr_samp_ct_reg;
u16_t samp_ct; /* nr of samples - 1 that will be played back */
u16_t curr_samp_ct; /* counts back from SAMP_CT till 0 */ u16_t curr_samp_ct; /* counts back from SAMP_CT till 0 */
*len = sizeof(*samples_in_buf); *len = sizeof(*samples_in_buf);

View file

@ -604,7 +604,6 @@ PRIVATE int disable_int(int chan) {
PRIVATE int get_samples_in_buf (u32_t *samples_in_buf, int *len, int chan) { PRIVATE int get_samples_in_buf (u32_t *samples_in_buf, int *len, int chan) {
u16_t samp_ct_reg; u16_t samp_ct_reg;
u16_t curr_samp_ct_reg; u16_t curr_samp_ct_reg;
u16_t samp_ct; /* nr of samples - 1 that will be played back */
u16_t curr_samp_ct; /* counts back from SAMP_CT till 0 */ u16_t curr_samp_ct; /* counts back from SAMP_CT till 0 */
*len = sizeof(*samples_in_buf); *len = sizeof(*samples_in_buf);

View file

@ -34,7 +34,7 @@ FORWARD _PROTOTYPE( void sef_local_startup, (void) );
int main(void) int main(void)
{ {
int i, r; int r;
message m; message m;
int ipc_status; int ipc_status;
@ -121,10 +121,9 @@ message *mp;
mp->m_source, r); mp->m_source, r);
} }
PRIVATE void do_first_dev(mp) PRIVATE void do_first_dev(message *mp)
message *mp;
{ {
int i, r, devind; int r, devind;
u16_t vid, did; u16_t vid, did;
struct rs_pci *aclp; struct rs_pci *aclp;
@ -376,10 +375,9 @@ message *mp;
reply(mp, OK); reply(mp, OK);
} }
PRIVATE void do_del_acl(mp) PRIVATE void do_del_acl(message *mp)
message *mp;
{ {
int i, r, proc_nr; int i, proc_nr;
if (mp->m_source != RS_PROC_NR) if (mp->m_source != RS_PROC_NR)
{ {
@ -417,10 +415,9 @@ message *mp;
reply(mp, OK); reply(mp, OK);
} }
PRIVATE void do_reserve(mp) PRIVATE void do_reserve(message *mp)
message *mp;
{ {
int i, r, devind; int r, devind;
devind= mp->m1_i1; devind= mp->m1_i1;

View file

@ -185,8 +185,7 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
return(OK); return(OK);
} }
PRIVATE void hw_init(pp) PRIVATE void hw_init(struct port *pp)
struct port *pp;
{ {
int r, devind, irq; int r, devind, irq;
u8_t v8; u8_t v8;
@ -313,8 +312,7 @@ PRIVATE void map_regs(struct port *pp, u32_t base)
panic("map_regs: sys_vm_map failed: %d", r); panic("map_regs: sys_vm_map failed: %d", r);
} }
PRIVATE void do_int(pp) PRIVATE void do_int(struct port *pp)
struct port *pp;
{ {
int r, devind, vcc_5v, vcc_3v, vcc_Xv, vcc_Yv, int r, devind, vcc_5v, vcc_3v, vcc_Xv, vcc_Yv,
socket_5v, socket_3v, socket_Xv, socket_Yv; socket_5v, socket_3v, socket_Xv, socket_Yv;

View file

@ -45,14 +45,11 @@
#define VERBOSE_APIC(x) x #define VERBOSE_APIC(x) x
PRIVATE int reboot_type;
PRIVATE int ioapic_enabled; PRIVATE int ioapic_enabled;
PRIVATE u32_t ioapic_id_mask[8]; PRIVATE u32_t ioapic_id_mask[8];
PRIVATE u32_t lapic_id_mask[8];
PUBLIC u32_t lapic_addr_vaddr; PUBLIC u32_t lapic_addr_vaddr;
PUBLIC vir_bytes lapic_addr; PUBLIC vir_bytes lapic_addr;
PUBLIC vir_bytes lapic_eoi_addr; PUBLIC vir_bytes lapic_eoi_addr;
PRIVATE u32_t lapic_taskpri_addr;
PRIVATE volatile int probe_ticks; PRIVATE volatile int probe_ticks;
PRIVATE u64_t tsc0, tsc1; PRIVATE u64_t tsc0, tsc1;
@ -62,8 +59,6 @@ PRIVATE u32_t lapic_tctr0, lapic_tctr1;
PUBLIC u8_t apicid2cpuid[MAX_NR_APICIDS+1]; /* Accessed from asm */ PUBLIC u8_t apicid2cpuid[MAX_NR_APICIDS+1]; /* Accessed from asm */
PRIVATE unsigned apic_imcrp; PRIVATE unsigned apic_imcrp;
PRIVATE unsigned nioapics;
PRIVATE unsigned nbuses;
PRIVATE unsigned nintrs; PRIVATE unsigned nintrs;
PRIVATE const unsigned nlints = 0; PRIVATE const unsigned nlints = 0;
@ -77,7 +72,6 @@ PRIVATE u32_t lapic_bus_freq[CONFIG_MAX_CPUS];
#define PROBE_TICKS (system_hz / 10) #define PROBE_TICKS (system_hz / 10)
PRIVATE u32_t pci_config_intr_data; PRIVATE u32_t pci_config_intr_data;
PRIVATE u32_t ioapic_extint_assigned = 0;
PRIVATE int lapic_extint_assigned = 0; PRIVATE int lapic_extint_assigned = 0;
PRIVATE int calib_clk_handler(irq_hook_t * UNUSED(hook)) PRIVATE int calib_clk_handler(irq_hook_t * UNUSED(hook))
@ -225,35 +219,6 @@ PRIVATE u32_t lapic_errstatus(void)
return lapic_read(LAPIC_ESR); return lapic_read(LAPIC_ESR);
} }
PRIVATE void lapic_disable(void)
{
/* Disable current APIC and close interrupts from PIC */
u32_t val;
if (!lapic_addr)
return;
{
/* leave it enabled if imcr is not set */
val = lapic_read(LAPIC_LINT0);
val &= ~(APIC_ICR_DM_MASK|APIC_ICR_INT_MASK);
val |= APIC_ICR_DM_EXTINT; /* ExtINT at LINT0 */
lapic_write (LAPIC_LINT0, val);
return;
}
val = lapic_read(LAPIC_LINT0) & 0xFFFE58FF;
val |= APIC_ICR_INT_MASK;
lapic_write (LAPIC_LINT0, val);
val = lapic_read(LAPIC_LINT1) & 0xFFFE58FF;
val |= APIC_ICR_INT_MASK;
lapic_write (LAPIC_LINT1, val);
val = lapic_read(LAPIC_SIVR) & 0xFFFFFF00;
val &= ~APIC_ENABLE;
lapic_write(LAPIC_SIVR, val);
}
PRIVATE void lapic_enable_no_lints(void) PRIVATE void lapic_enable_no_lints(void)
{ {
u32_t val; u32_t val;

View file

@ -63,26 +63,6 @@ PUBLIC void stop_8253A_timer(void)
outb(TIMER0, 0); outb(TIMER0, 0);
} }
/*===========================================================================*
* read_8235A_timer *
*===========================================================================*/
PRIVATE clock_t read_8253A_timer(void)
{
/* Read the counter of channel 0 of the 8253A timer. This counter
* counts down at a rate of TIMER_FREQ and restarts at
* TIMER_COUNT-1 when it reaches zero. A hardware interrupt
* (clock tick) occurs when the counter gets to zero and restarts
* its cycle.
*/
u32_t count;
outb(TIMER_MODE, LATCH_COUNT);
count = inb(TIMER0);
count |= (inb(TIMER0) << 8);
return count;
}
PRIVATE int calib_cpu_handler(irq_hook_t * UNUSED(hook)) PRIVATE int calib_cpu_handler(irq_hook_t * UNUSED(hook))
{ {
u64_t tsc; u64_t tsc;

View file

@ -101,7 +101,6 @@ PUBLIC int do_semget(message *m)
PRIVATE void send_message_to_process(endpoint_t who, int ret, int ignore) PRIVATE void send_message_to_process(endpoint_t who, int ret, int ignore)
{ {
message m; message m;
int r;
m.m_type = ret; m.m_type = ret;
sendnb(who, &m); sendnb(who, &m);

View file

@ -53,7 +53,6 @@ PUBLIC struct buf *get_block(
int b; int b;
static struct buf *bp, *prev_ptr; static struct buf *bp, *prev_ptr;
int vmfound = 0;
u64_t yieldid = VM_BLOCKID_NONE, getid = make64(dev, block); u64_t yieldid = VM_BLOCKID_NONE, getid = make64(dev, block);
int vmcache = 0; int vmcache = 0;

View file

@ -59,9 +59,7 @@ FORWARD _PROTOTYPE( int sef_cb_signal_manager, (endpoint_t target, int signo) );
PUBLIC int main() PUBLIC int main()
{ {
/* Main routine of the process manager. */ /* Main routine of the process manager. */
int result, s, proc_nr; int result;
struct mproc *rmp;
sigset_t sigset;
/* SEF local startup. */ /* SEF local startup. */
sef_local_startup(); sef_local_startup();
@ -196,12 +194,10 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
static char core_sigs[] = { SIGQUIT, SIGILL, SIGTRAP, SIGABRT, static char core_sigs[] = { SIGQUIT, SIGILL, SIGTRAP, SIGABRT,
SIGEMT, SIGFPE, SIGBUS, SIGSEGV }; SIGEMT, SIGFPE, SIGBUS, SIGSEGV };
static char ign_sigs[] = { SIGCHLD, SIGWINCH, SIGCONT }; static char ign_sigs[] = { SIGCHLD, SIGWINCH, SIGCONT };
static char mess_sigs[] = { SIGTERM, SIGHUP, SIGABRT, SIGQUIT };
static char noign_sigs[] = { SIGILL, SIGTRAP, SIGEMT, SIGFPE, static char noign_sigs[] = { SIGILL, SIGTRAP, SIGEMT, SIGFPE,
SIGBUS, SIGSEGV }; SIGBUS, SIGSEGV };
register struct mproc *rmp; register struct mproc *rmp;
register char *sig_ptr; register char *sig_ptr;
register int signo;
message mess; message mess;
/* Initialize process table, including timers. */ /* Initialize process table, including timers. */

View file

@ -406,7 +406,7 @@ PUBLIC int do_reboot()
*===========================================================================*/ *===========================================================================*/
PUBLIC int do_getsetpriority() PUBLIC int do_getsetpriority()
{ {
int r, arg_which, arg_who, arg_pri, new_q; int r, arg_which, arg_who, arg_pri;
struct mproc *rmp; struct mproc *rmp;
arg_which = m_in.m1_i1; arg_which = m_in.m1_i1;