Subject: Re: panic: swfree
To: David Jones <dej@eecg.toronto.edu>
From: Markus Illenseer <markus@TechFak.Uni-Bielefeld.DE>
List: amiga-dev
Date: 05/08/1994 23:04:36
>
> The file /sys/vm/vm_swap.c has changed substantially. It looks like the
> 4.3 BSD swapper functionality has been incorporated into the Mach VM
> system.
>
> One consequence of this is that swapinit() expects the swdevt array to
> be terminated differently than from before. The swapgeneric.c module
> does not do this properly. So, if you build a GENERIC kernel, you get
> panic: swfree.
This is what I patched on my sources to get back going again:
*** ./arch/amiga/amiga/swapgeneric.c-orig Fri Apr 22 03:13:20 1994
--- ./arch/amiga/amiga/swapgeneric.c Sat May 7 20:06:07 1994
***************
*** 53,60 ****
dev_t dumpdev = NODEV;
int nswap;
struct swdevt swdevt[] = {
! { -1, 1, 0 },
! { 0, 0, 0 },
};
int dmmin, dmmax, dmtext;
--- 53,60 ----
dev_t dumpdev = NODEV;
int nswap;
struct swdevt swdevt[] = {
! { NODEV, SW_FREED, 0 },
! { NODEV, 0, 0 },
};
int dmmin, dmmax, dmtext;
*** ./arch/amiga/amiga/autoconf.c-orig Fri Apr 22 03:13:19 1994
--- ./arch/amiga/amiga/autoconf.c Sat May 7 20:16:25 1994
***************
*** 951,957 ****
register struct swdevt *swp;
register int nblks;
! for (swp = swdevt; swp->sw_dev; swp++) {
if (bdevsw[major(swp->sw_dev)].d_psize) {
nblks =
bdevsw[major(swp->sw_dev)].d_psize(swp->sw_dev);
--- 951,957 ----
register struct swdevt *swp;
register int nblks;
! for (swp = swdevt; swp->sw_dev != NODEV; swp++) {
if (bdevsw[major(swp->sw_dev)].d_psize) {
nblks =
bdevsw[major(swp->sw_dev)].d_psize(swp->sw_dev);
***************
*** 1094,1100 ****
#ifdef DOSWAP
mindev &= ~PARTITIONMASK;
! for (swp = swdevt; swp->sw_dev; swp++) {
if (majdev == major(swp->sw_dev) &&
mindev == (minor(swp->sw_dev) & ~PARTITIONMASK)) {
temp = swdevt[0].sw_dev;
--- 1094,1100 ----
#ifdef DOSWAP
mindev &= ~PARTITIONMASK;
! for (swp = swdevt; swp->sw_dev != NODEV; swp++) {
if (majdev == major(swp->sw_dev) &&
mindev == (minor(swp->sw_dev) & ~PARTITIONMASK)) {
temp = swdevt[0].sw_dev;
------------------------------------------------------------------------------