Commit b1173ae3 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.121

parent 716454f0
......@@ -5,14 +5,14 @@
#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
# CONFIG_EXPERIMENTAL is not set
#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y
# CONFIG_MODVERSIONS is not set
# CONFIG_KMOD is not set
#
# General setup
......@@ -53,7 +53,6 @@ CONFIG_SYSCTL=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_BINFMT_JAVA is not set
CONFIG_BINFMT_EM86=y
# CONFIG_PARPORT is not set
......@@ -66,37 +65,20 @@ CONFIG_BINFMT_EM86=y
# Block devices
#
CONFIG_BLK_DEV_FD=y
CONFIG_BLK_DEV_IDE=y
# CONFIG_BLK_DEV_IDE is not set
#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_BLK_DEV_IDEFLOPPY=y
# CONFIG_BLK_DEV_IDESCSI is not set
CONFIG_BLK_DEV_CMD640=y
CONFIG_BLK_DEV_CMD640_ENHANCED=y
# CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDEDMA_AUTO=y
CONFIG_BLK_DEV_OPTI621=y
CONFIG_BLK_DEV_TRM290=y
CONFIG_BLK_DEV_NS87415=y
CONFIG_BLK_DEV_CMD646=y
# CONFIG_IDE_CHIPSETS is not set
# CONFIG_BLK_DEV_HD_ONLY is not set
#
# Additional Block Devices
#
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_MD is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_INITRD=y
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_BLK_DEV_XD is not set
CONFIG_PARIDE_PARPORT=y
# CONFIG_PARIDE is not set
......@@ -105,61 +87,34 @@ CONFIG_PARIDE_PARPORT=y
#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET is not set
# CONFIG_NETLINK is not set
CONFIG_FIREWALL=y
CONFIG_NET_ALIAS=y
# CONFIG_FIREWALL is not set
# CONFIG_NET_ALIAS is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
CONFIG_IP_FIREWALL=y
CONFIG_IP_TRANSPARENT_PROXY=y
CONFIG_IP_ALWAYS_DEFRAG=y
CONFIG_IP_MASQUERADE=y
#
# Protocol-specific masquerading support will be built as modules.
#
CONFIG_IP_MASQUERADE_ICMP=y
#
# Protocol-specific masquerading support will be built as modules.
#
# CONFIG_IP_MASQUERADE_IPAUTOFW is not set
# CONFIG_IP_MASQUERADE_IPPORTFW is not set
# CONFIG_IP_ROUTER is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
CONFIG_IP_ALIAS=y
CONFIG_SYN_COOKIES=y
# CONFIG_IP_ALIAS is not set
# CONFIG_SYN_COOKIES is not set
#
# (it is safe to leave these untouched)
#
CONFIG_INET_RARP=y
# CONFIG_INET_RARP is not set
CONFIG_IP_NOSR=y
CONFIG_SKB_LARGE=y
# CONFIG_IPV6 is not set
#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_BRIDGE is not set
# CONFIG_LLC is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set
# CONFIG_CPU_IS_SLOW is not set
# CONFIG_NET_SCHED is not set
#
# SCSI support
......@@ -170,9 +125,9 @@ CONFIG_SCSI=y
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
# CONFIG_CHR_DEV_ST is not set
CONFIG_BLK_DEV_SR=y
CONFIG_BLK_DEV_SR_VENDOR=y
# CONFIG_BLK_DEV_SR_VENDOR is not set
# CONFIG_CHR_DEV_SG is not set
#
......@@ -189,15 +144,11 @@ CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
CONFIG_SCSI_AIC7XXX=y
# CONFIG_OVERRIDE_CMDS is not set
# CONFIG_AIC7XXX_PROC_STATS is not set
CONFIG_AIC7XXX_RESET_DELAY=5
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_AM53C974 is not set
CONFIG_SCSI_BUSLOGIC=y
# CONFIG_SCSI_OMIT_FLASHPOINT is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DTC3280 is not set
# CONFIG_SCSI_EATA_DMA is not set
# CONFIG_SCSI_EATA_PIO is not set
......@@ -207,13 +158,7 @@ CONFIG_SCSI_BUSLOGIC=y
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_NCR53C7xx is not set
CONFIG_SCSI_NCR53C8XX=y
CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
CONFIG_SCSI_NCR53C8XX_SYNC=20
# CONFIG_SCSI_NCR53C8XX_PROFILE is not set
# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set
# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
# CONFIG_SCSI_NCR53C8XX is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PCI2000 is not set
# CONFIG_SCSI_PCI2220I is not set
......@@ -225,50 +170,41 @@ CONFIG_SCSI_QLOGIC_ISP=y
# CONFIG_SCSI_T128 is not set
# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_ULTRASTOR is not set
# CONFIG_SCSI_DEBUG is not set
#
# Network device support
#
CONFIG_NETDEVICES=y
# CONFIG_ARCNET is not set
# CONFIG_DUMMY is not set
CONFIG_DUMMY=m
# CONFIG_EQUALIZER is not set
CONFIG_NET_ETHERNET=y
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_RTL8139 is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_NET_ISA is not set
CONFIG_NET_EISA=y
# CONFIG_PCNET32 is not set
# CONFIG_AC3200 is not set
# CONFIG_APRICOT is not set
# CONFIG_CS89x0 is not set
# CONFIG_DE4X5 is not set
CONFIG_DEC_ELCP=y
CONFIG_DE4X5=y
# CONFIG_DEC_ELCP is not set
# CONFIG_DGRS is not set
# CONFIG_EEXPRESS_PRO100 is not set
# CONFIG_LNE390 is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_TLAN is not set
# CONFIG_ES3210 is not set
CONFIG_EPIC100=y
# CONFIG_ZNET is not set
# CONFIG_NET_POCKET is not set
# CONFIG_FDDI is not set
# CONFIG_DLCI is not set
CONFIG_PPP=y
#
# CCP compressors for PPP are only built as modules.
#
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_NET_RADIO is not set
# CONFIG_TR is not set
# CONFIG_SHAPER is not set
# CONFIG_HOSTESS_SV11 is not set
# CONFIG_WAN_DRIVERS is not set
# CONFIG_LAPBETHER is not set
# CONFIG_X25_ASY is not set
#
# Amateur Radio support
......@@ -291,7 +227,7 @@ CONFIG_PPP=y
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_CONSOLE is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_UNIX98_PTYS=y
......@@ -324,14 +260,14 @@ CONFIG_PSMOUSE=y
# CONFIG_MINIX_FS is not set
CONFIG_EXT2_FS=y
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
# CONFIG_JOLIET is not set
# CONFIG_FAT_FS is not set
# CONFIG_MSDOS_FS is not set
# CONFIG_UMSDOS_FS is not set
# CONFIG_VFAT_FS is not set
CONFIG_PROC_FS=y
CONFIG_NFS_FS=y
CONFIG_NFSD=m
# CONFIG_NFSD is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# CONFIG_CODA_FS is not set
......@@ -342,100 +278,25 @@ CONFIG_LOCKD=y
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_AUTOFS_FS=m
# CONFIG_AUTOFS_FS is not set
# CONFIG_UFS_FS is not set
CONFIG_DEVPTS_FS=y
# CONFIG_ADFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_MAC_PARTITION is not set
CONFIG_NLS=y
#
# Native Language Support
#
CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS is not set
#
# Console drivers
#
CONFIG_VGA_CONSOLE=y
CONFIG_FB=y
CONFIG_PCI_CONSOLE=y
CONFIG_DUMMY_CONSOLE=y
# CONFIG_FB_VGA is not set
CONFIG_FB_TGA=y
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FBCON_ADVANCED is not set
CONFIG_FBCON_CFB8=y
CONFIG_FBCON_CFB32=y
# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
# CONFIG_FBCON_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
# CONFIG_FB is not set
#
# Sound
#
CONFIG_SOUND=m
# CONFIG_SOUND_ES1370 is not set
# CONFIG_SOUND_ES1371 is not set
# CONFIG_SOUND_SONICVIBES is not set
# CONFIG_SOUND_MSNDCLAS is not set
# CONFIG_SOUND_MSNDPIN is not set
CONFIG_SOUND_OSS=m
# CONFIG_SOUND_PAS is not set
CONFIG_SOUND_SB=m
# CONFIG_SOUND_ADLIB is not set
# CONFIG_SOUND_GUS is not set
# CONFIG_SOUND_MPU401 is not set
# CONFIG_SOUND_PSS is not set
CONFIG_SOUND_MSS=m
# CONFIG_SOUND_SSCAPE is not set
# CONFIG_SOUND_TRIX is not set
# CONFIG_SOUND_MAD16 is not set
# CONFIG_SOUND_WAVEFRONT is not set
# CONFIG_SOUND_CS4232 is not set
# CONFIG_SOUND_MAUI is not set
# CONFIG_SOUND_SGALAXY is not set
# CONFIG_SOUND_OPL3SA1 is not set
CONFIG_SOUND_SOFTOSS=m
CONFIG_SOUND_YM3812=m
# CONFIG_SOUND_VMIDI is not set
# CONFIG_SOUND_UART6850 is not set
#
# Additional low level sound drivers
#
# CONFIG_LOWLEVEL_SOUND is not set
# CONFIG_SOUND is not set
#
# Kernel hacking
#
# CONFIG_EARLY_SERIAL_CONSOLE is not set
CONFIG_MATHEMU=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_MAGIC_SYSRQ is not set
#include <linux/config.h>
#include <linux/types.h>
#include <linux/stddef.h>
#include <linux/sched.h>
......
......@@ -4,7 +4,6 @@
* kernel entry-points
*/
#include <linux/config.h>
#include <asm/system.h>
#define halt .long PAL_halt
......
......@@ -4,7 +4,6 @@
/* mangled further by Bob Manson (manson@santafe.edu) */
/* more mutilation by David Mosberger (davidm@azstarnet.com) */
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>
......
......@@ -8,7 +8,6 @@
* Code supporting the RUFFIAN.
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/mm.h>
......
......@@ -14,7 +14,6 @@
#undef __EXTERN_INLINE
#include <linux/signal.h>
#include <linux/head.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/types.h>
......
......@@ -7,7 +7,6 @@
#include <linux/config.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
......
......@@ -6,6 +6,7 @@
* DMA functions specific to EBSA-285/CATS architectures
*/
#include <linux/config.h>
#include <linux/sched.h>
#include <linux/malloc.h>
#include <linux/mman.h>
......
......@@ -3,7 +3,6 @@
/* edited by Linus Torvalds */
/* edited for ARM by Russell King */
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>
......
......@@ -8,7 +8,6 @@
#include <linux/config.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
......
......@@ -7,7 +7,6 @@
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
......
......@@ -7,7 +7,6 @@
#include <linux/config.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
......
......@@ -9,7 +9,6 @@
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
......
#ifndef __ARCH_DESC_H
#define __ARCH_DESC_H
struct desc_struct {
unsigned long a,b;
};
extern struct desc_struct gdt_table[];
extern struct desc_struct *idt, *gdt;
struct Xgt_desc_struct {
unsigned short size;
unsigned long address __attribute__((packed));
};
#define idt_descr (*(struct Xgt_desc_struct *)((char *)&idt - 2))
#define gdt_descr (*(struct Xgt_desc_struct *)((char *)&gdt - 2))
/*
* Entry into gdt where to find first TSS. GDT layout:
* 0 - null
* 1 - not used
* 2 - kernel code segment
* 3 - kernel data segment
* 4 - user code segment
* 5 - user data segment
* 6 - not used
* 7 - not used
* 8 - APM BIOS support
* 9 - APM BIOS support
* 10 - APM BIOS support
* 11 - APM BIOS support
* 12 - TSS #0
* 13 - LDT #0
* 14 - TSS #1
* 15 - LDT #1
*/
#define FIRST_TSS_ENTRY 12
#define FIRST_LDT_ENTRY (FIRST_TSS_ENTRY+1)
#define _TSS(n) ((((unsigned long) n)<<4)+(FIRST_TSS_ENTRY<<3))
#define _LDT(n) ((((unsigned long) n)<<4)+(FIRST_LDT_ENTRY<<3))
#define load_TR(n) __asm__ __volatile__("ltr %%ax": /* no output */ :"a" (_TSS(n)))
#define load_ldt(n) __asm__ __volatile__("lldt %%ax": /* no output */ :"a" (_LDT(n)))
#define store_TR(n) \
__asm__("str %%ax\n\t" \
"subl %2,%%eax\n\t" \
"shrl $4,%%eax" \
:"=a" (n) \
:"0" (0),"i" (FIRST_TSS_ENTRY<<3))
extern void set_intr_gate(unsigned int irq, void * addr);
extern void set_ldt_desc(unsigned int n, void *addr, unsigned int size);
extern void set_tss_desc(unsigned int n, void *addr);
/*
* This is the ldt that every process will get unless we need
* something other than this.
*/
extern struct desc_struct default_ldt;
#endif
......@@ -509,7 +509,6 @@ ENTRY(empty_bad_page_table)
ENTRY(empty_zero_page)
.org 0x6000
ENTRY(this_must_match_init_task)
/*
* This starts the data section. Note that the above is all
......@@ -519,10 +518,6 @@ ENTRY(this_must_match_init_task)
.data
ALIGN
/* 256 quadwords - 2048 bytes of idt */
ENTRY(idt_table)
.fill 256,8,0 # idt is uninitialized
/*
* This contains up to 8192 quadwords depending on NR_TASKS - 64kB of
* gdt entries. Ugh.
......
......@@ -4,6 +4,8 @@
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include "desc.h"
static struct vm_area_struct init_mmap = INIT_MMAP;
static struct fs_struct init_fs = INIT_FS;
static struct file * init_fd_array[NR_OPEN] = { NULL, };
......@@ -15,10 +17,9 @@ struct mm_struct init_mm = INIT_MM;
* Initial task structure.
*
* We need to make sure that this is 8192-byte aligned due to the
* way process stacks are handled. This is done by making sure
* the linker maps this in the .text segment right after head.S,
* and making head.S ensure the proper alignment.
*
* The things we do for performance..
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
union task_union init_task_union __attribute__((__section__(".text"))) = { INIT_TASK };
union task_union init_task_union
__attribute__((__section__(".data.init_task"))) = { INIT_TASK };
......@@ -39,6 +39,7 @@
#include <asm/delay.h>
#include "irq.h"
#include "desc.h"
unsigned int local_bh_count[NR_CPUS];
unsigned int local_irq_count[NR_CPUS];
......
......@@ -16,6 +16,8 @@
#include <asm/system.h>
#include <asm/ldt.h>
#include "desc.h"
static int read_ldt(void * ptr, unsigned long bytecount)
{
void * address = current->mm->segments;
......@@ -23,11 +25,9 @@ static int read_ldt(void * ptr, unsigned long bytecount)
if (!ptr)
return -EINVAL;
if (!address)
return 0;
size = LDT_ENTRIES*LDT_ENTRY_SIZE;
if (!address) {
address = &default_ldt;
size = sizeof(default_ldt);
}
if (size > bytecount)
size = bytecount;
return copy_to_user(ptr, address, size) ? -EFAULT : size;
......@@ -81,7 +81,7 @@ static int write_ldt(void * ptr, unsigned long bytecount, int oldmode)
if (!mm->segments) {
int i = current->tarray_ptr - &task[0];
mm->segments = ldt;
set_ldt_desc(gdt+(i<<1)+FIRST_LDT_ENTRY, ldt, LDT_ENTRIES);
set_ldt_desc(i, ldt, LDT_ENTRIES);
current->tss.ldt = _LDT(i);
load_ldt(i);
if (atomic_read(&mm->count) > 1)
......
......@@ -44,7 +44,9 @@
#ifdef CONFIG_MATH_EMULATION
#include <asm/math_emu.h>
#endif
#include "irq.h"
#include "desc.h"
spinlock_t semaphore_wake_lock = SPIN_LOCK_UNLOCKED;
......@@ -553,9 +555,8 @@ void copy_segments(int nr, struct task_struct *p, struct mm_struct *new_mm)
{
struct mm_struct * old_mm = current->mm;
void * old_ldt = old_mm->segments, * ldt = old_ldt;
int ldt_size = LDT_ENTRIES;
/* "default_ldt" - use the one from init_task */
/* default LDT - use the one from init_task */
p->tss.ldt = _LDT(0);
if (old_ldt) {
if (new_mm) {
......@@ -568,7 +569,7 @@ void copy_segments(int nr, struct task_struct *p, struct mm_struct *new_mm)
memcpy(ldt, old_ldt, LDT_ENTRIES*LDT_ENTRY_SIZE);
}
p->tss.ldt = _LDT(nr);
set_ldt_desc(gdt+(nr<<1)+FIRST_LDT_ENTRY, ldt, ldt_size);
set_ldt_desc(nr, ldt, LDT_ENTRIES);
return;
}
}
......@@ -595,7 +596,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
p->tss.ss0 = __KERNEL_DS;
p->tss.tr = _TSS(nr);
set_tss_desc(gdt+(nr<<1)+FIRST_TSS_ENTRY,&(p->tss));
set_tss_desc(nr,&(p->tss));
p->tss.eip = (unsigned long) ret_from_fork;
savesegment(fs,p->tss.fs);
......
......@@ -3,7 +3,6 @@
/* edited by Linus Torvalds */
#include <linux/config.h> /* for CONFIG_MATH_EMULATION */
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>
......
......@@ -9,7 +9,6 @@
* state in 'asm.s'.
*/
#include <linux/config.h>
#include <linux/head.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/string.h>
......@@ -29,10 +28,20 @@
#include <asm/atomic.h>
#include <asm/debugreg.h>
#include "desc.h"
asmlinkage int system_call(void);
asmlinkage void lcall7(void);
struct desc_struct default_ldt = { 0, 0 };
/*
* The IDT has to be page-aligned to simplify the Pentium
* F0 0F bug workaround.. We have a special link segment
* for this.
*/
struct desc_struct idt_table[256] __attribute__((__section__(".data.idt"))) = { {0, 0}, };
static inline void console_verbose(void)
{
extern int console_loglevel;
......@@ -467,12 +476,11 @@ __initfunc(void trap_init_f00f_bug(void))
* move the IDT into it and write protect this page.
*/
page = (unsigned long) vmalloc(PAGE_SIZE);
memcpy((void *) page, idt_table, 256*8);
pgd = pgd_offset(&init_mm, page);
pmd = pmd_offset(pgd, page);
pte = pte_offset(pmd, page);
*pte = pte_wrprotect(*pte);
free_page(pte_page(*pte));
*pte = mk_pte(&idt_table, PAGE_KERNEL_RO);
local_flush_tlb();
/*
......@@ -496,25 +504,24 @@ __asm__ __volatile__ ("movw %%dx,%%ax\n\t" \
:"ax","dx")
/*
* WARNING! If we ever start to insert IDT entries
* into the IDT at run-time, we need to be aware of
* the F0 0F bug workaround that marks the IDT
* read-only. It should be easy enough to just follow
* the page tables and set the gate directly..
* This needs to use 'idt_table' rather than 'idt', and
* thus use the _nonmapped_ version of the IDT, as the
* Pentium F0 0F bugfix can have resulted in the mapped
* IDT being write-protected.
*/
void set_intr_gate(unsigned int n, void *addr)
{
_set_gate(idt+(n),14,0,addr);
_set_gate(idt_table+n,14,0,addr);
}
static void __init set_trap_gate(unsigned int n, void *addr)
{
_set_gate(idt+(n),15,0,addr);
_set_gate(idt_table+n,15,0,addr);
}
static void __init set_system_gate(unsigned int n, void *addr)
{
_set_gate(idt+(n),15,3,addr);
_set_gate(idt_table+n,15,3,addr);
}
static void __init set_call_gate(void *a, void *addr)
......@@ -543,20 +550,19 @@ __asm__ __volatile__ ("movw %3,0(%2)\n\t" \
"rorl $16,%%eax" \
: "=m"(*(n)) : "a" (addr), "r"(n), "ir"(limit), "i"(type))
void set_tss_desc(void *n, void *addr)
void set_tss_desc(unsigned int n, void *addr)
{
_set_tssldt_desc(((char *) n),((int)addr), 235, 0x89);
_set_tssldt_desc(gdt_table+FIRST_TSS_ENTRY+(n<<1), (int)addr, 235, 0x89);
}
void set_ldt_desc(void *n, void *addr, unsigned int size)
void set_ldt_desc(unsigned int n, void *addr, unsigned int size)
{
_set_tssldt_desc(((char *) n), ((int)addr), ((size << 3) - 1), 0x82);
_set_tssldt_desc(gdt_table+FIRST_LDT_ENTRY+(n<<1), (int)addr, ((size << 3) - 1), 0x82);
}
void __init trap_init(void)
{
int i;
struct desc_struct * p;
if (readl(0x0FFFD9) == 'E' + ('I'<<8) + ('S'<<16) + ('A'<<24))
EISA_bus = 1;
......@@ -582,19 +588,12 @@ void __init trap_init(void)
for (i=18;i<48;i++)
set_trap_gate(i,&reserved);
set_system_gate(0x80,&system_call);
/* set up GDT task & ldt entries */
p = gdt+FIRST_TSS_ENTRY;
set_tss_desc(p, &init_task.tss);
p++;
set_ldt_desc(p, &default_ldt, 1);
p++;
for(i=1 ; i<NR_TASKS ; i++) {
p->a=p->b=0;
p++;
p->a=p->b=0;
p++;
}
/* Clear NT, so that we won't have troubles with that later on */
/* set up GDT task & ldt entries */
set_tss_desc(0, &init_task.tss);
set_ldt_desc(0, &default_ldt, 1);
/* Clear NT, so that we won't have troubles with that later on */
__asm__("pushfl ; andl $0xffffbfff,(%esp) ; popfl");
load_TR(0);
load_ldt(0);
......
......@@ -19,7 +19,6 @@
#include <linux/stddef.h>
#include <linux/head.h>
#include <asm/uaccess.h>
......
......@@ -6,7 +6,6 @@
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
......@@ -76,7 +75,8 @@ int __verify_write(const void * addr, unsigned long size)
return 0;
}
asmlinkage void do_invalid_op (struct pt_regs *, unsigned long);
asmlinkage void do_invalid_op(struct pt_regs *, unsigned long);
extern unsigned long idt;
/*
* This routine handles page faults. It determines the address,
......@@ -186,7 +186,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
if (boot_cpu_data.f00f_bug) {
unsigned long nr;
nr = (address - (unsigned long) idt) >> 3;
nr = (address - idt) >> 3;
if (nr == 6) {
do_invalid_op(regs, 0);
......
......@@ -7,7 +7,6 @@
#include <linux/config.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
......
......@@ -35,6 +35,9 @@ SECTIONS
_edata = .; /* End of data section */
. = ALIGN(8192); /* init_task */
.data.init_task : { *(.data.init_task) }
. = ALIGN(4096); /* Init code and data */
__init_begin = .;
.text.init : { *(.text.init) }
......@@ -42,6 +45,9 @@ SECTIONS
. = ALIGN(4096);
__init_end = .;
. = ALIGN(4096);
.data.page_aligned : { *(.data.idt) }
__bss_start = .; /* BSS */
.bss : {
*(.bss)
......
......@@ -3,7 +3,6 @@
/* edited by Linus Torvalds */
/* further hacked for MIPS by David S. Miller (dm@engr.sgi.com) */
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>
......
......@@ -5,7 +5,6 @@
*/
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
......
......@@ -11,7 +11,6 @@
#include <linux/init.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
......
......@@ -11,7 +11,6 @@
#include <stddef.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
......
......@@ -18,7 +18,6 @@
#include <linux/config.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
......
......@@ -22,7 +22,6 @@
#include <linux/config.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
......
......@@ -11,7 +11,6 @@
#include <linux/mm.h>
#include <linux/malloc.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/kernel_stat.h>
#include <linux/errno.h>
......
......@@ -9,7 +9,6 @@
#include <linux/config.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
......
......@@ -11,7 +11,6 @@
#include <linux/mm.h>
#include <linux/malloc.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/kernel_stat.h>
#include <linux/errno.h>
......
This diff is collapsed.
......@@ -19,7 +19,6 @@
*/
#include <linux/module.h>
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/net.h>
......
......@@ -33,7 +33,6 @@
*/
#include <linux/module.h>
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/net.h>
......
......@@ -660,7 +660,6 @@
#include <linux/string.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/head.h>
#include <linux/types.h>
#include <linux/ioport.h>
#include <linux/delay.h>
......
......@@ -555,6 +555,7 @@ static struct signature {
} signatures[] =
{
{ "Adaptec AHA-1520 BIOS", 0x102e, 21 }, /* Adaptec 152x */
{ "Adaptec AHA-1520B", 0x0b, 19 }, /* Adaptec 152x rev B */
{ "Adaptec ASW-B626 BIOS", 0x1029, 21 }, /* on-board controller */
{ "Adaptec BIOS: ASW-B626", 0x0f, 22 }, /* on-board controller */
{ "Adaptec ASW-B626 S2", 0x2e6c, 19 }, /* on-board controller */
......
......@@ -21,7 +21,6 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/head.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/ioport.h>
......
......@@ -27,7 +27,6 @@
#endif
#include <linux/kernel.h>
#include <linux/head.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/ioport.h>
......
......@@ -82,7 +82,6 @@
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/head.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/string.h>
......
......@@ -287,7 +287,6 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/head.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/ioport.h>
......
......@@ -25,7 +25,6 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/head.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/pci.h>
......
......@@ -27,7 +27,6 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/head.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/pci.h>
......
......@@ -27,7 +27,6 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/head.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/ioport.h>
......
......@@ -13,7 +13,6 @@
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/timer.h>
#include <linux/head.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/genhd.h>
......
......@@ -148,7 +148,6 @@
#include <stdarg.h>
#include <linux/kernel.h>
#include <linux/head.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/sched.h>
......
......@@ -399,7 +399,7 @@ static void fbcon_setup(int con, int init, int logo)
int old_rows, old_cols;
unsigned short *save = NULL, *r, *q;
/* Only if not module */
extern int initmem_freed;
int initmem_freed = 1;
struct fbcon_font_desc *font;
if (con != fg_console || initmem_freed || p->type == FB_TYPE_TEXT)
logo = 0;
......
......@@ -9,9 +9,7 @@
O_TARGET := umsdos.o
O_OBJS := dir.o file.o inode.o ioctl.o mangle.o namei.o \
rdir.o symlink.o emd.o
#check.o
rdir.o symlink.o emd.o check.o
M_OBJS := $(O_TARGET)
......
/*
* linux/fs/umsdos/check.c
*
* Sanity-checking code
*/
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/head.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
......@@ -15,6 +16,7 @@
#include <asm/system.h>
#ifdef CHECK_PAGE_TABLES
static int check_one_table (struct pde *page_dir)
{
if (pgd_none (*page_dir))
......@@ -52,3 +54,181 @@ void check_page_tables (void)
printk ("\nError MM %d\n", err);
}
}
#endif
#if UMS_DEBUG
/*
* check a superblock
*/
void check_sb (struct super_block *sb, const char c)
{
if (sb) {
Printk ((" (has %c_sb=%d, %d)",
c, MAJOR (sb->s_dev), MINOR (sb->s_dev)));
} else {
Printk ((" (%c_sb is NULL)", c));
}
}
/*
* check an inode
*/
void check_inode (struct inode *inode)
{
if (inode) {
Printk ((KERN_DEBUG "* inode is %lu (i_count=%d)",
inode->i_ino, inode->i_count));
check_sb (inode->i_sb, 'i');
if (inode->i_dentry.next) { /* FIXME: does this work ? */
Printk ((" (has i_dentry)"));
} else {
Printk ((" (NO i_dentry)"));
}
if (inode->i_op == NULL) {
Printk ((" (i_op is NULL)\n"));
} else if (inode->i_op == &umsdos_dir_inode_operations) {
Printk ((" (i_op is umsdos_dir_inode_operations)\n"));
} else if (inode->i_op == &umsdos_file_inode_operations) {
Printk ((" (i_op is umsdos_file_inode_operations)\n"));
} else if (inode->i_op == &umsdos_file_inode_operations_no_bmap) {
Printk ((" (i_op is umsdos_file_inode_operations_no_bmap)\n"));
} else if (inode->i_op == &umsdos_file_inode_operations_readpage) {
Printk ((" (i_op is umsdos_file_inode_operations_readpage)\n"));
} else if (inode->i_op == &umsdos_rdir_inode_operations) {
Printk ((" (i_op is umsdos_rdir_inode_operations)\n"));
} else if (inode->i_op == &umsdos_symlink_inode_operations) {
Printk ((" (i_op is umsdos_symlink_inode_operations)\n"));
} else {
Printk ((" (i_op is UNKNOWN: %p)\n", inode->i_op));
}
} else {
Printk ((KERN_DEBUG "* inode is NULL\n"));
}
}
/*
* checks all inode->i_dentry
*
*/
void checkd_inode (struct inode *inode)
{
struct dentry *ret;
struct list_head *cur;
int count = 0;
if (!inode) {
printk (KERN_ERR "checkd_inode: inode is NULL!\n");
return;
}
Printk ((KERN_DEBUG "checkd_inode: inode %lu\n", inode->i_ino));
cur = inode->i_dentry.next;
while (count++ < 10) {
PRINTK (("1..."));
if (!cur) {
Printk ((KERN_ERR "checkd_inode: *** NULL reached. exit.\n"));
return;
}
PRINTK (("2..."));
ret = list_entry (cur, struct dentry, d_alias);
PRINTK (("3..."));
if (cur == cur->next) {
Printk ((KERN_DEBUG "checkd_inode: *** cur=cur->next: normal exit.\n"));
return;
}
PRINTK (("4..."));
if (!ret) {
Printk ((KERN_ERR "checkd_inode: *** ret dentry is NULL. exit.\n"));
return;
}
PRINTK (("5... (ret=%p)...", ret));
PRINTK (("5.1.. (ret->d_dname=%p)...", &(ret->d_name)));
PRINTK (("5.1.1. (ret->d_dname.len=%d)...", (int) ret->d_name.len));
PRINTK (("5.1.2. (ret->d_dname.name=%c)...", ret->d_name.name));
Printk ((KERN_DEBUG "checkd_inode: i_dentry is %.*s\n", (int) ret->d_name.len, ret->d_name.name));
PRINTK (("6..."));
cur = cur->next;
PRINTK (("7..."));
#if 1
Printk ((KERN_DEBUG "checkd_inode: *** finished after count 1 (operator forced)\n"));
return;
#endif
}
Printk ((KERN_ERR "checkd_inode: *** OVER LIMIT (loop?) !\n"));
return;
}
/*
* internal part of check_dentry. does the real job.
*
*/
void check_dent_int (struct dentry *dentry, int parent)
{
if (parent) {
Printk ((KERN_DEBUG "* parent(%d) dentry: %.*s\n",
parent, (int) dentry->d_name.len, dentry->d_name.name));
} else {
Printk ((KERN_DEBUG "* checking dentry: %.*s\n",
(int) dentry->d_name.len, dentry->d_name.name));
}
check_inode (dentry->d_inode);
Printk ((KERN_DEBUG "* d_count=%d", dentry->d_count));
check_sb (dentry->d_sb, 'd');
if (dentry->d_op == NULL) {
Printk ((" (d_op is NULL)\n"));
} else {
Printk ((" (d_op is UNKNOWN: %p)\n", dentry->d_op));
}
}
/*
* checks dentry with full traceback to root and prints info. Limited to 10 recursive depths to avoid infinite loops.
*
*/
void check_dentry_path (struct dentry *dentry, const char *desc)
{
int count=0;
Printk ((KERN_DEBUG "*** check_dentry_path: %.60s\n", desc));
if (!dentry) {
Printk ((KERN_DEBUG "*** checking dentry... it is NULL !\n"));
return;
}
if (IS_ERR(dentry)) {
Printk ((KERN_DEBUG "*** checking dentry... it is ERR(%ld) !\n",
PTR_ERR(dentry)));
return;
}
while (dentry && count < 10) {
check_dent_int (dentry, count++);
if (dentry == dentry->d_parent) {
Printk ((KERN_DEBUG "*** end checking dentry (root reached ok)\n"));
break;
}
dentry = dentry->d_parent;
}
if (count >= 10) { /* if infinite loop detected */
Printk ((KERN_ERR
"*** WARNING ! INFINITE LOOP ! check_dentry_path aborted !\n"));
}
if (!dentry) {
Printk ((KERN_ERR
"*** WARNING ! NULL dentry ! check_dentry_path aborted !\n"));
}
}
#else
void check_sb (struct super_block *sb, const char c) {};
void check_inode (struct inode *inode) {};
void checkd_inode (struct inode *inode) {};
void check_dentry_path (struct dentry *dentry, const char *desc) {};
#endif /* UMS_DEBUG */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -240,6 +240,7 @@ static inline void flush_tlb_range(struct mm_struct *mm,
#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED)
#define PAGE_KERNEL_RO __pgprot(_PAGE_PRESENT | _PAGE_DIRTY | _PAGE_ACCESSED)
/*
* The i386 can't do page protection for execute, and considers that the same are read.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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