Commit 4e5f45c6 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.13pre4

parent 234c8819
...@@ -110,7 +110,7 @@ CORE_FILES =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o ...@@ -110,7 +110,7 @@ CORE_FILES =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o
FILESYSTEMS =fs/filesystems.a FILESYSTEMS =fs/filesystems.a
NETWORKS =net/network.a NETWORKS =net/network.a
DRIVERS =drivers/block/block.a \ DRIVERS =drivers/block/block.a \
drivers/char/char.a \ drivers/char/char.o \
drivers/parport/parport.a drivers/parport/parport.a
LIBS =$(TOPDIR)/lib/lib.a LIBS =$(TOPDIR)/lib/lib.a
SUBDIRS =kernel drivers mm fs net ipc lib SUBDIRS =kernel drivers mm fs net ipc lib
......
...@@ -94,8 +94,8 @@ tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC ...@@ -94,8 +94,8 @@ tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
source drivers/parport/Config.in source drivers/parport/Config.in
bool 'Advanced Power Management BIOS support' CONFIG_APM tristate 'Advanced Power Management BIOS support' CONFIG_APM
if [ "$CONFIG_APM" = "y" ]; then if [ "$CONFIG_APM" != "n" ]; then
bool ' Ignore USER SUSPEND' CONFIG_APM_IGNORE_USER_SUSPEND bool ' Ignore USER SUSPEND' CONFIG_APM_IGNORE_USER_SUSPEND
bool ' Enable PM at boot time' CONFIG_APM_DO_ENABLE bool ' Enable PM at boot time' CONFIG_APM_DO_ENABLE
bool ' Make CPU Idle calls when idle' CONFIG_APM_CPU_IDLE bool ' Make CPU Idle calls when idle' CONFIG_APM_CPU_IDLE
......
...@@ -34,8 +34,12 @@ else ...@@ -34,8 +34,12 @@ else
endif endif
endif endif
ifdef CONFIG_APM ifeq ($(CONFIG_APM),y)
OX_OBJS += apm.o OX_OBJS += apm.o
else
ifeq ($(CONFIG_APM),m)
MX_OBJS += apm.o
endif
endif endif
ifdef CONFIG_SMP ifdef CONFIG_SMP
......
...@@ -1428,7 +1428,7 @@ static int apm(void *unused) ...@@ -1428,7 +1428,7 @@ static int apm(void *unused)
* In short, if something bad happens, at least we have a choice * In short, if something bad happens, at least we have a choice
* of just killing the apm thread.. * of just killing the apm thread..
*/ */
void __init apm_init(void) static int __init apm_init(void)
{ {
static struct proc_dir_entry *ent; static struct proc_dir_entry *ent;
...@@ -1533,3 +1533,5 @@ void __init apm_init(void) ...@@ -1533,3 +1533,5 @@ void __init apm_init(void)
kernel_thread(apm, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND | SIGCHLD); kernel_thread(apm, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND | SIGCHLD);
} }
module_init(apm_init)
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/init.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/desc.h> #include <asm/desc.h>
#include <asm/init.h>
static struct vm_area_struct init_mmap = INIT_MMAP; static struct vm_area_struct init_mmap = INIT_MMAP;
static struct fs_struct init_fs = INIT_FS; static struct fs_struct init_fs = INIT_FS;
......
...@@ -242,7 +242,7 @@ static void clear_IO_APIC (void) ...@@ -242,7 +242,7 @@ static void clear_IO_APIC (void)
int pirq_entries [MAX_PIRQS]; int pirq_entries [MAX_PIRQS];
int pirqs_enabled; int pirqs_enabled;
static void __init ioapic_setup(char *str, int *ints) static int __init ioapic_setup(char *str)
{ {
extern int skip_ioapic_setup; /* defined in arch/i386/kernel/smp.c */ extern int skip_ioapic_setup; /* defined in arch/i386/kernel/smp.c */
...@@ -252,7 +252,7 @@ static void __init ioapic_setup(char *str, int *ints) ...@@ -252,7 +252,7 @@ static void __init ioapic_setup(char *str, int *ints)
__setup("noapic", ioapic_setup); __setup("noapic", ioapic_setup);
static void __init ioapic_pirq_setup(char *str) static int __init ioapic_pirq_setup(char *str)
{ {
int i, max; int i, max;
int ints[11]; int ints[11];
...@@ -275,6 +275,7 @@ static void __init ioapic_pirq_setup(char *str) ...@@ -275,6 +275,7 @@ static void __init ioapic_pirq_setup(char *str)
*/ */
pirq_entries[MAX_PIRQS-i-1] = ints[i+1]; pirq_entries[MAX_PIRQS-i-1] = ints[i+1];
} }
return 1;
} }
__setup("pirq=", ioapic_pirq_setup); __setup("pirq=", ioapic_pirq_setup);
......
...@@ -98,8 +98,9 @@ static int write_ldt(void * ptr, unsigned long bytecount, int oldmode) ...@@ -98,8 +98,9 @@ static int write_ldt(void * ptr, unsigned long bytecount, int oldmode)
printk(KERN_WARNING "LDT allocated for cloned task!\n"); printk(KERN_WARNING "LDT allocated for cloned task!\n");
/* /*
* Possibly do an SMP cross-call to other CPUs to reload * Possibly do an SMP cross-call to other CPUs to reload
* their LDTs * their LDTs?
*/ */
load_LDT(mm);
} }
lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->segments); lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->segments);
......
...@@ -1634,7 +1634,10 @@ static void flush_tlb_others(unsigned int cpumask) ...@@ -1634,7 +1634,10 @@ static void flush_tlb_others(unsigned int cpumask)
* Take care of "crossing" invalidates * Take care of "crossing" invalidates
*/ */
if (test_bit(cpu, &smp_invalidate_needed)) { if (test_bit(cpu, &smp_invalidate_needed)) {
struct mm_struct *mm = current->mm;
clear_bit(cpu, &smp_invalidate_needed); clear_bit(cpu, &smp_invalidate_needed);
if (mm)
atomic_set_mask(1 << cpu, &mm->cpu_vm_mask);
local_flush_tlb(); local_flush_tlb();
} }
--stuck; --stuck;
......
...@@ -271,3 +271,14 @@ int asyncd(void *unused) ...@@ -271,3 +271,14 @@ int asyncd(void *unused)
} }
} }
#if CONFIG_AP1000
static int __init init_ap1000(void)
{
kernel_thread(asyncd, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
return 0;
}
module_init(init_ap1000)
#endif
...@@ -18,19 +18,19 @@ ALL_SUB_DIRS := $(SUB_DIRS) ftape joystick ...@@ -18,19 +18,19 @@ ALL_SUB_DIRS := $(SUB_DIRS) ftape joystick
# #
FONTMAPFILE = cp437.uni FONTMAPFILE = cp437.uni
L_TARGET := char.a O_TARGET := char.o
M_OBJS := M_OBJS :=
L_OBJS := tty_io.o n_tty.o tty_ioctl.o mem.o random.o raw.o O_OBJS := tty_io.o n_tty.o tty_ioctl.o mem.o random.o raw.o
LX_OBJS := pty.o misc.o OX_OBJS := pty.o misc.o
ifdef CONFIG_VT ifdef CONFIG_VT
L_OBJS += vt.o vc_screen.o consolemap.o consolemap_deftbl.o O_OBJS += vt.o vc_screen.o consolemap.o consolemap_deftbl.o
LX_OBJS += console.o selection.o OX_OBJS += console.o selection.o
endif endif
ifeq ($(CONFIG_SERIAL),y) ifeq ($(CONFIG_SERIAL),y)
ifeq ($(CONFIG_SUN_SERIAL),) ifeq ($(CONFIG_SUN_SERIAL),)
LX_OBJS += serial.o OX_OBJS += serial.o
endif endif
else else
ifeq ($(CONFIG_SERIAL),m) ifeq ($(CONFIG_SERIAL),m)
...@@ -42,24 +42,24 @@ endif ...@@ -42,24 +42,24 @@ endif
ifndef CONFIG_SUN_KEYBOARD ifndef CONFIG_SUN_KEYBOARD
ifdef CONFIG_VT ifdef CONFIG_VT
LX_OBJS += keyboard.o OX_OBJS += keyboard.o
endif endif
ifneq ($(ARCH),m68k) ifneq ($(ARCH),m68k)
L_OBJS += pc_keyb.o defkeymap.o O_OBJS += pc_keyb.o defkeymap.o
endif endif
else else
ifdef CONFIG_PCI ifdef CONFIG_PCI
L_OBJS += defkeymap.o O_OBJS += defkeymap.o
LX_OBJS += keyboard.o OX_OBJS += keyboard.o
endif endif
endif endif
ifdef CONFIG_MAGIC_SYSRQ ifdef CONFIG_MAGIC_SYSRQ
LX_OBJS += sysrq.o OX_OBJS += sysrq.o
endif endif
ifeq ($(CONFIG_ATARI_DSP56K),y) ifeq ($(CONFIG_ATARI_DSP56K),y)
L_OBJS += dsp56k.o O_OBJS += dsp56k.o
S = y S = y
else else
ifeq ($(CONFIG_ATARI_DSP56K),m) ifeq ($(CONFIG_ATARI_DSP56K),m)
...@@ -69,7 +69,7 @@ else ...@@ -69,7 +69,7 @@ else
endif endif
ifeq ($(CONFIG_ROCKETPORT),y) ifeq ($(CONFIG_ROCKETPORT),y)
L_OBJS += rocket.o O_OBJS += rocket.o
else else
ifeq ($(CONFIG_ROCKETPORT),m) ifeq ($(CONFIG_ROCKETPORT),m)
M_OBJS += rocket.o M_OBJS += rocket.o
...@@ -77,7 +77,7 @@ else ...@@ -77,7 +77,7 @@ else
endif endif
ifeq ($(CONFIG_DIGI),y) ifeq ($(CONFIG_DIGI),y)
L_OBJS += pcxx.o O_OBJS += pcxx.o
else else
ifeq ($(CONFIG_DIGI),m) ifeq ($(CONFIG_DIGI),m)
M_OBJS += pcxx.o M_OBJS += pcxx.o
...@@ -85,7 +85,7 @@ else ...@@ -85,7 +85,7 @@ else
endif endif
ifeq ($(CONFIG_DIGIEPCA),y) ifeq ($(CONFIG_DIGIEPCA),y)
L_OBJS += epca.o O_OBJS += epca.o
else else
ifeq ($(CONFIG_DIGIEPCA),m) ifeq ($(CONFIG_DIGIEPCA),m)
M_OBJS += epca.o M_OBJS += epca.o
...@@ -93,7 +93,7 @@ else ...@@ -93,7 +93,7 @@ else
endif endif
ifeq ($(CONFIG_CYCLADES),y) ifeq ($(CONFIG_CYCLADES),y)
L_OBJS += cyclades.o O_OBJS += cyclades.o
else else
ifeq ($(CONFIG_CYCLADES),m) ifeq ($(CONFIG_CYCLADES),m)
M_OBJS += cyclades.o M_OBJS += cyclades.o
...@@ -101,7 +101,7 @@ else ...@@ -101,7 +101,7 @@ else
endif endif
ifeq ($(CONFIG_STALLION),y) ifeq ($(CONFIG_STALLION),y)
L_OBJS += stallion.o O_OBJS += stallion.o
else else
ifeq ($(CONFIG_STALLION),m) ifeq ($(CONFIG_STALLION),m)
M_OBJS += stallion.o M_OBJS += stallion.o
...@@ -109,7 +109,7 @@ else ...@@ -109,7 +109,7 @@ else
endif endif
ifeq ($(CONFIG_ISTALLION),y) ifeq ($(CONFIG_ISTALLION),y)
L_OBJS += istallion.o O_OBJS += istallion.o
else else
ifeq ($(CONFIG_ISTALLION),m) ifeq ($(CONFIG_ISTALLION),m)
M_OBJS += istallion.o M_OBJS += istallion.o
...@@ -117,7 +117,7 @@ else ...@@ -117,7 +117,7 @@ else
endif endif
ifeq ($(CONFIG_RISCOM8),y) ifeq ($(CONFIG_RISCOM8),y)
L_OBJS += riscom8.o O_OBJS += riscom8.o
else else
ifeq ($(CONFIG_RISCOM8),m) ifeq ($(CONFIG_RISCOM8),m)
M_OBJS += riscom8.o M_OBJS += riscom8.o
...@@ -125,7 +125,7 @@ else ...@@ -125,7 +125,7 @@ else
endif endif
ifeq ($(CONFIG_ISI),y) ifeq ($(CONFIG_ISI),y)
L_OBJS += isicom.o O_OBJS += isicom.o
else else
ifeq ($(CONFIG_ISI),m) ifeq ($(CONFIG_ISI),m)
M_OBJS += isicom.o M_OBJS += isicom.o
...@@ -133,7 +133,7 @@ else ...@@ -133,7 +133,7 @@ else
endif endif
ifeq ($(CONFIG_ESPSERIAL),y) ifeq ($(CONFIG_ESPSERIAL),y)
L_OBJS += esp.o O_OBJS += esp.o
else else
ifeq ($(CONFIG_ESPSERIAL),m) ifeq ($(CONFIG_ESPSERIAL),m)
M_OBJS += esp.o M_OBJS += esp.o
...@@ -149,7 +149,7 @@ ifeq ($(CONFIG_N_HDLC),m) ...@@ -149,7 +149,7 @@ ifeq ($(CONFIG_N_HDLC),m)
endif endif
ifeq ($(CONFIG_SPECIALIX),y) ifeq ($(CONFIG_SPECIALIX),y)
L_OBJS += specialix.o O_OBJS += specialix.o
else else
ifeq ($(CONFIG_SPECIALIX),m) ifeq ($(CONFIG_SPECIALIX),m)
M_OBJS += specialix.o M_OBJS += specialix.o
...@@ -157,7 +157,7 @@ else ...@@ -157,7 +157,7 @@ else
endif endif
ifeq ($(CONFIG_ATIXL_BUSMOUSE),y) ifeq ($(CONFIG_ATIXL_BUSMOUSE),y)
L_OBJS += atixlmouse.o O_OBJS += atixlmouse.o
else else
ifeq ($(CONFIG_ATIXL_BUSMOUSE),m) ifeq ($(CONFIG_ATIXL_BUSMOUSE),m)
M_OBJS += atixlmouse.o M_OBJS += atixlmouse.o
...@@ -165,7 +165,7 @@ else ...@@ -165,7 +165,7 @@ else
endif endif
ifeq ($(CONFIG_LOGIBUSMOUSE),y) ifeq ($(CONFIG_LOGIBUSMOUSE),y)
L_OBJS += logibusmouse.o O_OBJS += logibusmouse.o
else else
ifeq ($(CONFIG_LOGIBUSMOUSE),m) ifeq ($(CONFIG_LOGIBUSMOUSE),m)
M_OBJS += logibusmouse.o M_OBJS += logibusmouse.o
...@@ -173,7 +173,7 @@ else ...@@ -173,7 +173,7 @@ else
endif endif
ifeq ($(CONFIG_PRINTER),y) ifeq ($(CONFIG_PRINTER),y)
L_OBJS += lp.o O_OBJS += lp.o
else else
ifeq ($(CONFIG_PRINTER),m) ifeq ($(CONFIG_PRINTER),m)
M_OBJS += lp.o M_OBJS += lp.o
...@@ -181,7 +181,7 @@ else ...@@ -181,7 +181,7 @@ else
endif endif
ifeq ($(CONFIG_JOYSTICK),y) ifeq ($(CONFIG_JOYSTICK),y)
L_OBJS += joystick/js.o O_OBJS += joystick/js.o
SUB_DIRS += joystick SUB_DIRS += joystick
MOD_SUB_DIRS += joystick MOD_SUB_DIRS += joystick
else else
...@@ -192,7 +192,7 @@ endif ...@@ -192,7 +192,7 @@ endif
ifeq ($(CONFIG_MOUSE),y) ifeq ($(CONFIG_MOUSE),y)
M = y M = y
LX_OBJS += busmouse.o OX_OBJS += busmouse.o
else else
ifeq ($(CONFIG_MOUSE),m) ifeq ($(CONFIG_MOUSE),m)
MM = m MM = m
...@@ -201,7 +201,7 @@ else ...@@ -201,7 +201,7 @@ else
endif endif
ifeq ($(CONFIG_DTLK),y) ifeq ($(CONFIG_DTLK),y)
L_OBJS += dtlk.o O_OBJS += dtlk.o
else else
ifeq ($(CONFIG_DTLK),m) ifeq ($(CONFIG_DTLK),m)
M_OBJS += dtlk.o M_OBJS += dtlk.o
...@@ -209,7 +209,7 @@ else ...@@ -209,7 +209,7 @@ else
endif endif
ifeq ($(CONFIG_MS_BUSMOUSE),y) ifeq ($(CONFIG_MS_BUSMOUSE),y)
L_OBJS += msbusmouse.o O_OBJS += msbusmouse.o
else else
ifeq ($(CONFIG_MS_BUSMOUSE),m) ifeq ($(CONFIG_MS_BUSMOUSE),m)
M_OBJS += msbusmouse.o M_OBJS += msbusmouse.o
...@@ -217,7 +217,7 @@ else ...@@ -217,7 +217,7 @@ else
endif endif
ifeq ($(CONFIG_82C710_MOUSE),y) ifeq ($(CONFIG_82C710_MOUSE),y)
L_OBJS += qpmouse.o O_OBJS += qpmouse.o
else else
ifeq ($(CONFIG_82C710_MOUSE),m) ifeq ($(CONFIG_82C710_MOUSE),m)
M_OBJS += qpmouse.o M_OBJS += qpmouse.o
...@@ -225,7 +225,7 @@ else ...@@ -225,7 +225,7 @@ else
endif endif
ifeq ($(CONFIG_SOFT_WATCHDOG),y) ifeq ($(CONFIG_SOFT_WATCHDOG),y)
L_OBJS += softdog.o O_OBJS += softdog.o
else else
ifeq ($(CONFIG_SOFT_WATCHDOG),m) ifeq ($(CONFIG_SOFT_WATCHDOG),m)
M_OBJS += softdog.o M_OBJS += softdog.o
...@@ -233,7 +233,7 @@ else ...@@ -233,7 +233,7 @@ else
endif endif
ifeq ($(CONFIG_PCWATCHDOG),y) ifeq ($(CONFIG_PCWATCHDOG),y)
L_OBJS += pcwd.o O_OBJS += pcwd.o
else else
ifeq ($(CONFIG_PCWATCHDOG),m) ifeq ($(CONFIG_PCWATCHDOG),m)
M_OBJS += pcwd.o M_OBJS += pcwd.o
...@@ -241,7 +241,7 @@ else ...@@ -241,7 +241,7 @@ else
endif endif
ifeq ($(CONFIG_ACQUIRE_WDT),y) ifeq ($(CONFIG_ACQUIRE_WDT),y)
L_OBJS += acquirewdt.o O_OBJS += acquirewdt.o
else else
ifeq ($(CONFIG_ACQUIRE_WDT),m) ifeq ($(CONFIG_ACQUIRE_WDT),m)
M_OBJS += acquirewdt.o M_OBJS += acquirewdt.o
...@@ -249,7 +249,7 @@ else ...@@ -249,7 +249,7 @@ else
endif endif
ifeq ($(CONFIG_AMIGAMOUSE),y) ifeq ($(CONFIG_AMIGAMOUSE),y)
L_OBJS += amigamouse.o O_OBJS += amigamouse.o
else else
ifeq ($(CONFIG_AMIGAMOUSE),m) ifeq ($(CONFIG_AMIGAMOUSE),m)
M_OBJS += amigamouse.o M_OBJS += amigamouse.o
...@@ -257,7 +257,7 @@ else ...@@ -257,7 +257,7 @@ else
endif endif
ifeq ($(CONFIG_ATARIMOUSE),y) ifeq ($(CONFIG_ATARIMOUSE),y)
L_OBJS += atarimouse.o O_OBJS += atarimouse.o
else else
ifeq ($(CONFIG_ATARIMOUSE),m) ifeq ($(CONFIG_ATARIMOUSE),m)
M_OBJS += atarimouse.o M_OBJS += atarimouse.o
...@@ -265,7 +265,7 @@ else ...@@ -265,7 +265,7 @@ else
endif endif
ifeq ($(CONFIG_ADBMOUSE),y) ifeq ($(CONFIG_ADBMOUSE),y)
L_OBJS += adbmouse.o O_OBJS += adbmouse.o
else else
ifeq ($(CONFIG_ADBMOUSE),m) ifeq ($(CONFIG_ADBMOUSE),m)
M_OBJS += adbmouse.o M_OBJS += adbmouse.o
...@@ -273,7 +273,7 @@ else ...@@ -273,7 +273,7 @@ else
endif endif
ifeq ($(CONFIG_PC110_PAD),y) ifeq ($(CONFIG_PC110_PAD),y)
L_OBJS += pc110pad.o O_OBJS += pc110pad.o
else else
ifeq ($(CONFIG_PC110_PAD),m) ifeq ($(CONFIG_PC110_PAD),m)
M_OBJS += pc110pad.o M_OBJS += pc110pad.o
...@@ -281,7 +281,7 @@ else ...@@ -281,7 +281,7 @@ else
endif endif
ifeq ($(CONFIG_WDT),y) ifeq ($(CONFIG_WDT),y)
L_OBJS += wdt.o O_OBJS += wdt.o
else else
ifeq ($(CONFIG_WDT),m) ifeq ($(CONFIG_WDT),m)
M_OBJS += wdt.o M_OBJS += wdt.o
...@@ -289,12 +289,12 @@ else ...@@ -289,12 +289,12 @@ else
endif endif
ifeq ($(CONFIG_RTC),y) ifeq ($(CONFIG_RTC),y)
L_OBJS += rtc.o O_OBJS += rtc.o
endif endif
ifeq ($(CONFIG_NVRAM),y) ifeq ($(CONFIG_NVRAM),y)
ifeq ($(CONFIG_PPC),) ifeq ($(CONFIG_PPC),)
L_OBJS += nvram.o O_OBJS += nvram.o
endif endif
else else
ifeq ($(CONFIG_NVRAM),m) ifeq ($(CONFIG_NVRAM),m)
...@@ -305,7 +305,7 @@ else ...@@ -305,7 +305,7 @@ else
endif endif
ifeq ($(CONFIG_VIDEO_DEV),y) ifeq ($(CONFIG_VIDEO_DEV),y)
LX_OBJS += videodev.o OX_OBJS += videodev.o
else else
ifeq ($(CONFIG_VIDEO_DEV),m) ifeq ($(CONFIG_VIDEO_DEV),m)
MX_OBJS += videodev.o MX_OBJS += videodev.o
...@@ -321,7 +321,7 @@ else ...@@ -321,7 +321,7 @@ else
endif endif
ifeq ($(CONFIG_VIDEO_BT848),y) ifeq ($(CONFIG_VIDEO_BT848),y)
L_OBJS += bttv.o msp3400.o tuner.o O_OBJS += bttv.o msp3400.o tuner.o
L_I2C=y L_I2C=y
else else
ifeq ($(CONFIG_VIDEO_BT848),m) ifeq ($(CONFIG_VIDEO_BT848),m)
...@@ -331,7 +331,7 @@ else ...@@ -331,7 +331,7 @@ else
endif endif
ifeq ($(CONFIG_VIDEO_SAA5249),y) ifeq ($(CONFIG_VIDEO_SAA5249),y)
L_OBJS += saa5249.o O_OBJS += saa5249.o
L_I2C=y L_I2C=y
else else
ifeq ($(CONFIG_VIDEO_SAA5249),m) ifeq ($(CONFIG_VIDEO_SAA5249),m)
...@@ -341,7 +341,7 @@ else ...@@ -341,7 +341,7 @@ else
endif endif
ifeq ($(CONFIG_I2C_PARPORT),y) ifeq ($(CONFIG_I2C_PARPORT),y)
L_OBJS += i2c-parport.o O_OBJS += i2c-parport.o
L_I2C = y L_I2C = y
else else
ifeq ($(CONFIG_I2C_PARPORT),m) ifeq ($(CONFIG_I2C_PARPORT),m)
...@@ -351,7 +351,7 @@ else ...@@ -351,7 +351,7 @@ else
endif endif
ifeq ($(CONFIG_VIDEO_BWQCAM),y) ifeq ($(CONFIG_VIDEO_BWQCAM),y)
L_OBJS += bw-qcam.o O_OBJS += bw-qcam.o
else else
ifeq ($(CONFIG_VIDEO_BWQCAM),m) ifeq ($(CONFIG_VIDEO_BWQCAM),m)
M_OBJS += bw-qcam.o M_OBJS += bw-qcam.o
...@@ -359,7 +359,7 @@ else ...@@ -359,7 +359,7 @@ else
endif endif
ifeq ($(CONFIG_VIDEO_CQCAM),y) ifeq ($(CONFIG_VIDEO_CQCAM),y)
L_OBJS += c-qcam.o O_OBJS += c-qcam.o
else else
ifeq ($(CONFIG_VIDEO_CQCAM),m) ifeq ($(CONFIG_VIDEO_CQCAM),m)
M_OBJS += c-qcam.o M_OBJS += c-qcam.o
...@@ -367,7 +367,7 @@ else ...@@ -367,7 +367,7 @@ else
endif endif
ifeq ($(CONFIG_VIDEO_ZORAN),y) ifeq ($(CONFIG_VIDEO_ZORAN),y)
L_OBJS += buz.o O_OBJS += buz.o
else else
ifeq ($(CONFIG_VIDEO_LML33),m) ifeq ($(CONFIG_VIDEO_LML33),m)
M_OBJS += buz.o M_OBJS += buz.o
...@@ -375,7 +375,7 @@ else ...@@ -375,7 +375,7 @@ else
endif endif
ifeq ($(CONFIG_VIDEO_LML33),y) ifeq ($(CONFIG_VIDEO_LML33),y)
L_OBJS += bt856.o bt819.o O_OBJS += bt856.o bt819.o
else else
ifeq ($(CONFIG_VIDEO_LML33),m) ifeq ($(CONFIG_VIDEO_LML33),m)
M_OBJS += bt856.o bt819.o M_OBJS += bt856.o bt819.o
...@@ -383,7 +383,7 @@ else ...@@ -383,7 +383,7 @@ else
endif endif
ifeq ($(CONFIG_VIDEO_BUZ),y) ifeq ($(CONFIG_VIDEO_BUZ),y)
L_OBJS += saa7111.o saa7185.o O_OBJS += saa7111.o saa7185.o
else else
ifeq ($(CONFIG_VIDEO_BUZ),m) ifeq ($(CONFIG_VIDEO_BUZ),m)
M_OBJS += saa7111.o saa7185.o M_OBJS += saa7111.o saa7185.o
...@@ -391,7 +391,7 @@ else ...@@ -391,7 +391,7 @@ else
endif endif
ifeq ($(CONFIG_VIDEO_PMS),y) ifeq ($(CONFIG_VIDEO_PMS),y)
L_OBJS += pms.o O_OBJS += pms.o
else else
ifeq ($(CONFIG_VIDEO_PMS),m) ifeq ($(CONFIG_VIDEO_PMS),m)
M_OBJS += pms.o M_OBJS += pms.o
...@@ -399,7 +399,7 @@ else ...@@ -399,7 +399,7 @@ else
endif endif
ifeq ($(CONFIG_VIDEO_PLANB),y) ifeq ($(CONFIG_VIDEO_PLANB),y)
L_OBJS += planb.o O_OBJS += planb.o
else else
ifeq ($(CONFIG_VIDEO_PLANB),m) ifeq ($(CONFIG_VIDEO_PLANB),m)
M_OBJS += planb.o M_OBJS += planb.o
...@@ -407,7 +407,7 @@ else ...@@ -407,7 +407,7 @@ else
endif endif
ifeq ($(CONFIG_VIDEO_VINO),y) ifeq ($(CONFIG_VIDEO_VINO),y)
L_OBJS += vino.o O_OBJS += vino.o
else else
ifeq ($(CONFIG_VIDEO_VINO),m) ifeq ($(CONFIG_VIDEO_VINO),m)
M_OBJS += vino.o M_OBJS += vino.o
...@@ -415,7 +415,7 @@ else ...@@ -415,7 +415,7 @@ else
endif endif
ifeq ($(CONFIG_RADIO_AZTECH),y) ifeq ($(CONFIG_RADIO_AZTECH),y)
L_OBJS += radio-aztech.o O_OBJS += radio-aztech.o
else else
ifeq ($(CONFIG_RADIO_AZTECH),m) ifeq ($(CONFIG_RADIO_AZTECH),m)
M_OBJS += radio-aztech.o M_OBJS += radio-aztech.o
...@@ -423,7 +423,7 @@ else ...@@ -423,7 +423,7 @@ else
endif endif
ifeq ($(CONFIG_RADIO_SF16FMI),y) ifeq ($(CONFIG_RADIO_SF16FMI),y)
L_OBJS += radio-sf16fmi.o O_OBJS += radio-sf16fmi.o
else else
ifeq ($(CONFIG_RADIO_SF16FMI),m) ifeq ($(CONFIG_RADIO_SF16FMI),m)
M_OBJS += radio-sf16fmi.o M_OBJS += radio-sf16fmi.o
...@@ -431,7 +431,7 @@ else ...@@ -431,7 +431,7 @@ else
endif endif
ifeq ($(CONFIG_RADIO_RTRACK),y) ifeq ($(CONFIG_RADIO_RTRACK),y)
L_OBJS += radio-aimslab.o O_OBJS += radio-aimslab.o
else else
ifeq ($(CONFIG_RADIO_RTRACK),m) ifeq ($(CONFIG_RADIO_RTRACK),m)
M_OBJS += radio-aimslab.o M_OBJS += radio-aimslab.o
...@@ -439,7 +439,7 @@ else ...@@ -439,7 +439,7 @@ else
endif endif
ifeq ($(CONFIG_RADIO_RTRACK2),y) ifeq ($(CONFIG_RADIO_RTRACK2),y)
L_OBJS += radio-rtrack2.o O_OBJS += radio-rtrack2.o
else else
ifeq ($(CONFIG_RADIO_RTRACK2),m) ifeq ($(CONFIG_RADIO_RTRACK2),m)
M_OBJS += radio-rtrack2.o M_OBJS += radio-rtrack2.o
...@@ -447,7 +447,7 @@ else ...@@ -447,7 +447,7 @@ else
endif endif
ifeq ($(CONFIG_RADIO_TYPHOON),y) ifeq ($(CONFIG_RADIO_TYPHOON),y)
L_OBJS += radio-typhoon.o O_OBJS += radio-typhoon.o
else else
ifeq ($(CONFIG_RADIO_TYPHOON),m) ifeq ($(CONFIG_RADIO_TYPHOON),m)
M_OBJS += radio-typhoon.o M_OBJS += radio-typhoon.o
...@@ -455,7 +455,7 @@ else ...@@ -455,7 +455,7 @@ else
endif endif
ifeq ($(CONFIG_RADIO_ZOLTRIX),y) ifeq ($(CONFIG_RADIO_ZOLTRIX),y)
L_OBJS += radio-zoltrix.o O_OBJS += radio-zoltrix.o
else else
ifeq ($(CONFIG_RADIO_ZOLTRIX),m) ifeq ($(CONFIG_RADIO_ZOLTRIX),m)
M_OBJS += radio-zoltrix.o M_OBJS += radio-zoltrix.o
...@@ -463,7 +463,7 @@ else ...@@ -463,7 +463,7 @@ else
endif endif
ifeq ($(CONFIG_RADIO_CADET),y) ifeq ($(CONFIG_RADIO_CADET),y)
L_OBJS += radio-cadet.o O_OBJS += radio-cadet.o
else else
ifeq ($(CONFIG_RADIO_CADET),m) ifeq ($(CONFIG_RADIO_CADET),m)
M_OBJS += radio-cadet.o M_OBJS += radio-cadet.o
...@@ -471,7 +471,7 @@ else ...@@ -471,7 +471,7 @@ else
endif endif
ifeq ($(CONFIG_RADIO_MIROPCM20),y) ifeq ($(CONFIG_RADIO_MIROPCM20),y)
L_OBJS += radio-miropcm20.o O_OBJS += radio-miropcm20.o
else else
ifeq ($(CONFIG_RADIO_MIROPCM20),m) ifeq ($(CONFIG_RADIO_MIROPCM20),m)
M_OBJS += radio-miropcm20.o M_OBJS += radio-miropcm20.o
...@@ -479,7 +479,7 @@ else ...@@ -479,7 +479,7 @@ else
endif endif
ifeq ($(CONFIG_RADIO_GEMTEK),y) ifeq ($(CONFIG_RADIO_GEMTEK),y)
L_OBJS += radio-gemtek.o O_OBJS += radio-gemtek.o
else else
ifeq ($(CONFIG_RADIO_GEMTEK),m) ifeq ($(CONFIG_RADIO_GEMTEK),m)
M_OBJS += radio-gemtek.o M_OBJS += radio-gemtek.o
...@@ -487,7 +487,7 @@ else ...@@ -487,7 +487,7 @@ else
endif endif
ifeq ($(CONFIG_RADIO_TERRATEC),y) ifeq ($(CONFIG_RADIO_TERRATEC),y)
L_OBJS += radio-terratec.o O_OBJS += radio-terratec.o
else else
ifeq ($(CONFIG_RADIO_TERRATEC),m) ifeq ($(CONFIG_RADIO_TERRATEC),m)
M_OBJS += radio-terratec.o M_OBJS += radio-terratec.o
...@@ -495,7 +495,7 @@ else ...@@ -495,7 +495,7 @@ else
endif endif
ifeq ($(CONFIG_QIC02_TAPE),y) ifeq ($(CONFIG_QIC02_TAPE),y)
L_OBJS += tpqic02.o O_OBJS += tpqic02.o
else else
ifeq ($(CONFIG_QIC02_TAPE),m) ifeq ($(CONFIG_QIC02_TAPE),m)
M_OBJS += tpqic02.o M_OBJS += tpqic02.o
...@@ -503,7 +503,7 @@ else ...@@ -503,7 +503,7 @@ else
endif endif
ifeq ($(CONFIG_FTAPE),y) ifeq ($(CONFIG_FTAPE),y)
L_OBJS += ftape/ftape.o O_OBJS += ftape/ftape.o
SUB_DIRS += ftape SUB_DIRS += ftape
ifneq ($(CONFIG_ZFTAPE),n) ifneq ($(CONFIG_ZFTAPE),n)
MOD_SUB_DIRS += ftape MOD_SUB_DIRS += ftape
...@@ -515,11 +515,11 @@ else ...@@ -515,11 +515,11 @@ else
endif endif
ifdef CONFIG_H8 ifdef CONFIG_H8
LX_OBJS += h8.o OX_OBJS += h8.o
endif endif
ifeq ($(CONFIG_PPDEV),y) ifeq ($(CONFIG_PPDEV),y)
L_OBJS += ppdev.o O_OBJS += ppdev.o
else else
ifeq ($(CONFIG_PPDEV),m) ifeq ($(CONFIG_PPDEV),m)
M_OBJS += ppdev.o M_OBJS += ppdev.o
...@@ -527,7 +527,7 @@ else ...@@ -527,7 +527,7 @@ else
endif endif
ifeq ($(L_I2C),y) ifeq ($(L_I2C),y)
LX_OBJS += i2c.o OX_OBJS += i2c.o
else else
ifeq ($(M_I2C),y) ifeq ($(M_I2C),y)
MX_OBJS += i2c.o MX_OBJS += i2c.o
...@@ -538,7 +538,7 @@ endif ...@@ -538,7 +538,7 @@ endif
ifeq ($(CONFIG_HFMODEM),y) ifeq ($(CONFIG_HFMODEM),y)
ALL_SUB_DIRS += hfmodem ALL_SUB_DIRS += hfmodem
SUB_DIRS += hfmodem SUB_DIRS += hfmodem
L_OBJS += hfmodem/hfmodem.o O_OBJS += hfmodem/hfmodem.o
else else
ifeq ($(CONFIG_HFMODEM),m) ifeq ($(CONFIG_HFMODEM),m)
ALL_SUB_DIRS += hfmodem ALL_SUB_DIRS += hfmodem
......
...@@ -151,16 +151,11 @@ __initfunc(int ms_bus_mouse_init(void)) ...@@ -151,16 +151,11 @@ __initfunc(int ms_bus_mouse_init(void))
return msedev < 0 ? msedev : 0; return msedev < 0 ? msedev : 0;
} }
#ifdef MODULE void ms_bus_mouse_exit(void)
int init_module(void)
{
return ms_bus_mouse_init();
}
void cleanup_module(void)
{ {
unregister_busmouse(msedev); unregister_busmouse(msedev);
release_region(MS_MSE_CONTROL_PORT, 0x04); release_region(MS_MSE_CONTROL_PORT, 0x04);
} }
#endif
module_init(ms_bus_mouse_init)
module_exit(ms_bus_mouse_exit)
...@@ -101,6 +101,8 @@ ...@@ -101,6 +101,8 @@
* 15.06.99 0.23 Fix bad allocation bug. * 15.06.99 0.23 Fix bad allocation bug.
* Thanks to Deti Fliegl <fliegl@in.tum.de> * Thanks to Deti Fliegl <fliegl@in.tum.de>
* 28.06.99 0.24 Add pci_set_master * 28.06.99 0.24 Add pci_set_master
* 02.08.99 0.25 Added workaround for the "phantom write" bug first
* documented by Dave Sharpless from Anchor Games
* *
* some important things missing in Ensoniq documentation: * some important things missing in Ensoniq documentation:
* *
...@@ -175,12 +177,14 @@ ...@@ -175,12 +177,14 @@
#define ES1370_REG_DAC2_SCOUNT 0x28 #define ES1370_REG_DAC2_SCOUNT 0x28
#define ES1370_REG_ADC_SCOUNT 0x2c #define ES1370_REG_ADC_SCOUNT 0x2c
#define ES1370_REG_DAC1_FRAMEADR 0xc30 #define ES1370_REG_DAC1_FRAMEADR 0xc30
#define ES1370_REG_DAC1_FRAMECNT 0xc34 #define ES1370_REG_DAC1_FRAMECNT 0xc34
#define ES1370_REG_DAC2_FRAMEADR 0xc38 #define ES1370_REG_DAC2_FRAMEADR 0xc38
#define ES1370_REG_DAC2_FRAMECNT 0xc3c #define ES1370_REG_DAC2_FRAMECNT 0xc3c
#define ES1370_REG_ADC_FRAMEADR 0xd30 #define ES1370_REG_ADC_FRAMEADR 0xd30
#define ES1370_REG_ADC_FRAMECNT 0xd34 #define ES1370_REG_ADC_FRAMECNT 0xd34
#define ES1370_REG_PHANTOM_FRAMEADR 0xd38
#define ES1370_REG_PHANTOM_FRAMECNT 0xd3c
#define ES1370_FMT_U8_MONO 0 #define ES1370_FMT_U8_MONO 0
#define ES1370_FMT_U8_STEREO 1 #define ES1370_FMT_U8_STEREO 1
...@@ -360,6 +364,13 @@ struct es1370_state { ...@@ -360,6 +364,13 @@ struct es1370_state {
static struct es1370_state *devs = NULL; static struct es1370_state *devs = NULL;
/*
* The following buffer is used to point the phantom write channel to,
* so that it cannot wreak havoc. The attribute makes sure it doesn't
* cross a page boundary and ensures dword alignment for the DMA engine
*/
static unsigned char bugbuf[16] __attribute__ ((aligned (16)));
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
extern inline unsigned ld2(unsigned int x) extern inline unsigned ld2(unsigned int x)
...@@ -2321,7 +2332,7 @@ int __init init_es1370(void) ...@@ -2321,7 +2332,7 @@ int __init init_es1370(void)
if (!pci_present()) /* No PCI bus in this machine! */ if (!pci_present()) /* No PCI bus in this machine! */
return -ENODEV; return -ENODEV;
printk(KERN_INFO "es1370: version v0.24 time " __TIME__ " " __DATE__ "\n"); printk(KERN_INFO "es1370: version v0.25 time " __TIME__ " " __DATE__ "\n");
while (index < NR_DEVICE && while (index < NR_DEVICE &&
(pcidev = pci_find_device(PCI_VENDOR_ID_ENSONIQ, PCI_DEVICE_ID_ENSONIQ_ES1370, pcidev))) { (pcidev = pci_find_device(PCI_VENDOR_ID_ENSONIQ, PCI_DEVICE_ID_ENSONIQ_ES1370, pcidev))) {
if (pcidev->base_address[0] == 0 || if (pcidev->base_address[0] == 0 ||
...@@ -2385,6 +2396,10 @@ int __init init_es1370(void) ...@@ -2385,6 +2396,10 @@ int __init init_es1370(void)
/* initialize the chips */ /* initialize the chips */
outl(s->ctrl, s->io+ES1370_REG_CONTROL); outl(s->ctrl, s->io+ES1370_REG_CONTROL);
outl(s->sctrl, s->io+ES1370_REG_SERIAL_CONTROL); outl(s->sctrl, s->io+ES1370_REG_SERIAL_CONTROL);
/* point phantom write channel to "bugbuf" */
outl((ES1370_REG_PHANTOM_FRAMEADR >> 8) & 15, s->io+ES1370_REG_MEMPAGE);
outl(virt_to_bus(bugbuf), s->io+(ES1370_REG_PHANTOM_FRAMEADR & 0xff));
outl(0, s->io+(ES1370_REG_PHANTOM_FRAMECNT & 0xff));
pci_set_master(pcidev); /* enable bus mastering */ pci_set_master(pcidev); /* enable bus mastering */
wrcodec(s, 0x16, 3); /* no RST, PD */ wrcodec(s, 0x16, 3); /* no RST, PD */
wrcodec(s, 0x17, 0); /* CODEC ADC and CODEC DAC use {LR,B}CLK2 and run off the LRCLK2 PLL; program DAC_SYNC=0!! */ wrcodec(s, 0x17, 0); /* CODEC ADC and CODEC DAC use {LR,B}CLK2 and run off the LRCLK2 PLL; program DAC_SYNC=0!! */
......
...@@ -36,13 +36,7 @@ static int aout_core_dump(long signr, struct pt_regs * regs, struct file *file); ...@@ -36,13 +36,7 @@ static int aout_core_dump(long signr, struct pt_regs * regs, struct file *file);
extern void dump_thread(struct pt_regs *, struct user *); extern void dump_thread(struct pt_regs *, struct user *);
static struct linux_binfmt aout_format = { static struct linux_binfmt aout_format = {
NULL, NULL, THIS_MODULE, load_aout_binary, load_aout_library, aout_core_dump, PAGE_SIZE
#ifndef MODULE
NULL,
#else
&__this_module,
#endif
load_aout_binary, load_aout_library, aout_core_dump, PAGE_SIZE
}; };
static void set_brk(unsigned long start, unsigned long end) static void set_brk(unsigned long start, unsigned long end)
...@@ -564,14 +558,10 @@ static int __init init_aout_binfmt(void) ...@@ -564,14 +558,10 @@ static int __init init_aout_binfmt(void)
return register_binfmt(&aout_format); return register_binfmt(&aout_format);
} }
__initcall(init_aout_binfmt); static void __exit exit_aout_binfmt(void)
{
#ifdef MODULE
int init_module(void) {
return init_aout_binfmt();
}
void cleanup_module( void) {
unregister_binfmt(&aout_format); unregister_binfmt(&aout_format);
} }
#endif
module_init(init_aout_binfmt)
module_exit(exit_aout_binfmt)
...@@ -64,13 +64,7 @@ static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file); ...@@ -64,13 +64,7 @@ static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file);
#define ELF_PAGEALIGN(_v) (((_v) + ELF_EXEC_PAGESIZE - 1) & ~(ELF_EXEC_PAGESIZE - 1)) #define ELF_PAGEALIGN(_v) (((_v) + ELF_EXEC_PAGESIZE - 1) & ~(ELF_EXEC_PAGESIZE - 1))
static struct linux_binfmt elf_format = { static struct linux_binfmt elf_format = {
NULL, NULL, THIS_MODULE, load_elf_binary, load_elf_library, elf_core_dump, ELF_EXEC_PAGESIZE
#ifndef MODULE
NULL,
#else
&__this_module,
#endif
load_elf_binary, load_elf_library, elf_core_dump, ELF_EXEC_PAGESIZE
}; };
static void set_brk(unsigned long start, unsigned long end) static void set_brk(unsigned long start, unsigned long end)
...@@ -1301,23 +1295,11 @@ static int __init init_elf_binfmt(void) ...@@ -1301,23 +1295,11 @@ static int __init init_elf_binfmt(void)
return register_binfmt(&elf_format); return register_binfmt(&elf_format);
} }
__initcall(init_elf_binfmt); static void __exit exit_elf_binfmt(void)
#ifdef MODULE
int init_module(void)
{
/* Install the COFF, ELF and XOUT loaders.
* N.B. We *rely* on the table being the right size with the
* right number of free slots...
*/
return init_elf_binfmt();
}
void cleanup_module( void)
{ {
/* Remove the COFF and ELF loaders. */ /* Remove the COFF and ELF loaders. */
unregister_binfmt(&elf_format); unregister_binfmt(&elf_format);
} }
#endif
module_init(init_elf_binfmt)
module_exit(exit_elf_binfmt)
...@@ -105,13 +105,7 @@ static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs) ...@@ -105,13 +105,7 @@ static int load_em86(struct linux_binprm *bprm,struct pt_regs *regs)
} }
struct linux_binfmt em86_format = { struct linux_binfmt em86_format = {
NULL, NULL, THIS_MODULE, load_em86, NULL, NULL, 0
#ifndef MODULE
NULL,
#else
&__this_module,
#endif
load_em86, NULL, NULL, 0
}; };
static int __init init_em86_binfmt(void) static int __init init_em86_binfmt(void)
...@@ -119,15 +113,10 @@ static int __init init_em86_binfmt(void) ...@@ -119,15 +113,10 @@ static int __init init_em86_binfmt(void)
return register_binfmt(&em86_format); return register_binfmt(&em86_format);
} }
__initcall(init_em86_binfmt); static void __exit exit_em86_binfmt(void)
#ifdef MODULE
int init_module(void)
{ {
return init_em86_binfmt();
}
void cleanup_module( void) {
unregister_binfmt(&em86_format); unregister_binfmt(&em86_format);
} }
#endif
module_init(init_em86_binfmt)
module_exit(exit_em86_binfmt)
...@@ -64,13 +64,7 @@ static void entry_proc_cleanup(struct binfmt_entry *e); ...@@ -64,13 +64,7 @@ static void entry_proc_cleanup(struct binfmt_entry *e);
static int entry_proc_setup(struct binfmt_entry *e); static int entry_proc_setup(struct binfmt_entry *e);
static struct linux_binfmt misc_format = { static struct linux_binfmt misc_format = {
NULL, NULL, THIS_MODULE, load_misc_binary, NULL, NULL, 0
#ifndef MODULE
NULL,
#else
&__this_module,
#endif
load_misc_binary, NULL, NULL, 0
}; };
static struct proc_dir_entry *bm_dir = NULL; static struct proc_dir_entry *bm_dir = NULL;
...@@ -530,16 +524,7 @@ static int __init init_misc_binfmt(void) ...@@ -530,16 +524,7 @@ static int __init init_misc_binfmt(void)
goto out; goto out;
} }
__initcall(init_misc_binfmt); static void __exit exit_misc_binfmt(void)
#ifdef MODULE
EXPORT_NO_SYMBOLS;
int init_module(void)
{
return init_misc_binfmt();
}
void cleanup_module(void)
{ {
unregister_binfmt(&misc_format); unregister_binfmt(&misc_format);
remove_proc_entry("register", bm_dir); remove_proc_entry("register", bm_dir);
...@@ -547,5 +532,8 @@ void cleanup_module(void) ...@@ -547,5 +532,8 @@ void cleanup_module(void)
clear_entries(); clear_entries();
remove_proc_entry("sys/fs/binfmt_misc", NULL); remove_proc_entry("sys/fs/binfmt_misc", NULL);
} }
#endif
#undef VERBOSE_STATUS EXPORT_NO_SYMBOLS;
module_init(init_misc_binfmt)
module_exit(exit_misc_binfmt)
...@@ -101,13 +101,7 @@ static int load_script(struct linux_binprm *bprm,struct pt_regs *regs) ...@@ -101,13 +101,7 @@ static int load_script(struct linux_binprm *bprm,struct pt_regs *regs)
} }
struct linux_binfmt script_format = { struct linux_binfmt script_format = {
NULL, NULL, THIS_MODULE, load_script, NULL, NULL, 0
#ifndef MODULE
NULL,
#else
&__this_module,
#endif
load_script, NULL, NULL, 0
}; };
static int __init init_script_binfmt(void) static int __init init_script_binfmt(void)
...@@ -115,15 +109,10 @@ static int __init init_script_binfmt(void) ...@@ -115,15 +109,10 @@ static int __init init_script_binfmt(void)
return register_binfmt(&script_format); return register_binfmt(&script_format);
} }
__initcall(init_script_binfmt); static void __exit exit_script_binfmt(void)
#ifdef MODULE
int init_module(void)
{ {
return init_script_binfmt();
}
void cleanup_module( void) {
unregister_binfmt(&script_format); unregister_binfmt(&script_format);
} }
#endif
module_init(init_script_binfmt)
module_exit(exit_script_binfmt)
...@@ -2319,3 +2319,12 @@ int bdflush(void * unused) ...@@ -2319,3 +2319,12 @@ int bdflush(void * unused)
} }
} }
} }
static int __init bdflush_init(void)
{
kernel_thread(bdflush, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
return 0;
}
module_init(bdflush_init)
#ifndef _I386_INIT_H #error "<asm/init.h> should never be used - use <linux/init.h> instead"
#define _I386_INIT_H
typedef int (*initcall_t)(void);
extern initcall_t __initcall_start, __initcall_end;
struct kernel_param {
const char *str;
int (*setup_func)(char *);
};
extern struct kernel_param __setup_start, __setup_end;
/* Used for initialization calls.. */
#define __initcall(fn) \
static __attribute__ ((unused,__section__ (".initcall.init"))) initcall_t __initcall_##fn = fn
/* Used for kernel command line parameter setup */
#define __setup(str, fn) \
static __attribute__ ((unused,__section__ (".setup.init"))) struct kernel_param __setup_##fn = { str, fn }
#define __init __attribute__ ((__section__ (".text.init")))
#define __initdata __attribute__ ((__section__ (".data.init")))
#define __initfunc(__arginit) \
__arginit __init; \
__arginit
/* For assembly routines */
#define __INIT .section ".text.init",#alloc,#execinstr
#define __FINIT .previous
#define __INITDATA .section ".data.init",#alloc,#write
#define __cacheline_aligned __attribute__ \
((__section__ (".data.cacheline_aligned")))
#endif
...@@ -48,15 +48,74 @@ ...@@ -48,15 +48,74 @@
*/ */
#ifndef MODULE #ifndef MODULE
#include <asm/init.h>
/*
* Used for initialization calls..
*/
typedef int (*initcall_t)(void);
extern initcall_t __initcall_start, __initcall_end;
#define __initcall(fn) \
static __attribute__ ((unused,__section__ (".initcall.init"))) \
initcall_t __initcall_##fn = fn
/*
* Used for kernel command line parameter setup
*/
struct kernel_param {
const char *str;
int (*setup_func)(char *);
};
extern struct kernel_param __setup_start, __setup_end;
#define __setup(str, fn) \
static __attribute__ ((__section__ (".data.init"))) \
char __setup_str_##fn[] = str; \
static __attribute__ ((unused,__section__ (".setup.init"))) \
struct kernel_param __setup_##fn = { __setup_str_##fn, fn }
/*
* Mark functions and data as being only used at initialization
* or exit time.
*/
#define __init __attribute__ ((__section__ (".text.init")))
#define __exit __attribute__ ((unused, __section__(".text.init")))
#define __initdata __attribute__ ((__section__ (".data.init")))
#define __exitdata __attribute__ ((unused, __section__ (".data.init")))
#define __initfunc(__arginit) \
__arginit __init; \
__arginit
/* For assembly routines */
#define __INIT .section ".text.init","ax"
#define __FINIT .previous
#define __INITDATA .section ".data.init","aw"
#define __cacheline_aligned __attribute__ \
((__section__ (".data.cacheline_aligned")))
#define module_init(x) __initcall(x);
#define module_exit(x) /* nothing */
#else #else
#define __init #define __init
#define __exit
#define __initdata #define __initdata
#define __exitdata
#define __initfunc(__arginit) __arginit #define __initfunc(__arginit) __arginit
#defint __initcall
/* For assembly routines */ /* For assembly routines */
#define __INIT #define __INIT
#define __FINIT #define __FINIT
#define __INITDATA #define __INITDATA
#define module_init(x) int init_module(void) { return x(); }
#define module_exit(x) void cleanup_module(void) { x(); }
#endif #endif
#if __GNUC__ >= 2 && __GNUC_MINOR__ >= 8 #if __GNUC__ >= 2 && __GNUC_MINOR__ >= 8
......
...@@ -191,9 +191,10 @@ __asm__(".section .modinfo\n\t.previous"); ...@@ -191,9 +191,10 @@ __asm__(".section .modinfo\n\t.previous");
/* Define the module variable, and usage macros. */ /* Define the module variable, and usage macros. */
extern struct module __this_module; extern struct module __this_module;
#define MOD_INC_USE_COUNT __MOD_INC_USE_COUNT(&__this_module) #define THIS_MODULE (&__this_module)
#define MOD_DEC_USE_COUNT __MOD_DEC_USE_COUNT(&__this_module) #define MOD_INC_USE_COUNT __MOD_INC_USE_COUNT(THIS_MODULE)
#define MOD_IN_USE __MOD_IN_USE(&__this_module) #define MOD_DEC_USE_COUNT __MOD_DEC_USE_COUNT(THIS_MODULE)
#define MOD_IN_USE __MOD_IN_USE(THIS_MODULE)
#ifndef __NO_VERSION__ #ifndef __NO_VERSION__
#include <linux/version.h> #include <linux/version.h>
...@@ -215,6 +216,7 @@ const char __module_using_checksums[] __attribute__((section(".modinfo"))) = ...@@ -215,6 +216,7 @@ const char __module_using_checksums[] __attribute__((section(".modinfo"))) =
#ifndef __GENKSYMS__ #ifndef __GENKSYMS__
#define THIS_MODULE NULL
#define MOD_INC_USE_COUNT do { } while (0) #define MOD_INC_USE_COUNT do { } while (0)
#define MOD_DEC_USE_COUNT do { } while (0) #define MOD_DEC_USE_COUNT do { } while (0)
#define MOD_IN_USE 1 #define MOD_IN_USE 1
......
...@@ -68,9 +68,6 @@ extern char *linux_banner; ...@@ -68,9 +68,6 @@ extern char *linux_banner;
extern int console_loglevel; extern int console_loglevel;
static int init(void *); static int init(void *);
extern int bdflush(void *);
extern int kswapd(void *);
extern void kswapd_setup(void);
extern void init_IRQ(void); extern void init_IRQ(void);
extern void init_modules(void); extern void init_modules(void);
...@@ -606,29 +603,12 @@ static void __init do_basic_setup(void) ...@@ -606,29 +603,12 @@ static void __init do_basic_setup(void)
#ifdef CONFIG_MAC #ifdef CONFIG_MAC
nubus_init(); nubus_init();
#endif #endif
#ifdef CONFIG_APM
apm_init();
#endif
/* Networking initialization needs a process context */ /* Networking initialization needs a process context */
sock_init(); sock_init();
do_initcalls(); do_initcalls();
/* Launch bdflush from here, instead of the old syscall way. */
kernel_thread(bdflush, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
/* Start the background pageout daemon. */
kswapd_setup();
kernel_thread(kswapd, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
#if CONFIG_AP1000
/* Start the async paging daemon. */
{
extern int asyncd(void *);
kernel_thread(asyncd, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
}
#endif
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
real_root_dev = ROOT_DEV; real_root_dev = ROOT_DEV;
......
...@@ -437,27 +437,6 @@ static int do_try_to_free_pages(unsigned int gfp_mask) ...@@ -437,27 +437,6 @@ static int do_try_to_free_pages(unsigned int gfp_mask)
return priority >= 0; return priority >= 0;
} }
/*
* Before we start the kernel thread, print out the
* kswapd initialization message (otherwise the init message
* may be printed in the middle of another driver's init
* message). It looks very bad when that happens.
*/
void __init kswapd_setup(void)
{
int i;
char *revision="$Revision: 1.5 $", *s, *e;
swap_setup();
if ((s = strchr(revision, ':')) &&
(e = strchr(s, '$')))
s++, i = e - s;
else
s = revision, i = -1;
printk ("Starting kswapd v%.*s\n", i, s);
}
static struct task_struct *kswapd_process; static struct task_struct *kswapd_process;
/* /*
...@@ -544,4 +523,13 @@ int try_to_free_pages(unsigned int gfp_mask) ...@@ -544,4 +523,13 @@ int try_to_free_pages(unsigned int gfp_mask)
retval = do_try_to_free_pages(gfp_mask); retval = do_try_to_free_pages(gfp_mask);
return retval; return retval;
} }
static int __init kswapd_init(void)
{
printk("Starting kswapd v1.6\n");
swap_setup();
kernel_thread(kswapd, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
return 0;
}
module_init(kswapd_init)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment