* swapspace in HHL 2.0
@ 2001-09-07 11:18 James F Dougherty
2001-09-07 18:27 ` Mark Hatle
2001-09-18 16:49 ` applications in HHL 2.0, 405GP David Updegraff
0 siblings, 2 replies; 5+ messages in thread
From: James F Dougherty @ 2001-09-07 11:18 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: jfd
Hi,
I used initdconfig to enable mountall.sh and have an /etc/fstab like
so:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/root / auto defaults,errors=remount-ro 0 0
/proc /proc proc defaults 0 0
/dev/hda1 / auto rw 0 1
/dev/hda2 swap swap defaults 0 2
When the system boots, it says that it is enabling the swapspace, however
if you cat /proc/meminfo, it shows that it is really not enabled.
Now, if you do a "swapon -a" instead of "swapon -a 2" (like in the mountall.sh)
then swap comes on.
What am I doing wrong?
MTIA -James
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: swapspace in HHL 2.0
2001-09-07 11:18 swapspace in HHL 2.0 James F Dougherty
@ 2001-09-07 18:27 ` Mark Hatle
2001-09-18 16:49 ` applications in HHL 2.0, 405GP David Updegraff
1 sibling, 0 replies; 5+ messages in thread
From: Mark Hatle @ 2001-09-07 18:27 UTC (permalink / raw)
To: James F Dougherty; +Cc: linuxppc-embedded, jfd
James F Dougherty wrote:
>
> Hi,
>
> I used initdconfig to enable mountall.sh and have an /etc/fstab like
> so:
>
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point> <type> <options> <dump> <pass>
> /dev/root / auto defaults,errors=remount-ro 0 0
> /proc /proc proc defaults 0 0
> /dev/hda1 / auto rw 0 1
> /dev/hda2 swap swap defaults 0 2
>
> When the system boots, it says that it is enabling the swapspace, however
> if you cat /proc/meminfo, it shows that it is really not enabled.
> Now, if you do a "swapon -a" instead of "swapon -a 2" (like in the mountall.sh)
> then swap comes on.
>
> What am I doing wrong?
The file on one of my targets is:
/dev/hda3 / ext2 defaults,errors=remount-ro
1 1
/dev/hda4 /usr/local ext2 defaults,errors=remount-ro
1 2
/dev/hda2 /boot hfs defaults
1 2
proc /proc proc defaults
0 0
/var/swap swap swap defaults
0 0
(and that works) FYI my swap is in a file not a partition, that way I
can increase/decrease the size of the swap file at will... (Only down
side, is that swap is not read/write until after the root filesystem is
mounted in my case...)
So the only thing I can think of the is "pass" flag you have set to 2.
I don't know why that would effect anything though.
Look at the "checkroot.sh" and "mountall.sh" initscripts, they enable
the swap spaces.
--Mark
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* applications in HHL 2.0, 405GP
2001-09-07 11:18 swapspace in HHL 2.0 James F Dougherty
2001-09-07 18:27 ` Mark Hatle
@ 2001-09-18 16:49 ` David Updegraff
2001-09-18 19:05 ` Joe Green
1 sibling, 1 reply; 5+ messages in thread
From: David Updegraff @ 2001-09-18 16:49 UTC (permalink / raw)
To: linuxppc-embedded
Hi.
I need Tcl/Expect in our environment and HHL20 does not appear to include it,
and bringing it over from other PPC distributions (eg. Debian) just traps out
with "Illegal Instruction" ... which I presume is some floating point
instruction which the 405GP lacks.
My approach is to go get the Tcl/Expect sources and start building away..
Is there a better approach? Is there a repository anywere where
PPC -msoft-float RPMs live that I could borrow from/contribute to?
Anyway, I thought it was the "theory" that the kernel was trapping the
float instructions and emulating them...???
Please advise. Thanx.
--
Dave Updegraff / dave@cray.com / 218-525-1154
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: applications in HHL 2.0, 405GP
2001-09-18 16:49 ` applications in HHL 2.0, 405GP David Updegraff
@ 2001-09-18 19:05 ` Joe Green
2001-09-19 2:07 ` David Gibson
0 siblings, 1 reply; 5+ messages in thread
From: Joe Green @ 2001-09-18 19:05 UTC (permalink / raw)
To: David Updegraff, linuxppc-embedded
David Updegraff wrote:
> Anyway, I thought it was the "theory" that the kernel was trapping the
> float instructions and emulating them...???
Remember that it's not just a matter of configuring math emulation into
the kernel. The function call ABI is different for soft vs. hard
float, so library calls will go kerflooey if you mix the two. If you
stick to all hard float user space, you can use kernel math emulation.
--
Joe Green <jgreen@mvista.com>
MontaVista Software, Inc.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: applications in HHL 2.0, 405GP
2001-09-18 19:05 ` Joe Green
@ 2001-09-19 2:07 ` David Gibson
0 siblings, 0 replies; 5+ messages in thread
From: David Gibson @ 2001-09-19 2:07 UTC (permalink / raw)
To: linuxppc-embedded
On Tue, Sep 18, 2001 at 12:05:09PM -0700, Joe Green wrote:
>
> David Updegraff wrote:
> > Anyway, I thought it was the "theory" that the kernel was trapping the
> > float instructions and emulating them...???
>
> Remember that it's not just a matter of configuring math emulation into
> the kernel. The function call ABI is different for soft vs. hard
> float, so library calls will go kerflooey if you mix the two. If you
> stick to all hard float user space, you can use kernel math emulation.
Except of course that the 4xx port as it stands doesn't support kernel
math emulation. The patch below adds support (and also lets 4xx do
the other emulated instructions that most of the ppc ports support).
Anyone care to merge it?
diff -urN /home/dgibson/kernel/linuxppc_2_4_devel/arch/ppc/kernel/traps.c linux-bungo/arch/ppc/kernel/traps.c
--- /home/dgibson/kernel/linuxppc_2_4_devel/arch/ppc/kernel/traps.c Tue Sep 4 19:13:42 2001
+++ linux-bungo/arch/ppc/kernel/traps.c Wed Sep 12 13:16:43 2001
@@ -267,6 +267,7 @@
{
#if defined(CONFIG_4xx)
unsigned int esr = mfspr(SPRN_ESR);
+ extern int do_mathemu(struct pt_regs *regs);
if (esr & ESR_PTR) {
#if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
@@ -275,9 +276,19 @@
#endif
_exception(SIGTRAP, regs);
} else {
- _exception(SIGILL, regs);
+ int errcode;
+#ifdef CONFIG_MATH_EMULATION
+ if (do_mathemu(regs) == 0)
+ return;
+#endif /* CONFIG_MATH_EMULATION */
+ if ((errcode = emulate_instruction(regs))) {
+ if (errcode == -EFAULT)
+ _exception(SIGBUS, regs);
+ else
+ _exception(SIGILL, regs);
+ }
}
-#else
+#else /* ! CONFIG_4xx */
if (regs->msr & 0x100000) {
/* IEEE FP exception */
_exception(SIGFPE, regs);
@@ -286,7 +297,7 @@
#if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
if (debugger_bpt(regs))
return;
-#endif
+#endif /* defined(CONFIG_XMON) || defined(CONFIG_KGDB) */
_exception(SIGTRAP, regs);
} else {
/* Try to emulate it if we should. */
--
David Gibson | For every complex problem there is a
david@gibson.dropbear.id.au | solution which is simple, neat and
| wrong. -- H.L. Mencken
http://www.ozlabs.org/people/dgibson
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-09-19 2:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-07 11:18 swapspace in HHL 2.0 James F Dougherty
2001-09-07 18:27 ` Mark Hatle
2001-09-18 16:49 ` applications in HHL 2.0, 405GP David Updegraff
2001-09-18 19:05 ` Joe Green
2001-09-19 2:07 ` David Gibson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).