/**linux/init/main.c**Copyright(C)1991,1992LinusTorvalds**GK2/5/95-ChangedtosupportmountingrootfsviaNFS*Addedinitrd&change_root:WernerAlmesberger&HansLermen,Feb'96*Moanearlyifgccisold,avoidingboguskernels-PaulGortmaker,May'96*Simplifiedstartingofinit:Michae
lA.Griffith<grif@acm.org>*/#define__KERNEL_SYSCALLS__#include<linux/config.h>#include<linux/proc_fs.h>#include<linux/unistd.h>#include<linux/ctype.h>#include<linux/delay.h>#include<linux/utsname.h>#include<linux/ioport.h>#include<linux/init.h>#include<linux
/smp_lock.h>#include<linux/blk.h>#include<linux/hdreg.h>#include<asm/io.h>#include<asm/bugs.h>#ifdefCONFIG_PCI#include<linux/pci.h>#endif#ifdefCONFIG_DIO#include<linux/dio.h>#endif#ifdefCONFIG_ZORRO#include<linux/zorro.h>#endif#ifdefCONFIG_MTRR#include<asm/
mtrr.h>#endif#ifdefCONFIG_APM#include<linux/apm_bios.h>#endif/**Versionsofgccolderthanthatlistedbelowmayactuallycompile*andlinkokay,buttheendproductcanhavesubtleruntimebugs.*Toavoidassociatedbogusbugreports,weflatlyrefusetocompile*withagccthatisknowntobetoo
oldfromtheverybeginning.*/#if__GNUC__<2||(__GNUC__==2&&__GNUC_MINOR__<6)#errorsorry,yourGCCistooold.Itbuildsincorrectkernels.#endifexternchar_stext,_etext;externchar*linux_banner;externintconsole_loglevel;staticintinit(void*);externintbdflush(void*);externi
ntkswapd(void*);externvoidkswapd_setup(void);externvoidinit_IRQ(void);externvoidinit_modules(void);externlongconsole_init(long,long);externvoidsock_init(void);externvoiduidcache_init(void);externvoidmca_init(void);externvoidsbus_init(void);externvoidpowerma
c_init(void);externvoidsysctl_init(void);externvoidfilescache_init(void);externvoidsignals_init(void);externvoiddevice_setup(void);externvoidbinfmt_setup(void);externvoidfree_initmem(void);externvoidfilesystem_setup(void);#ifdefCONFIG_ARCH_ACORNexternvoidec
ard_init(void);#endifexternvoidsmp_setup(char*str,int*ints);#ifdef__i386__externvoidioapic_pirq_setup(char*str,int*ints);externvoidioapic_setup(char*str,int*ints);#endifexternvoidno_scroll(char*str,int*ints);externvoidkbd_reset_setup(char*str,int*ints);exte
rnvoidpanic_setup(char*str,int*ints);externvoidbmouse_setup(char*str,int*ints);externvoidmsmouse_setup(char*str,int*ints);externvoidconsole_setup(char*str,int*ints);#ifdefCONFIG_PRINTERexternvoidlp_setup(char*str,int*ints);#endif#ifdefCONFIG_JOY_AMIGAextern
voidjs_am_setup(char*str,int*ints);#endif#ifdefCONFIG_JOY_ANALOGexternvoidjs_an_setup(char*str,int*ints);#endif#ifdefCONFIG_JOY_ASSASINexternvoidjs_as_setup(char*str,int*ints);#endif#ifdefCONFIG_JOY_CONSOLEexternvoidjs_console_setup(char*str,int*ints);#endi
f#ifdefCONFIG_JOY_DB9externvoidjs_db9_setup(char*str,int*ints);#endif#ifdefCONFIG_JOY_TURBOGRAFXexternvoidjs_tg_setup(char*str,int*ints);#endif#ifdefCONFIG_JOY_LIGHTNINGexternvoidjs_l4_setup(char*str,int*ints);#endifexternvoideth_setup(char*str,int*ints);#i
fdefCONFIG_ARCNET_COM20020externvoidcom20020_setup(char*str,int*ints);#endif#ifdefCONFIG_ARCNET_RIM_Iexternvoidarcrimi_setup(char*str,int*ints);#endif#ifdefCONFIG_ARCNET_COM90xxIOexternvoidcom90io_setup(char*str,int*ints);#endif#ifdefCONFIG_ARCNET_COM90xxex
ternvoidcom90xx_setup(char*str,int*ints);#endif#ifdefCONFIG_DECNETexternvoiddecnet_setup(char*str,int*ints);#endif#ifdefCONFIG_BLK_DEV_XDexternvoidxd_setup(char*str,int*ints);externvoidxd_manual_geo_init(char*str,int*ints);#endif#ifdefCONFIG_BLK_DEV_IDEexte
rnvoidide_setup(char*);#endif#ifdefCONFIG_PARIDE_PDexternvoidpd_setup(char*str,int*ints);#endif#ifdefCONFIG_PARIDE_PFexternvoidpf_setup(char*str,int*ints);#endif#ifdefCONFIG_PARIDE_PTexternvoidpt_setup(char*str,int*ints);#endif#ifdefCONFIG_PARIDE_PGexternvo
idpg_setup(char*str,int*ints);#endif#ifdefCONFIG_PARIDE_PCDexternvoidpcd_setup(char*str,int*ints);#endifexternvoidfloppy_setup(char*str,int*ints);externvoidst_setup(char*str,int*ints);externvoidst0x_setup(char*str,int*ints);externvoidadvansys_setup(char*str
,int*ints);externvoidtmc8xx_setup(char*str,int*ints);externvoidt128_setup(char*str,int*ints);externvoidpas16_setup(char*str,int*ints);externvoidgeneric_NCR5380_setup(char*str,int*intr);externvoidgeneric_NCR53C400_setup(char*str,int*intr);externvoidgeneric_N
CR53C400A_setup(char*str,int*intr);externvoidgeneric_DTC3181E_setup(char*str,int*intr);externvoidaha152x_setup(char*str,int*ints);externvoidaha1542_setup(char*str,int*ints);externvoidgdth_setup(char*str,int*ints);externvoidaic7xxx_setup(char*str,int*ints);e
xternvoidAM53C974_setup(char*str,int*ints);externvoidBusLogic_Setup(char*str,int*ints);externvoidncr53c8xx_setup(char*str,int*ints);externvoideata2x_setup(char*str,int*ints);externvoidu14_34f_setup(char*str,int*ints);externvoidfdomain_setup(char*str,int*int
s);externvoidibmmca_scsi_setup(char*str,int*ints);externvoidin2000_setup(char*str,int*ints);externvoidNCR53c406a_setup(char*str,int*ints);externvoidwd7000_setup(char*str,int*ints);externvoiddc390_setup(char*str,int*ints);externvoidscsi_luns_setup(char*str,i
nt*ints);externvoidscsi_logging_setup(char*str,int*ints);externvoidsound_setup(char*str,int*ints);externvoidreboot_setup(char*str,int*ints);externvoidvideo_setup(char*str,int*ints);#ifdefCONFIG_CDU31Aexternvoidcdu31a_setup(char*str,int*ints);#endifCONFIG_CD
U31A#ifdefCONFIG_BLK_DEV_PS2externvoided_setup(char*str,int*ints);externvoidtp720_setup(char*str,int*ints);#endifCONFIG_BLK_DEV_PS2#ifdefCONFIG_MCDexternvoidmcd_setup(char*str,int*ints);#endifCONFIG_MCD#ifdefCONFIG_MCDXexternvoidmcdx_setup(char*str,int*ints
);#endifCONFIG_MCDX#ifdefCONFIG_SBPCDexternvoidsbpcd_setup(char*str,int*ints);#endifCONFIG_SBPCD#ifdefCONFIG_AZTCDexternvoidaztcd_setup(char*str,int*ints)