summaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-29 01:41:54 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-29 01:41:54 +0000
commitf969d69ba9f952e5bdd38278e25e26a3e4a61a70 (patch)
treeb3530d803df59d726afaabebc6626987dee1ca05 /arch/m68k
parenta10ce7ef2066b455d69187643ddf2073bfc4db24 (diff)
Merge with 2.3.27.
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/config.in5
-rw-r--r--arch/m68k/defconfig2
-rw-r--r--arch/m68k/kernel/m68k_ksyms.c2
-rw-r--r--arch/m68k/kernel/process.c35
-rw-r--r--arch/m68k/mac/iop.c23
-rw-r--r--arch/m68k/math-emu/fp_emu.h8
6 files changed, 48 insertions, 27 deletions
diff --git a/arch/m68k/config.in b/arch/m68k/config.in
index a458ff609..4888b4b48 100644
--- a/arch/m68k/config.in
+++ b/arch/m68k/config.in
@@ -70,6 +70,11 @@ bool 'Networking support' CONFIG_NET
bool 'System V IPC' CONFIG_SYSVIPC
bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
bool 'Sysctl support' CONFIG_SYSCTL
+if [ "$CONFIG_PROC_FS" = "y" ]; then
+ choice 'Kernel core (/proc/kcore) format' \
+ "ELF CONFIG_KCORE_ELF \
+ A.OUT CONFIG_KCORE_AOUT" ELF
+fi
tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
diff --git a/arch/m68k/defconfig b/arch/m68k/defconfig
index 109ce19fa..b88a48984 100644
--- a/arch/m68k/defconfig
+++ b/arch/m68k/defconfig
@@ -38,6 +38,8 @@ CONFIG_M68040=y
CONFIG_NET=y
CONFIG_SYSVIPC=y
CONFIG_SYSCTL=y
+CONFIG_KCORE_ELF=y
+# CONFIG_KCORE_AOUT is not set
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
CONFIG_ZORRO=y
diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c
index 64af7cf7c..d9750560f 100644
--- a/arch/m68k/kernel/m68k_ksyms.c
+++ b/arch/m68k/kernel/m68k_ksyms.c
@@ -75,3 +75,5 @@ EXPORT_SYMBOL_NOVERS(__down_failed);
EXPORT_SYMBOL_NOVERS(__down_failed_interruptible);
EXPORT_SYMBOL_NOVERS(__down_failed_trylock);
EXPORT_SYMBOL_NOVERS(__up_wakeup);
+
+EXPORT_SYMBOL(get_wchan);
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c
index ba94860f6..030b3e136 100644
--- a/arch/m68k/kernel/process.c
+++ b/arch/m68k/kernel/process.c
@@ -102,10 +102,6 @@ void machine_halt(void)
void machine_power_off(void)
{
-#if defined(CONFIG_APM) && defined(CONFIG_APM_POWER_OFF)
- apm_set_power_state(APM_STATE_OFF);
-#endif
-
if (mach_power_off)
mach_power_off();
for (;;);
@@ -350,3 +346,34 @@ out:
unlock_kernel();
return error;
}
+
+/*
+ * These bracket the sleeping functions..
+ */
+extern void scheduling_functions_start_here(void);
+extern void scheduling_functions_end_here(void);
+#define first_sched ((unsigned long) scheduling_functions_start_here)
+#define last_sched ((unsigned long) scheduling_functions_end_here)
+
+unsigned long get_wchan(struct task_struct *p)
+{
+ unsigned long fp, pc;
+ unsigned long stack_page;
+ int count = 0;
+ if (!p || p == current || p->state == TASK_RUNNING)
+ return 0;
+
+ stack_page = (unsigned long)p;
+ fp = ((struct switch_stack *)p->thread.ksp)->a6;
+ do {
+ if (fp < stack_page+sizeof(struct task_struct) ||
+ fp >= 8184+stack_page)
+ return 0;
+ pc = ((unsigned long *)fp)[1];
+ /* FIXME: This depends on the order of these functions. */
+ if (pc < first_sched || pc >= last_sched)
+ return pc;
+ fp = *(unsigned long *) fp;
+ } while (count++ < 16);
+ return 0;
+}
diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c
index ab07e3d48..26a0518db 100644
--- a/arch/m68k/mac/iop.c
+++ b/arch/m68k/mac/iop.c
@@ -125,21 +125,9 @@
int iop_scc_present,iop_ism_present;
#ifdef CONFIG_PROC_FS
-
-/*
- * sneaky reuse of the PROC_MAC_VIA inode. It's not needed by via.c
- * anymore so we'll use it to debut the IOPs.
- */
-
-int iop_get_proc_info(char *, char **, off_t, int, int);
-
-static struct proc_dir_entry proc_mac_iop = {
- PROC_MAC_VIA, 7, "mac_iop",
- S_IFREG | S_IRUGO, 1, 0, 0,
- 0, &proc_array_inode_operations,
- &iop_get_proc_info
-};
-
+static int iop_get_proc_info(char *, char **, off_t, int, int);
+#else
+static int iop_get_proc_info(char *, char **, off_t, int, int) {}
#endif /* CONFIG_PROC_FS */
/* structure for tracking channel listeners */
@@ -315,9 +303,7 @@ void __init iop_init(void)
iop_listeners[IOP_NUM_ISM][i].handler = NULL;
}
-#ifdef CONFIG_PROC_FS
- proc_register(&proc_root, &proc_mac_iop);
-#endif
+ create_proc_info_entry("mac_iop",0,0,iop_get_proc_info);
}
/*
@@ -722,4 +708,5 @@ int iop_get_proc_info(char *buf, char **start, off_t pos, int count, int wr)
}
return (count > cnt) ? cnt : count;
}
+
#endif /* CONFIG_PROC_FS */
diff --git a/arch/m68k/math-emu/fp_emu.h b/arch/m68k/math-emu/fp_emu.h
index 9344b939b..1a4e16802 100644
--- a/arch/m68k/math-emu/fp_emu.h
+++ b/arch/m68k/math-emu/fp_emu.h
@@ -38,10 +38,11 @@
#ifndef _FP_EMU_H
#define _FP_EMU_H
-#ifndef __ASSEMBLY__
-
+#include "../kernel/m68k_defs.h"
#include <asm/math-emu.h>
+#ifndef __ASSEMBLY__
+
#define IS_INF(a) ((a)->exp == 0x7fff)
#define IS_ZERO(a) ((a)->mant.m64 == 0)
@@ -114,9 +115,6 @@ extern const struct fp_ext fp_Inf;
#else /* __ASSEMBLY__ */
-#include "../kernel/m68k_defs.h"
-#include <asm/math-emu.h>
-
/*
* set, reset or clear a bit in the fp status register
*/