aboutsummaryrefslogtreecommitdiff
path: root/i386/i386at
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2023-01-20 01:19:53 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-01-24 00:13:56 +0100
commitfed2c08c45bd0e87b90d07fd52011de129be9315 (patch)
tree16c37d4f53d35da8d98ec3f4ff6cbf1fdb90bb89 /i386/i386at
parentc5134c7759b7a3f0c4ed0b57a1ab8e49666ee4b6 (diff)
downloadgnumach-fed2c08c45bd0e87b90d07fd52011de129be9315.tar.gz
gnumach-fed2c08c45bd0e87b90d07fd52011de129be9315.tar.bz2
gnumach-fed2c08c45bd0e87b90d07fd52011de129be9315.zip
Fix several warnings for -Wmissing-prototypes
* device/ds_routines.c: use static qualifier. * device/subrs.c: delete unused functions. * i386/i386/ast_check.c: include prototypes in kern/ast.h * i386/i386/db_disasm.c: Include prototypes in ddb/db_examine.h * i386/i386/db_interface.h: Define prototype for kdb_kentry. Expose debug methods feep and kd_debug_put. * i386/i386/db_trace.c: delete left over cthreads support, functions are not used. * i386/i386/model_dep.h: Define prototype for c_boot_entry. * i386/i386at/acpi_parse_apic.c: Static qualifiers. * i386/i386at/autoconf.c: Include header file for prototypes and remove dead code. * i386/i386at/autoconf.h: Fix prototype. * i386/i386at/com.c: Add static qualifiers, delete dead code. * i386/i386at/com.c: ditto. * i386/i386at/com.h: Define prototypes for debug functions. * i386/i386at/int_init.c: Include header. * i386/i386at/kd.c: Include header for debug interface. Remove dead kd_cmdreg_read and make xga_getpos static. * i386/i386at/kd_mouse.c: Static qualifiers. * i386/i386at/lpr.c: Dead lprpr. * i386/i386at/model_dep.c: Remove exit function. * kern/mach_clock.c: Include mig prototypes. * kern/mach_clock.h: Remove duplicates of mig prototypes. * kern/machine.c: Use static. * kern/startup.c: slave_main is unused. * kern/thread.h: Define thread_stats that is useful for debugging. * kern/timer.c: Keep db_thread_times since it can be used for debugging. * kern/timer.h: ditto. * linux/dev/glue/misc.c: Use mig header for host_get_time. Message-Id: <Y8oyiecaflCaYhaW@mercury.tail36e24.ts.net>
Diffstat (limited to 'i386/i386at')
-rw-r--r--i386/i386at/acpi_parse_apic.c2
-rw-r--r--i386/i386at/autoconf.c16
-rw-r--r--i386/i386at/autoconf.h4
-rw-r--r--i386/i386at/com.c24
-rw-r--r--i386/i386at/com.h2
-rw-r--r--i386/i386at/int_init.c1
-rw-r--r--i386/i386at/kd.c94
-rw-r--r--i386/i386at/kd_mouse.c8
-rw-r--r--i386/i386at/lpr.c6
-rw-r--r--i386/i386at/model_dep.c5
10 files changed, 51 insertions, 111 deletions
diff --git a/i386/i386at/acpi_parse_apic.c b/i386/i386at/acpi_parse_apic.c
index 22ed8979..2680d0aa 100644
--- a/i386/i386at/acpi_parse_apic.c
+++ b/i386/i386at/acpi_parse_apic.c
@@ -173,7 +173,7 @@ acpi_search_rsdp(void *addr, uint32_t length)
*
* Returns the reference to RDSP structure if success, NULL if failure.
*/
-struct acpi_rsdp*
+static struct acpi_rsdp*
acpi_get_rsdp(void)
{
uint16_t *start = 0;
diff --git a/i386/i386at/autoconf.c b/i386/i386at/autoconf.c
index 8dc0b3ea..ef813d92 100644
--- a/i386/i386at/autoconf.c
+++ b/i386/i386at/autoconf.c
@@ -26,6 +26,7 @@
#include <kern/printf.h>
#include <mach/std_types.h>
+#include <i386at/autoconf.h>
#include <i386/irq.h>
#include <i386/ipl.h>
#include <chips/busses.h>
@@ -140,18 +141,3 @@ void take_dev_irq(
}
}
-
-void take_ctlr_irq(
- const struct bus_ctlr *ctlr)
-{
- int pic = ctlr->sysdep1;
- if (ivect[pic] == intnull) {
- iunit[pic] = ctlr->unit;
- ivect[pic] = ctlr->intr;
- } else {
- printf("The device below will clobber IRQ %d (%p).\n", pic, ivect[pic]);
- printf("You have two devices at the same IRQ. This won't work.\n");
- printf("Reconfigure your hardware and try again.\n");
- while (1);
- }
-}
diff --git a/i386/i386at/autoconf.h b/i386/i386at/autoconf.h
index a16a88f9..81fc5da7 100644
--- a/i386/i386at/autoconf.h
+++ b/i386/i386at/autoconf.h
@@ -37,7 +37,7 @@
*/
void probeio(void);
-extern void take_dev_irq (
- struct bus_device *dev);
+void take_dev_irq(
+ const struct bus_device *dev);
#endif /* _AUTOCONF_H_ */
diff --git a/i386/i386at/com.c b/i386/i386at/com.c
index a6d6f701..000475db 100644
--- a/i386/i386at/com.c
+++ b/i386/i386at/com.c
@@ -91,7 +91,7 @@ u_short divisorreg[] = {
* the relevant device is present today.
*
*/
-int
+static int
comprobe_general(struct bus_device *dev, int noisy)
{
u_short addr = dev->address;
@@ -298,7 +298,7 @@ comcninit(struct consdev *cp)
* Used to handle PCMCIA modems, which may appear
* at any time.
*/
-boolean_t com_reprobe(
+static boolean_t com_reprobe(
int unit)
{
struct bus_device *device;
@@ -617,26 +617,6 @@ comparam(int unit)
splx(s);
}
-void
-comparm(int unit, int baud, int intr, int mode, int modem)
-{
- u_short addr = (u_short)(cominfo[unit]->address);
- spl_t s = spltty();
-
- if (unit != 0 && unit != 1) {
- printf("comparm(unit, baud, mode, intr, modem)\n");
- splx(s);
- return;
- }
- outb(LINE_CTL(addr), iDLAB);
- outb(BAUD_LSB(addr), divisorreg[baud] & 0xff);
- outb(BAUD_MSB(addr), divisorreg[baud] >> 8);
- outb(LINE_CTL(addr), mode);
- outb(INTR_ENAB(addr), intr);
- outb(MODEM_CTL(addr), modem);
- splx(s);
-}
-
int comst_1, comst_2, comst_3, comst_4, comst_5 = 14;
void
diff --git a/i386/i386at/com.h b/i386/i386at/com.h
index a415488c..3be29305 100644
--- a/i386/i386at/com.h
+++ b/i386/i386at/com.h
@@ -73,6 +73,8 @@ comsetstat(
#if MACH_KDB
extern void kdb_kintr(void);
+extern void compr_addr(vm_offset_t addr);
+extern int compr(int unit);
#endif /* MACH_KDB */
extern io_return_t comopen(dev_t dev, int flag, io_req_t ior);
diff --git a/i386/i386at/int_init.c b/i386/i386at/int_init.c
index 6da627dd..3fed4197 100644
--- a/i386/i386at/int_init.c
+++ b/i386/i386at/int_init.c
@@ -22,6 +22,7 @@
*/
#include <i386at/idt.h>
+#include <i386at/int_init.h>
#include <i386/gdt.h>
/* defined in locore.S */
diff --git a/i386/i386at/kd.c b/i386/i386at/kd.c
index 9abc1dd0..2fa7b60d 100644
--- a/i386/i386at/kd.c
+++ b/i386/i386at/kd.c
@@ -85,6 +85,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <device/io_req.h>
#include <device/buf.h>
#include <vm/vm_kern.h>
+#include <i386/db_interface.h>
#include <i386/locore.h>
#include <i386/loose_ends.h>
#include <i386/vm_param.h>
@@ -346,6 +347,15 @@ short font_byte_width = 0; /* num bytes in 1 scan line of font */
int kd_pollc = 0;
#ifdef DEBUG
+static void
+pause(void)
+{
+ int i;
+
+ for (i = 0; i < 50000; ++i)
+ ;
+}
+
/*
* feep:
*
@@ -355,23 +365,11 @@ int kd_pollc = 0;
void
feep(void)
{
- int i;
-
kd_bellon();
- for (i = 0; i < 50000; ++i)
- ;
+ pause();
kd_belloff(NULL);
}
-void
-pause(void)
-{
- int i;
-
- for (i = 0; i < 50000; ++i)
- ;
-}
-
/*
* Put a debugging character on the screen.
* LOC=0 means put it in the bottom right corner, LOC=1 means put it
@@ -2255,20 +2253,6 @@ kd_getdata(void)
return(inb(K_RDWR));
}
-unsigned char
-kd_cmdreg_read(void)
-{
-int ch=KC_CMD_READ;
-
- while (inb(K_STATUS) & K_IBUF_FUL)
- ;
- outb(K_CMD, ch);
-
- while ((inb(K_STATUS) & K_OBUF_FUL) == 0)
- ;
- return(inb(K_RDWR));
-}
-
void
kd_cmdreg_write(int val)
{
@@ -2473,6 +2457,33 @@ int new_button = 0;
*/
#define SLAMBPW 2 /* bytes per word for "slam" fcns */
+/*
+ * xga_getpos:
+ *
+ * This function returns the current hardware cursor position on the
+ * screen, scaled for compatibility with kd_curpos.
+ *
+ * input : None
+ * output : returns the value of cursor position on screen
+ *
+ */
+static csrpos_t
+xga_getpos(void)
+
+{
+ unsigned char low;
+ unsigned char high;
+ short pos;
+
+ outb(kd_index_reg, C_HIGH);
+ high = inb(kd_io_reg);
+ outb(kd_index_reg, C_LOW);
+ low = inb(kd_io_reg);
+ pos = (0xff&low) + ((unsigned short)high<<8);
+
+ return(ONE_SPACE * (csrpos_t)pos);
+}
+
/*
* kd_xga_init:
@@ -2482,7 +2493,6 @@ int new_button = 0;
void
kd_xga_init(void)
{
- csrpos_t xga_getpos(void);
unsigned char start, stop;
#if 0
@@ -2571,34 +2581,6 @@ kd_xga_init(void)
/*
- * xga_getpos:
- *
- * This function returns the current hardware cursor position on the
- * screen, scaled for compatibility with kd_curpos.
- *
- * input : None
- * output : returns the value of cursor position on screen
- *
- */
-csrpos_t
-xga_getpos(void)
-
-{
- unsigned char low;
- unsigned char high;
- short pos;
-
- outb(kd_index_reg, C_HIGH);
- high = inb(kd_io_reg);
- outb(kd_index_reg, C_LOW);
- low = inb(kd_io_reg);
- pos = (0xff&low) + ((unsigned short)high<<8);
-
- return(ONE_SPACE * (csrpos_t)pos);
-}
-
-
-/*
* charput:
*
* Put attributed character for EGA/CGA/etc.
diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c
index 906c1d37..c870cf5a 100644
--- a/i386/i386at/kd_mouse.c
+++ b/i386/i386at/kd_mouse.c
@@ -110,7 +110,7 @@ int mouse_char_index; /* mouse response */
/*
* init_mouse_hw - initialize the serial port.
*/
-void
+static void
init_mouse_hw(dev_t unit, int mode)
{
unsigned short base_addr = cominfo[unit]->address;
@@ -594,7 +594,7 @@ mouse_packet_microsoft_mouse(u_char mousebuf[MOUSEBUFSIZE])
/*
* Write character to mouse. Called at spltty.
*/
-void kd_mouse_write(
+static void kd_mouse_write(
unsigned char ch)
{
while (inb(K_STATUS) & K_IBUF_FUL)
@@ -610,7 +610,7 @@ void kd_mouse_write(
* Read next character from mouse, waiting for interrupt
* to deliver it. Called at spltty.
*/
-int kd_mouse_read(void)
+static int kd_mouse_read(void)
{
int ch;
@@ -633,7 +633,7 @@ int kd_mouse_read(void)
/*
* Prepare buffer for receiving next packet from mouse.
*/
-void kd_mouse_read_reset(void)
+static void kd_mouse_read_reset(void)
{
mousebufindex = 0;
mouse_char_index = 0;
diff --git a/i386/i386at/lpr.c b/i386/i386at/lpr.c
index 3939af54..f8d42f3c 100644
--- a/i386/i386at/lpr.c
+++ b/i386/i386at/lpr.c
@@ -273,12 +273,6 @@ lprstop(
if ((tp->t_state & TS_BUSY) && (tp->t_state & TS_TTSTOP) == 0)
tp->t_state |= TS_FLUSH;
}
-int
-lprpr(int unit)
-{
- lprpr_addr(lprinfo[unit]->address);
- return 0;
-}
void
lprpr_addr(unsigned short addr)
diff --git a/i386/i386at/model_dep.c b/i386/i386at/model_dep.c
index 9ccc7551..7a679ba4 100644
--- a/i386/i386at/model_dep.c
+++ b/i386/i386at/model_dep.c
@@ -278,11 +278,6 @@ void halt_all_cpus(boolean_t reboot)
machine_idle (cpu_number ());
}
-void exit(int rc)
-{
- halt_all_cpus(0);
-}
-
void db_halt_cpu(void)
{
halt_all_cpus(0);