Commit 90b9165f authored by Linus Torvalds's avatar Linus Torvalds

2.1.122pre1

This may or may not fix the APM problems, and the INITRD ones.  The
INITRD one in particular was a case of a fairly inexplicable test that
shouldn't have been there in the first place breaking when something
completely unrelated was cleaned up..

The APM breakage was simply due to it being in the wrong place.  The
patch looks bigger than it really is - it really only moves the file to
the proper directory, and makes sure that it should compile with the
standard assembler..

                Linus
parent b1173ae3
VERSION = 2
PATCHLEVEL = 1
SUBLEVEL = 121
SUBLEVEL = 122
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
......
......@@ -64,6 +64,16 @@ if [ "$CONFIG_PARPORT" != "n" ]; then
fi
fi
bool 'Advanced Power Management BIOS support' CONFIG_APM
if [ "$CONFIG_APM" = "y" ]; then
bool ' Ignore USER SUSPEND' CONFIG_APM_IGNORE_USER_SUSPEND
bool ' Enable PM at boot time' CONFIG_APM_DO_ENABLE
bool ' Make CPU Idle calls when idle' CONFIG_APM_CPU_IDLE
bool ' Enable console blanking using APM' CONFIG_APM_DISPLAY_BLANK
bool ' Power off on shutdown' CONFIG_APM_POWER_OFF
bool ' Ignore multiple suspend' CONFIG_APM_IGNORE_MULTIPLE_SUSPEND
fi
endmenu
source drivers/pnp/Config.in
......
......@@ -34,6 +34,10 @@ else
endif
endif
ifdef CONFIG_APM
OX_OBJS += apm.o
endif
ifdef SMP
O_OBJS += io_apic.o smp.o trampoline.o
endif
......
......@@ -96,6 +96,8 @@
#include <linux/apm_bios.h>
#include <linux/init.h>
#include "desc.h"
EXPORT_SYMBOL(apm_register_callback);
EXPORT_SYMBOL(apm_unregister_callback);
......@@ -213,7 +215,7 @@ extern unsigned long get_cmos_time(void);
/*
* Save a segment register away
*/
#define savesegment(seg, where) __asm__ __volatile__("movw %%" #seg ", %0\n" : "=m" (where))
#define savesegment(seg, where) __asm__ __volatile__("movl %%" #seg ",%0" : "=m" (where))
/*
* Forward declarations
......@@ -354,8 +356,7 @@ static const lookup_t error_table[] = {
static inline int apm_bios_call(u32 eax_in, u32 ebx_in, u32 ecx_in,
u32 *eax, u32 *ebx, u32 *ecx, u32 *edx, u32 *esi)
{
u16 old_fs;
u16 old_gs;
unsigned int old_fs, old_gs;
int error;
#ifdef APM_ZERO_SEGS
......@@ -370,10 +371,10 @@ static inline int apm_bios_call(u32 eax_in, u32 ebx_in, u32 ecx_in,
#ifdef APM_ZERO_SEGS
"pushl %%ds\n\t"
"pushl %%es\n\t"
"movw %9, %%ds\n\t"
"movw %9, %%es\n\t"
"movw %9, %%fs\n\t"
"movw %9, %%gs\n\t"
"movl %w9,%%ds\n\t"
"movl %w9,%%es\n\t"
"movl %w9,%%fs\n\t"
"movl %w9,%%gs\n\t"
#endif
"lcall %%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t"
"movl $0, %%edi\n\t"
......@@ -402,8 +403,7 @@ static inline int apm_bios_call(u32 eax_in, u32 ebx_in, u32 ecx_in,
static inline int apm_bios_call_simple(u32 eax_in, u32 ebx_in, u32 ecx_in, u32 *eax)
{
u16 old_fs;
u16 old_gs;
unsigned int old_fs, old_gs;
int error;
#ifdef APM_ZERO_SEGS
......@@ -418,10 +418,10 @@ static inline int apm_bios_call_simple(u32 eax_in, u32 ebx_in, u32 ecx_in, u32 *
#ifdef APM_ZERO_SEGS
"pushl %%ds\n\t"
"pushl %%es\n\t"
"movw %5, %%ds\n\t"
"movw %5, %%es\n\t"
"movw %5, %%fs\n\t"
"movw %5, %%gs\n\t"
"movl %w5,%%ds\n\t"
"movl %w5,%%es\n\t"
"movl %w5,%%fs\n\t"
"movl %w5,%%gs\n\t"
#endif
"lcall %%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t"
"movl $0, %%edi\n\t"
......@@ -1176,7 +1176,7 @@ int apm_get_info(char *buf, char **start, off_t fpos, int length, int dummy)
}
#endif
__initfunc(void apm_bios_init(void))
void __init apm_bios_init(void)
{
unsigned short bx;
unsigned short cx;
......
......@@ -79,15 +79,6 @@ if [ "$CONFIG_QIC02_TAPE" != "n" ]; then
fi
fi
bool 'Advanced Power Management BIOS support' CONFIG_APM
if [ "$CONFIG_APM" = "y" ]; then
bool ' Ignore USER SUSPEND' CONFIG_APM_IGNORE_USER_SUSPEND
bool ' Enable PM at boot time' CONFIG_APM_DO_ENABLE
bool ' Make CPU Idle calls when idle' CONFIG_APM_CPU_IDLE
bool ' Enable console blanking using APM' CONFIG_APM_DISPLAY_BLANK
bool ' Power off on shutdown' CONFIG_APM_POWER_OFF
bool ' Ignore multiple suspend' CONFIG_APM_IGNORE_MULTIPLE_SUSPEND
fi
bool 'Watchdog Timer Support' CONFIG_WATCHDOG
if [ "$CONFIG_WATCHDOG" != "n" ]; then
bool ' Disable watchdog shutdown on close' CONFIG_WATCHDOG_NOWAYOUT
......
......@@ -435,13 +435,12 @@ else
endif
endif
ifdef CONFIG_APM
LX_OBJS += apm_bios.o
ifdef CONFIG_H8
LX_OBJS += h8.o
M = y
endif
ifdef CONFIG_H8
LX_OBJS += h8.o
ifdef CONFIG_APM
M = y
endif
......
......@@ -84,6 +84,8 @@
/* [16-Dec-97 Kevin Buhr] For security reasons, we change some symlink
* semantics. See the comments in "open_namei" and "do_link" below.
*
* [10-Sep-98 Alan Modra] Another symlink change.
*/
static inline char * get_page(void)
......@@ -992,20 +994,20 @@ static inline int do_link(const char * oldname, const char * newname)
struct inode *inode;
int error;
old_dentry = lookup_dentry(oldname, NULL, 1);
error = PTR_ERR(old_dentry);
if (IS_ERR(old_dentry))
goto exit;
/*
* Hardlinks are often used in delicate situations. We avoid
* security-related surprises by not following symlinks on the
* newname. We *do* follow them on the oldname. This is
* the same as Digital Unix 4.0, for example.
* newname. --KAB
*
* Solaris 2.5.1 is similar, but for a laugh try linking from
* a dangling symlink. --KAB
* We don't follow them on the oldname either to be compatible
* with linux 2.0, and to avoid hard-linking to directories
* and other special files. --ADM
*/
old_dentry = lookup_dentry(oldname, NULL, 0);
error = PTR_ERR(old_dentry);
if (IS_ERR(old_dentry))
goto exit;
new_dentry = lookup_dentry(newname, NULL, 0);
error = PTR_ERR(new_dentry);
if (IS_ERR(new_dentry))
......
......@@ -1226,9 +1226,7 @@ void __init mount_root(void)
#ifdef CONFIG_BLK_DEV_INITRD
extern int initmem_freed;
static int __init do_change_root(kdev_t new_root_dev,const char *put_old)
int __init change_root(kdev_t new_root_dev,const char *put_old)
{
kdev_t old_root_dev;
struct vfsmount *vfsmnt;
......@@ -1248,7 +1246,7 @@ static int __init do_change_root(kdev_t new_root_dev,const char *put_old)
dput(old_pwd);
#if 1
shrink_dcache();
printk("do_change_root: old root has d_count=%d\n", old_root->d_count);
printk("change_root: old root has d_count=%d\n", old_root->d_count);
#endif
/*
* Get the new mount directory
......@@ -1293,13 +1291,4 @@ static int __init do_change_root(kdev_t new_root_dev,const char *put_old)
return -ENOMEM;
}
int change_root(kdev_t new_root_dev,const char *put_old)
{
if (initmem_freed) {
printk (KERN_CRIT "Initmem has been already freed. Staying in initrd\n");
return -EBUSY;
}
return do_change_root(new_root_dev, put_old);
}
#endif
......@@ -401,3 +401,6 @@ EXPORT_SYMBOL(unregister_console);
/* time */
EXPORT_SYMBOL(get_fast_time);
/* library functions */
EXPORT_SYMBOL(strnicmp);
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