diff options
Diffstat (limited to 'include')
190 files changed, 4125 insertions, 2049 deletions
diff --git a/include/asm-alpha/asm_offsets.h b/include/asm-alpha/asm_offsets.h new file mode 100644 index 000000000..b4c55a0bb --- /dev/null +++ b/include/asm-alpha/asm_offsets.h @@ -0,0 +1,13 @@ +#ifndef __ASM_OFFSETS_H__ +#define __ASM_OFFSETS_H__ +#define TASK_STATE 0 +#define TASK_FLAGS 8 +#define TASK_SIGPENDING 16 +#define TASK_ADDR_LIMIT 24 +#define TASK_EXEC_DOMAIN 32 +#define TASK_NEED_RESCHED 40 +#define TASK_SIZE 1120 +#define STACK_SIZE 16384 +#define HAE_CACHE 0 +#define HAE_REG 8 +#endif /* __ASM_OFFSETS_H__ */ diff --git a/include/asm-alpha/bitops.h b/include/asm-alpha/bitops.h index 140f5783a..b7c805511 100644 --- a/include/asm-alpha/bitops.h +++ b/include/asm-alpha/bitops.h @@ -176,6 +176,7 @@ extern inline unsigned long ffz(unsigned long word) /* Whee. EV6 can calculate it directly. */ unsigned long result; __asm__("ctlz %1,%0" : "=r"(result) : "r"(~word)); + return result; #else unsigned long bits, qofs, bofs; diff --git a/include/asm-alpha/console.h b/include/asm-alpha/console.h index e88171fac..6ea274830 100644 --- a/include/asm-alpha/console.h +++ b/include/asm-alpha/console.h @@ -41,7 +41,4 @@ #define ENV_LANGUAGE 0x0E #define ENV_TTY_DEV 0x0F -extern unsigned long dispatch(unsigned long code, ...); -#define puts(x,l) dispatch(CCB_PUTS,0,x,l) - #endif diff --git a/include/asm-alpha/core_mcpcia.h b/include/asm-alpha/core_mcpcia.h index 8b0e03a89..33e67b462 100644 --- a/include/asm-alpha/core_mcpcia.h +++ b/include/asm-alpha/core_mcpcia.h @@ -130,6 +130,8 @@ /* * Error registers */ +#define MCPCIA_MC_ERR0(h) (IDENT_ADDR + 0xf9e0000800UL + HOSE(h)) +#define MCPCIA_MC_ERR1(h) (IDENT_ADDR + 0xf9e0000840UL + HOSE(h)) #define MCPCIA_CAP_ERR(h) (IDENT_ADDR + 0xf9e0000880UL + HOSE(h)) #define MCPCIA_PCI_ERR1(h) (IDENT_ADDR + 0xf9e0001040UL + HOSE(h)) diff --git a/include/asm-alpha/core_pyxis.h b/include/asm-alpha/core_pyxis.h index 8b00d1356..da80e501e 100644 --- a/include/asm-alpha/core_pyxis.h +++ b/include/asm-alpha/core_pyxis.h @@ -182,6 +182,7 @@ #define PYXIS_RT_COUNT (IDENT_ADDR + 0x87A0000200UL) #define PYXIS_INT_TIME (IDENT_ADDR + 0x87A0000240UL) #define PYXIS_IIC_CTRL (IDENT_ADDR + 0x87A00002C0UL) +#define PYXIS_RESET (IDENT_ADDR + 0x8780000900UL) /* * Bit definitions for I/O Controller status register 0: @@ -258,18 +259,6 @@ struct el_PYXIS_sysdata_mcheck { * a kernel virtual address and vv. */ -/* Ruffian doesn't do 1G PCI window */ - -static inline unsigned long pyxis_ruffian_virt_to_bus(void * address) -{ - return virt_to_phys(address); -} - -static inline void * pyxis_ruffian_bus_to_virt(unsigned long address) -{ - return phys_to_virt(address); -} - __EXTERN_INLINE unsigned long pyxis_virt_to_bus(void * address) { return virt_to_phys(address) + PYXIS_DMA_WIN_BASE; @@ -600,15 +589,10 @@ __EXTERN_INLINE unsigned long pyxis_dense_mem(unsigned long addr) #ifdef __WANT_IO_DEF -#ifdef CONFIG_ALPHA_RUFFIAN -#define virt_to_bus pyxis_ruffian_virt_to_bus -#define bus_to_virt pyxis_ruffian_bus_to_virt -#else #define virt_to_bus pyxis_virt_to_bus #define bus_to_virt pyxis_bus_to_virt -#endif -#ifdef BWIO_ENABLED +#if defined(BWIO_ENABLED) && !defined(CONFIG_ALPHA_RUFFIAN) # define __inb pyxis_bw_inb # define __inw pyxis_bw_inw # define __inl pyxis_bw_inl @@ -649,7 +633,7 @@ __EXTERN_INLINE unsigned long pyxis_dense_mem(unsigned long addr) #define dense_mem pyxis_dense_mem -#ifdef BWIO_ENABLED +#if defined(BWIO_ENABLED) && !defined(CONFIG_ALPHA_RUFFIAN) # define inb(port) __inb((port)) # define inw(port) __inw((port)) # define inl(port) __inl((port)) diff --git a/include/asm-alpha/core_tsunami.h b/include/asm-alpha/core_tsunami.h index 5da9c08bb..ee62c175f 100644 --- a/include/asm-alpha/core_tsunami.h +++ b/include/asm-alpha/core_tsunami.h @@ -35,91 +35,77 @@ #endif /* - * CChip and DChip registers + * CChip, DChip, and PChip registers */ -#define TSUNAMI_CSR_CSC (IDENT_ADDR + TS_BIAS + 0x1A0000000UL) -#define TSUNAMI_CSR_MTR (IDENT_ADDR + TS_BIAS + 0x1A0000040UL) -#define TSUNAMI_CSR_MISC (IDENT_ADDR + TS_BIAS + 0x1A0000080UL) -#define TSUNAMI_CSR_MPD (IDENT_ADDR + TS_BIAS + 0x1A00000C0UL) -#define TSUNAMI_CSR_AAR0 (IDENT_ADDR + TS_BIAS + 0x1A0000100UL) -#define TSUNAMI_CSR_AAR1 (IDENT_ADDR + TS_BIAS + 0x1A0000140UL) -#define TSUNAMI_CSR_AAR2 (IDENT_ADDR + TS_BIAS + 0x1A0000180UL) -#define TSUNAMI_CSR_AAR3 (IDENT_ADDR + TS_BIAS + 0x1A00001C0UL) -#define TSUNAMI_CSR_DIM0 (IDENT_ADDR + TS_BIAS + 0x1A0000200UL) -#define TSUNAMI_CSR_DIM1 (IDENT_ADDR + TS_BIAS + 0x1A0000240UL) -#define TSUNAMI_CSR_DIR0 (IDENT_ADDR + TS_BIAS + 0x1A0000280UL) -#define TSUNAMI_CSR_DIR1 (IDENT_ADDR + TS_BIAS + 0x1A00002C0UL) - -#define TSUNAMI_CSR_DRIR (IDENT_ADDR + TS_BIAS + 0x1A0000300UL) -#define TSUNAMI_CSR_PRBEN (IDENT_ADDR + TS_BIAS + 0x1A0000340UL) -#define TSUNAMI_CSR_IIC (IDENT_ADDR + TS_BIAS + 0x1A0000380UL) -#define TSUNAMI_CSR_WDR (IDENT_ADDR + TS_BIAS + 0x1A00003C0UL) -#define TSUNAMI_CSR_MPR0 (IDENT_ADDR + TS_BIAS + 0x1A0000400UL) -#define TSUNAMI_CSR_MPR1 (IDENT_ADDR + TS_BIAS + 0x1A0000440UL) -#define TSUNAMI_CSR_MPR2 (IDENT_ADDR + TS_BIAS + 0x1A0000480UL) -#define TSUNAMI_CSR_MPR3 (IDENT_ADDR + TS_BIAS + 0x1A00004C0UL) -#define TSUNAMI_CSR_TTR (IDENT_ADDR + TS_BIAS + 0x1A0000580UL) -#define TSUNAMI_CSR_TDR (IDENT_ADDR + TS_BIAS + 0x1A00005C0UL) -#define TSUNAMI_CSR_DSC (IDENT_ADDR + TS_BIAS + 0x1B0000800UL) -#define TSUNAMI_CSR_STR (IDENT_ADDR + TS_BIAS + 0x1B0000840UL) -#define TSUNAMI_CSR_DREV (IDENT_ADDR + TS_BIAS + 0x1B0000880UL) + +typedef struct { + volatile unsigned long csr __attribute__((aligned(64))); +} tsunami_64; + +typedef struct { + tsunami_64 csc; + tsunami_64 mtr; + tsunami_64 misc; + tsunami_64 mpd; + tsunami_64 aar0; + tsunami_64 aar1; + tsunami_64 aar2; + tsunami_64 aar3; + tsunami_64 dim0; + tsunami_64 dim1; + tsunami_64 dir0; + tsunami_64 dir1; + tsunami_64 drir; + tsunami_64 prben; + tsunami_64 iic; /* a.k.a. iic0 */ + tsunami_64 wdr; /* a.k.a. iic1 */ + tsunami_64 mpr0; + tsunami_64 mpr1; + tsunami_64 mpr2; + tsunami_64 mpr3; + tsunami_64 mctl; + tsunami_64 ttr; + tsunami_64 tdr; + tsunami_64 dim2; + tsunami_64 dim3; + tsunami_64 dir2; + tsunami_64 dir3; + tsunami_64 iic2; + tsunami_64 iic3; +} tsunami_cchip; + +typedef struct { + tsunami_64 dsc; + tsunami_64 str; + tsunami_64 drev; +} tsunami_dchip; + +typedef struct { + tsunami_64 wsba[4]; + tsunami_64 wsm[4]; + tsunami_64 tba[4]; + tsunami_64 pctl; + tsunami_64 plat; + tsunami_64 reserved; + tsunami_64 perror; + tsunami_64 perrmask; + tsunami_64 perrset; + tsunami_64 tlbiv; + tsunami_64 tlbia; + tsunami_64 pmonctl; + tsunami_64 pmoncnt; +} tsunami_pchip; + +#define TSUNAMI_cchip ((tsunami_cchip *)(IDENT_ADDR+TS_BIAS+0x1A0000000UL)) +#define TSUNAMI_dchip ((tsunami_dchip *)(IDENT_ADDR+TS_BIAS+0x1B0000800UL)) +#define TSUNAMI_pchip0 ((tsunami_pchip *)(IDENT_ADDR+TS_BIAS+0x180000000UL)) +#define TSUNAMI_pchip1 ((tsunami_pchip *)(IDENT_ADDR+TS_BIAS+0x380000000UL)) +extern int TSUNAMI_bootcpu; /* - * PChip registers + * TSUNAMI Pchip Error register. */ -#define TSUNAMI_PCHIP0_WSBA0 (IDENT_ADDR + TS_BIAS + 0x180000000UL) -#define TSUNAMI_PCHIP0_WSBA1 (IDENT_ADDR + TS_BIAS + 0x180000040UL) -#define TSUNAMI_PCHIP0_WSBA2 (IDENT_ADDR + TS_BIAS + 0x180000080UL) -#define TSUNAMI_PCHIP0_WSBA3 (IDENT_ADDR + TS_BIAS + 0x1800000C0UL) - -#define TSUNAMI_PCHIP0_WSM0 (IDENT_ADDR + TS_BIAS + 0x180000100UL) -#define TSUNAMI_PCHIP0_WSM1 (IDENT_ADDR + TS_BIAS + 0x180000140UL) -#define TSUNAMI_PCHIP0_WSM2 (IDENT_ADDR + TS_BIAS + 0x180000180UL) -#define TSUNAMI_PCHIP0_WSM3 (IDENT_ADDR + TS_BIAS + 0x1800001C0UL) -#define TSUNAMI_PCHIP0_TBA0 (IDENT_ADDR + TS_BIAS + 0x180000200UL) -#define TSUNAMI_PCHIP0_TBA1 (IDENT_ADDR + TS_BIAS + 0x180000240UL) -#define TSUNAMI_PCHIP0_TBA2 (IDENT_ADDR + TS_BIAS + 0x180000280UL) -#define TSUNAMI_PCHIP0_TBA3 (IDENT_ADDR + TS_BIAS + 0x1800002C0UL) - -#define TSUNAMI_PCHIP0_PCTL (IDENT_ADDR + TS_BIAS + 0x180000300UL) -#define TSUNAMI_PCHIP0_PLAT (IDENT_ADDR + TS_BIAS + 0x180000340UL) -#define TSUNAMI_PCHIP0_RESERVED (IDENT_ADDR + TS_BIAS + 0x180000380UL) -#define TSUNAMI_PCHIP0_PERROR (IDENT_ADDR + TS_BIAS + 0x1800003c0UL) -#define TSUNAMI_PCHIP0_PERRMASK (IDENT_ADDR + TS_BIAS + 0x180000400UL) -#define TSUNAMI_PCHIP0_PERRSET (IDENT_ADDR + TS_BIAS + 0x180000440UL) -#define TSUNAMI_PCHIP0_TLBIV (IDENT_ADDR + TS_BIAS + 0x180000480UL) -#define TSUNAMI_PCHIP0_TLBIA (IDENT_ADDR + TS_BIAS + 0x1800004C0UL) -#define TSUNAMI_PCHIP0_PMONCTL (IDENT_ADDR + TS_BIAS + 0x180000500UL) -#define TSUNAMI_PCHIP0_PMONCNT (IDENT_ADDR + TS_BIAS + 0x180000540UL) - -#define TSUNAMI_PCHIP1_WSBA0 (IDENT_ADDR + TS_BIAS + 0x380000000UL) -#define TSUNAMI_PCHIP1_WSBA1 (IDENT_ADDR + TS_BIAS + 0x380000040UL) -#define TSUNAMI_PCHIP1_WSBA2 (IDENT_ADDR + TS_BIAS + 0x380000080UL) -#define TSUNAMI_PCHIP1_WSBA3 (IDENT_ADDR + TS_BIAS + 0x3800000C0UL) -#define TSUNAMI_PCHIP1_WSM0 (IDENT_ADDR + TS_BIAS + 0x380000100UL) -#define TSUNAMI_PCHIP1_WSM1 (IDENT_ADDR + TS_BIAS + 0x380000140UL) -#define TSUNAMI_PCHIP1_WSM2 (IDENT_ADDR + TS_BIAS + 0x380000180UL) -#define TSUNAMI_PCHIP1_WSM3 (IDENT_ADDR + TS_BIAS + 0x3800001C0UL) - -#define TSUNAMI_PCHIP1_TBA0 (IDENT_ADDR + TS_BIAS + 0x380000200UL) -#define TSUNAMI_PCHIP1_TBA1 (IDENT_ADDR + TS_BIAS + 0x380000240UL) -#define TSUNAMI_PCHIP1_TBA2 (IDENT_ADDR + TS_BIAS + 0x380000280UL) -#define TSUNAMI_PCHIP1_TBA3 (IDENT_ADDR + TS_BIAS + 0x3800002C0UL) - -#define TSUNAMI_PCHIP1_PCTL (IDENT_ADDR + TS_BIAS + 0x380000300UL) -#define TSUNAMI_PCHIP1_PLAT (IDENT_ADDR + TS_BIAS + 0x380000340UL) -#define TSUNAMI_PCHIP1_RESERVED (IDENT_ADDR + TS_BIAS + 0x380000380UL) -#define TSUNAMI_PCHIP1_PERROR (IDENT_ADDR + TS_BIAS + 0x3800003c0UL) -#define TSUNAMI_PCHIP1_PERRMASK (IDENT_ADDR + TS_BIAS + 0x380000400UL) -#define TSUNAMI_PCHIP1_PERRSET (IDENT_ADDR + TS_BIAS + 0x380000440UL) -#define TSUNAMI_PCHIP1_TLBIV (IDENT_ADDR + TS_BIAS + 0x380000480UL) -#define TSUNAMI_PCHIP1_TLBIA (IDENT_ADDR + TS_BIAS + 0x3800004C0UL) -#define TSUNAMI_PCHIP1_PMONCTL (IDENT_ADDR + TS_BIAS + 0x380000500UL) -#define TSUNAMI_PCHIP1_PMONCNT (IDENT_ADDR + TS_BIAS + 0x380000540UL) - -/* */ -/* TSUNAMI Pchip Error register. */ -/* */ + #define perror_m_lost 0x1 #define perror_m_serr 0x2 #define perror_m_perr 0x4 @@ -137,50 +123,52 @@ #define perror_m_cmd 0xF0000000000000UL #define perror_m_syn 0xFF00000000000000UL union TPchipPERROR { - struct { - unsigned int perror_v_lost : 1; - unsigned perror_v_serr : 1; - unsigned perror_v_perr : 1; - unsigned perror_v_dcrto : 1; - unsigned perror_v_sge : 1; - unsigned perror_v_ape : 1; - unsigned perror_v_ta : 1; - unsigned perror_v_rdpe : 1; - unsigned perror_v_nds : 1; - unsigned perror_v_rto : 1; - unsigned perror_v_uecc : 1; - unsigned perror_v_cre : 1; - unsigned perror_v_rsvd1 : 4; - unsigned perror_v_addrl : 32; - unsigned perror_v_addrh : 3; - unsigned perror_v_rsvd2 : 1; - unsigned perror_v_cmd : 4; - unsigned perror_v_syn : 8; + struct { + unsigned int perror_v_lost : 1; + unsigned perror_v_serr : 1; + unsigned perror_v_perr : 1; + unsigned perror_v_dcrto : 1; + unsigned perror_v_sge : 1; + unsigned perror_v_ape : 1; + unsigned perror_v_ta : 1; + unsigned perror_v_rdpe : 1; + unsigned perror_v_nds : 1; + unsigned perror_v_rto : 1; + unsigned perror_v_uecc : 1; + unsigned perror_v_cre : 1; + unsigned perror_v_rsvd1 : 4; + unsigned perror_v_addrl : 32; + unsigned perror_v_addrh : 3; + unsigned perror_v_rsvd2 : 1; + unsigned perror_v_cmd : 4; + unsigned perror_v_syn : 8; } perror_r_bits; - int perror_q_whole [2]; - } ; -/* */ -/* TSUNAMI Pchip Window Space Base Address register. */ -/* */ + int perror_q_whole [2]; +}; + +/* + * TSUNAMI Pchip Window Space Base Address register. + */ #define wsba_m_ena 0x1 #define wsba_m_sg 0x2 #define wsba_m_ptp 0x4 #define wsba_m_addr 0xFFF00000 #define wmask_k_sz1gb 0x3FF00000 union TPchipWSBA { - struct { - unsigned wsba_v_ena : 1; - unsigned wsba_v_sg : 1; - unsigned wsba_v_ptp : 1; - unsigned wsba_v_rsvd1 : 17; - unsigned wsba_v_addr : 12; - unsigned wsba_v_rsvd2 : 32; + struct { + unsigned wsba_v_ena : 1; + unsigned wsba_v_sg : 1; + unsigned wsba_v_ptp : 1; + unsigned wsba_v_rsvd1 : 17; + unsigned wsba_v_addr : 12; + unsigned wsba_v_rsvd2 : 32; } wsba_r_bits; - int wsba_q_whole [2]; - } ; -/* */ -/* TSUNAMI Pchip Control Register */ -/* */ + int wsba_q_whole [2]; +}; + +/* + * TSUNAMI Pchip Control Register + */ #define pctl_m_fdsc 0x1 #define pctl_m_fbtb 0x2 #define pctl_m_thdis 0x4 @@ -207,37 +195,38 @@ union TPchipWSBA { #define pctl_m_rsvd2 0xFFFF000000000000UL union TPchipPCTL { - struct { - unsigned pctl_v_fdsc : 1; - unsigned pctl_v_fbtb : 1; - unsigned pctl_v_thdis : 1; - unsigned pctl_v_chaindis : 1; - unsigned pctl_v_tgtlat : 1; - unsigned pctl_v_hole : 1; - unsigned pctl_v_mwin : 1; - unsigned pctl_v_arbena : 1; - unsigned pctl_v_prigrp : 7; - unsigned pctl_v_ppri : 1; - unsigned pctl_v_rsvd1 : 2; - unsigned pctl_v_eccen : 1; - unsigned pctl_v_padm : 1; - unsigned pctl_v_cdqmax : 4; - unsigned pctl_v_rev : 8; - unsigned pctl_v_crqmax : 4; - unsigned pctl_v_ptpmax : 4; - unsigned pctl_v_pclkx : 2; - unsigned pctl_v_fdsdis : 1; - unsigned pctl_v_fdwdis : 1; - unsigned pctl_v_ptevrfy : 1; - unsigned pctl_v_rpp : 1; - unsigned pctl_v_pid : 2; - unsigned pctl_v_rsvd2 : 16; + struct { + unsigned pctl_v_fdsc : 1; + unsigned pctl_v_fbtb : 1; + unsigned pctl_v_thdis : 1; + unsigned pctl_v_chaindis : 1; + unsigned pctl_v_tgtlat : 1; + unsigned pctl_v_hole : 1; + unsigned pctl_v_mwin : 1; + unsigned pctl_v_arbena : 1; + unsigned pctl_v_prigrp : 7; + unsigned pctl_v_ppri : 1; + unsigned pctl_v_rsvd1 : 2; + unsigned pctl_v_eccen : 1; + unsigned pctl_v_padm : 1; + unsigned pctl_v_cdqmax : 4; + unsigned pctl_v_rev : 8; + unsigned pctl_v_crqmax : 4; + unsigned pctl_v_ptpmax : 4; + unsigned pctl_v_pclkx : 2; + unsigned pctl_v_fdsdis : 1; + unsigned pctl_v_fdwdis : 1; + unsigned pctl_v_ptevrfy : 1; + unsigned pctl_v_rpp : 1; + unsigned pctl_v_pid : 2; + unsigned pctl_v_rsvd2 : 16; } pctl_r_bits; - int pctl_q_whole [2]; -} ; -/* */ -/* TSUNAMI Pchip Error Mask Register. */ -/* */ + int pctl_q_whole [2]; +}; + +/* + * TSUNAMI Pchip Error Mask Register. + */ #define perrmask_m_lost 0x1 #define perrmask_m_serr 0x2 #define perrmask_m_perr 0x4 @@ -252,37 +241,37 @@ union TPchipPCTL { #define perrmask_m_cre 0x800 #define perrmask_m_rsvd 0xFFFFFFFFFFFFF000UL union TPchipPERRMASK { - struct { - unsigned int perrmask_v_lost : 1; - unsigned perrmask_v_serr : 1; - unsigned perrmask_v_perr : 1; - unsigned perrmask_v_dcrto : 1; - unsigned perrmask_v_sge : 1; - unsigned perrmask_v_ape : 1; - unsigned perrmask_v_ta : 1; - unsigned perrmask_v_rdpe : 1; - unsigned perrmask_v_nds : 1; - unsigned perrmask_v_rto : 1; - unsigned perrmask_v_uecc : 1; - unsigned perrmask_v_cre : 1; - unsigned perrmask_v_rsvd1 : 20; - unsigned perrmask_v_rsvd2 : 32; + struct { + unsigned int perrmask_v_lost : 1; + unsigned perrmask_v_serr : 1; + unsigned perrmask_v_perr : 1; + unsigned perrmask_v_dcrto : 1; + unsigned perrmask_v_sge : 1; + unsigned perrmask_v_ape : 1; + unsigned perrmask_v_ta : 1; + unsigned perrmask_v_rdpe : 1; + unsigned perrmask_v_nds : 1; + unsigned perrmask_v_rto : 1; + unsigned perrmask_v_uecc : 1; + unsigned perrmask_v_cre : 1; + unsigned perrmask_v_rsvd1 : 20; + unsigned perrmask_v_rsvd2 : 32; } perrmask_r_bits; - int perrmask_q_whole [2]; - } ; + int perrmask_q_whole [2]; +}; /* * Memory spaces: */ -#define TSUNAMI_PCI0_MEM (IDENT_ADDR + TS_BIAS + 0x000000000UL) -#define TSUNAMI_PCI0_IACK_SC (IDENT_ADDR + TS_BIAS + 0x1F8000000UL) -#define TSUNAMI_PCI0_IO (IDENT_ADDR + TS_BIAS + 0x1FC000000UL) -#define TSUNAMI_PCI0_CONF (IDENT_ADDR + TS_BIAS + 0x1FE000000UL) +#define HOSE(h) (((unsigned long)(h)) << 33) + +#define TSUNAMI_MEM(h) (IDENT_ADDR + TS_BIAS + 0x000000000UL + HOSE(h)) +#define _TSUNAMI_IACK_SC(h) (IDENT_ADDR + TS_BIAS + 0x1F8000000UL + HOSE(h)) +#define TSUNAMI_IO(h) (IDENT_ADDR + TS_BIAS + 0x1FC000000UL + HOSE(h)) +#define TSUNAMI_CONF(h) (IDENT_ADDR + TS_BIAS + 0x1FE000000UL + HOSE(h)) + +#define TSUNAMI_IACK_SC _TSUNAMI_IACK_SC(0) /* hack! */ -#define TSUNAMI_PCI1_MEM (IDENT_ADDR + TS_BIAS + 0x200000000UL) -#define TSUNAMI_PCI1_IACK_SC (IDENT_ADDR + TS_BIAS + 0x3F8000000UL) -#define TSUNAMI_PCI1_IO (IDENT_ADDR + TS_BIAS + 0x3FC000000UL) -#define TSUNAMI_PCI1_CONF (IDENT_ADDR + TS_BIAS + 0x3FE000000UL) /* * Data structure for handling TSUNAMI machine checks: @@ -319,51 +308,44 @@ __EXTERN_INLINE void * tsunami_bus_to_virt(unsigned long address) * can only use linear accesses to get at PCI memory and I/O spaces. */ -/* HACK ALERT! HACK ALERT! */ -/* HACK ALERT! HACK ALERT! */ - -/* Only using PCI bus 0 for now in all routines. */ - -#define TSUNAMI_IACK_SC TSUNAMI_PCI0_IACK_SC - -/* HACK ALERT! HACK ALERT! */ -/* HACK ALERT! HACK ALERT! */ - #define vucp volatile unsigned char * #define vusp volatile unsigned short * #define vuip volatile unsigned int * #define vulp volatile unsigned long * +#define XADDR ((addr) & 0xffffffffUL) +#define XHOSE (((addr) >> 32) & 3UL) + __EXTERN_INLINE unsigned int tsunami_inb(unsigned long addr) { - return __kernel_ldbu(*(vucp)(addr + TSUNAMI_PCI0_IO)); + return __kernel_ldbu(*(vucp)(XADDR + TSUNAMI_IO(XHOSE))); } __EXTERN_INLINE void tsunami_outb(unsigned char b, unsigned long addr) { - __kernel_stb(b, *(vucp)(addr + TSUNAMI_PCI0_IO)); + __kernel_stb(b, *(vucp)(XADDR + TSUNAMI_IO(XHOSE))); mb(); } __EXTERN_INLINE unsigned int tsunami_inw(unsigned long addr) { - return __kernel_ldwu(*(vusp)(addr+TSUNAMI_PCI0_IO)); + return __kernel_ldwu(*(vusp)(XADDR + TSUNAMI_IO(XHOSE))); } __EXTERN_INLINE void tsunami_outw(unsigned short b, unsigned long addr) { - __kernel_stw(b, *(vusp)(addr+TSUNAMI_PCI0_IO)); + __kernel_stw(b, *(vusp)(XADDR + TSUNAMI_IO(XHOSE))); mb(); } __EXTERN_INLINE unsigned int tsunami_inl(unsigned long addr) { - return *(vuip)(addr+TSUNAMI_PCI0_IO); + return *(vuip)(XADDR + TSUNAMI_IO(XHOSE)); } __EXTERN_INLINE void tsunami_outl(unsigned int b, unsigned long addr) { - *(vuip)(addr+TSUNAMI_PCI0_IO) = b; + *(vuip)(XADDR + TSUNAMI_IO(XHOSE)) = b; mb(); } @@ -373,45 +355,45 @@ __EXTERN_INLINE void tsunami_outl(unsigned int b, unsigned long addr) __EXTERN_INLINE unsigned long tsunami_readb(unsigned long addr) { - return __kernel_ldbu(*(vucp)(addr+TSUNAMI_PCI0_MEM)); + return __kernel_ldbu(*(vucp)(XADDR + TSUNAMI_MEM(XHOSE))); } __EXTERN_INLINE unsigned long tsunami_readw(unsigned long addr) { - return __kernel_ldwu(*(vusp)(addr+TSUNAMI_PCI0_MEM)); + return __kernel_ldwu(*(vusp)(XADDR + TSUNAMI_MEM(XHOSE))); } __EXTERN_INLINE unsigned long tsunami_readl(unsigned long addr) { - return *(vuip)(addr+TSUNAMI_PCI0_MEM); + return *(vuip)(XADDR + TSUNAMI_MEM(XHOSE)); } __EXTERN_INLINE unsigned long tsunami_readq(unsigned long addr) { - return *(vulp)(addr+TSUNAMI_PCI0_MEM); + return *(vulp)(XADDR + TSUNAMI_MEM(XHOSE)); } __EXTERN_INLINE void tsunami_writeb(unsigned char b, unsigned long addr) { - __kernel_stb(b, *(vucp)(addr+TSUNAMI_PCI0_MEM)); + __kernel_stb(b, *(vucp)(XADDR + TSUNAMI_MEM(XHOSE))); mb(); } __EXTERN_INLINE void tsunami_writew(unsigned short b, unsigned long addr) { - __kernel_stw(b, *(vusp)(addr+TSUNAMI_PCI0_MEM)); + __kernel_stw(b, *(vusp)(XADDR + TSUNAMI_MEM(XHOSE))); mb(); } __EXTERN_INLINE void tsunami_writel(unsigned int b, unsigned long addr) { - *(vuip)(addr+TSUNAMI_PCI0_MEM) = b; + *(vuip)(XADDR + TSUNAMI_MEM(XHOSE)) = b; mb(); } __EXTERN_INLINE void tsunami_writeq(unsigned long b, unsigned long addr) { - *(vulp)(addr+TSUNAMI_PCI0_MEM) = b; + *(vulp)(XADDR + TSUNAMI_MEM(XHOSE)) = b; mb(); } @@ -419,7 +401,7 @@ __EXTERN_INLINE void tsunami_writeq(unsigned long b, unsigned long addr) __EXTERN_INLINE unsigned long tsunami_dense_mem(unsigned long addr) { - return TSUNAMI_PCI0_MEM; + return TSUNAMI_MEM(XHOSE); } #undef vucp @@ -427,6 +409,9 @@ __EXTERN_INLINE unsigned long tsunami_dense_mem(unsigned long addr) #undef vuip #undef vulp +#undef XADDR +#undef XHOSE + #ifdef __WANT_IO_DEF #define virt_to_bus tsunami_virt_to_bus diff --git a/include/asm-alpha/dma.h b/include/asm-alpha/dma.h index 686921599..2f14838dd 100644 --- a/include/asm-alpha/dma.h +++ b/include/asm-alpha/dma.h @@ -78,13 +78,18 @@ due to a hardware SIO (PCI<->ISA bus bridge) chip limitation, is 64MB. See <asm/apecs.h> for more info. */ +/* The maximum address that we can perform a DMA transfer to on RUFFIAN, + due to a hardware SIO (PCI<->ISA bus bridge) chip limitation, is 16MB. + See <asm/pyxis.h> for more info. +*/ /* NOTE: we must define the maximum as something less than 64Mb, to prevent virt_to_bus() from returning an address in the first window, for a data area that goes beyond the 64Mb first DMA window. Sigh... We MUST coordinate the maximum with <asm/apecs.h> for consistency. For now, this limit is set to 48Mb... */ -#define ALPHA_XL_MAX_DMA_ADDRESS (0xfffffc0003000000UL) +#define ALPHA_XL_MAX_DMA_ADDRESS (IDENT_ADDR+0x3000000UL) +#define ALPHA_RUFFIAN_MAX_DMA_ADDRESS (IDENT_ADDR+0x1000000UL) #define ALPHA_MAX_DMA_ADDRESS (~0UL) #ifdef CONFIG_ALPHA_GENERIC @@ -92,6 +97,8 @@ #else # ifdef CONFIG_ALPHA_XL # define MAX_DMA_ADDRESS ALPHA_XL_MAX_DMA_ADDRESS +# elif defined(CONFIG_ALPHA_RUFFIAN) +# define MAX_DMA_ADDRESS ALPHA_RUFFIAN_MAX_DMA_ADDRESS # else # define MAX_DMA_ADDRESS ALPHA_MAX_DMA_ADDRESS # endif diff --git a/include/asm-alpha/fcntl.h b/include/asm-alpha/fcntl.h index 3df5edf2b..7df92de11 100644 --- a/include/asm-alpha/fcntl.h +++ b/include/asm-alpha/fcntl.h @@ -17,6 +17,7 @@ #define O_NDELAY O_NONBLOCK #define O_SYNC 040000 #define FASYNC 020000 /* fcntl, for BSD compatibility */ +#define O_DIRECT 040000 /* direct disk access - should check with OSF/1 */ #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get f_flags */ @@ -29,6 +30,8 @@ #define F_SETOWN 5 /* for sockets. */ #define F_GETOWN 6 /* for sockets. */ +#define F_SETSIG 10 /* for sockets. */ +#define F_GETSIG 11 /* for sockets. */ /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ diff --git a/include/asm-alpha/floppy.h b/include/asm-alpha/floppy.h index 2f847ddb0..36fb2c5e9 100644 --- a/include/asm-alpha/floppy.h +++ b/include/asm-alpha/floppy.h @@ -54,8 +54,8 @@ static int FDC2 = -1; /* * Most Alphas have no problems with floppy DMA crossing 64k borders, - * except for XL. It is also the only one with DMA limits, so we use - * that to test in the generic kernel. + * except for XL and RUFFIAN. They are also the only one with DMA + * limits, so we use that to test in the generic kernel. */ #define __CROSS_64KB(a,s) \ @@ -66,7 +66,7 @@ static int FDC2 = -1; #ifdef CONFIG_ALPHA_GENERIC # define CROSS_64KB(a,s) (__CROSS_64KB(a,s) && ~alpha_mv.max_dma_address) #else -# ifdef CONFIG_ALPHA_XL +# if defined(CONFIG_ALPHA_XL) || defined(CONFIG_ALPHA_RUFFIAN) # define CROSS_64KB(a,s) __CROSS_64KB(a,s) # else # define CROSS_64KB(a,s) (0) diff --git a/include/asm-alpha/hardirq.h b/include/asm-alpha/hardirq.h index 27abc50fa..1b0c1a051 100644 --- a/include/asm-alpha/hardirq.h +++ b/include/asm-alpha/hardirq.h @@ -1,51 +1,58 @@ #ifndef _ALPHA_HARDIRQ_H #define _ALPHA_HARDIRQ_H +/* Initially just a straight copy of the i386 code. */ + #include <linux/tasks.h> extern unsigned int local_irq_count[NR_CPUS]; -#define in_interrupt() (local_irq_count[smp_processor_id()] + local_bh_count[smp_processor_id()] != 0) + +/* + * Are we in an interrupt context? Either doing bottom half + * or hardware interrupt processing? + */ + +#define in_interrupt() \ +({ \ + int __cpu = smp_processor_id(); \ + (local_irq_count[__cpu] + local_bh_count[__cpu]) != 0; \ +}) #ifndef __SMP__ #define hardirq_trylock(cpu) (local_irq_count[cpu] == 0) -#define hardirq_endlock(cpu) do { } while (0) +#define hardirq_endlock(cpu) ((void) 0) -#define hardirq_enter(cpu) (local_irq_count[cpu]++) -#define hardirq_exit(cpu) (local_irq_count[cpu]--) +#define hardirq_enter(cpu, irq) (local_irq_count[cpu]++) +#define hardirq_exit(cpu, irq) (local_irq_count[cpu]--) -#define synchronize_irq() do { } while (0) +#define synchronize_irq() barrier() #else -/* initially just a straight copy if the i386 code */ - #include <asm/atomic.h> #include <asm/spinlock.h> -#include <asm/system.h> -#include <asm/smp.h> -extern unsigned char global_irq_holder; +extern int global_irq_holder; extern spinlock_t global_irq_lock; extern atomic_t global_irq_count; static inline void release_irqlock(int cpu) { /* if we didn't own the irq lock, just ignore.. */ - if (global_irq_holder == (unsigned char) cpu) { + if (global_irq_holder == cpu) { global_irq_holder = NO_PROC_ID; spin_unlock(&global_irq_lock); } } -/* Ordering of the counter bumps is _deadly_ important. */ -static inline void hardirq_enter(int cpu) +static inline void hardirq_enter(int cpu, int irq) { ++local_irq_count[cpu]; atomic_inc(&global_irq_count); } -static inline void hardirq_exit(int cpu) +static inline void hardirq_exit(int cpu, int irq) { atomic_dec(&global_irq_count); --local_irq_count[cpu]; @@ -53,28 +60,10 @@ static inline void hardirq_exit(int cpu) static inline int hardirq_trylock(int cpu) { - unsigned long flags; - int ret = 1; - - __save_and_cli(flags); - if ((atomic_add_return(1, &global_irq_count) != 1) || - (global_irq_lock.lock != 0)) { - atomic_dec(&global_irq_count); - __restore_flags(flags); - ret = 0; - } else { - ++local_irq_count[cpu]; - __sti(); - } - return ret; + return !atomic_read(&global_irq_count) && !global_irq_lock.lock; } -#define hardirq_endlock(cpu) \ - do { \ - __cli(); \ - hardirq_exit(cpu); \ - __sti(); \ - } while (0) +#define hardirq_endlock(cpu) ((void)0) extern void synchronize_irq(void); diff --git a/include/asm-alpha/hwrpb.h b/include/asm-alpha/hwrpb.h index 5aaf94223..6ab7225e3 100644 --- a/include/asm-alpha/hwrpb.h +++ b/include/asm-alpha/hwrpb.h @@ -93,7 +93,7 @@ struct percpu_struct { unsigned long halt_pv; unsigned long halt_reason; unsigned long res; - char ipc_buffer[168]; + unsigned long ipc_buffer[21]; unsigned long palcode_avail[16]; unsigned long compatibility; }; diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h index 61da10c8e..516fff5e1 100644 --- a/include/asm-alpha/io.h +++ b/include/asm-alpha/io.h @@ -12,11 +12,10 @@ /* * Virtual -> physical identity mapping starts at this offset */ -/* XXX: Do we need to conditionalize on this? */ #ifdef USE_48_BIT_KSEG -#define IDENT_ADDR (0xffff800000000000UL) +#define IDENT_ADDR 0xffff800000000000 #else -#define IDENT_ADDR (0xfffffc0000000000UL) +#define IDENT_ADDR 0xfffffc0000000000 #endif #ifdef __KERNEL__ @@ -52,7 +51,10 @@ static inline void set_hae(unsigned long new_hae) */ static inline unsigned long virt_to_phys(volatile void * address) { - return 0xffffffffUL & (unsigned long) address; + /* Conditionalize this on the CPU? This here is 40 bits, + whereas EV4 only supports 34. But KSEG is farther out + so it shouldn't _really_ matter. */ + return 0xffffffffffUL & (unsigned long) address; } static inline void * phys_to_virt(unsigned long address) @@ -322,6 +324,7 @@ out: #ifdef CONFIG_ALPHA_GENERIC # define RTC_PORT(x) ((x) + alpha_mv.rtc_port) # define RTC_ADDR(x) ((x) | alpha_mv.rtc_addr) +# define RTC_ALWAYS_BCD (alpha_mv.rtc_bcd) #else # ifdef CONFIG_ALPHA_JENSEN # define RTC_PORT(x) (0x170+(x)) @@ -330,9 +333,13 @@ out: # define RTC_PORT(x) (0x70 + (x)) # define RTC_ADDR(x) (0x80 | (x)) # endif +# ifdef CONFIG_ALPHA_RUFFIAN +# define RTC_ALWAYS_BCD 1 +# else +# define RTC_ALWAYS_BCD 0 +# endif #endif -#define RTC_ALWAYS_BCD 0 #endif /* __KERNEL__ */ diff --git a/include/asm-alpha/machvec.h b/include/asm-alpha/machvec.h index e3d247a9a..eb39cffc1 100644 --- a/include/asm-alpha/machvec.h +++ b/include/asm-alpha/machvec.h @@ -12,6 +12,7 @@ struct task_struct; struct mm_struct; struct pt_regs; struct vm_area_struct; +struct linux_hose_info; struct alpha_machine_vector { @@ -21,10 +22,12 @@ struct alpha_machine_vector unsigned long hae_cache; unsigned long *hae_register; + unsigned int nr_irqs : 16; + unsigned int rtc_port : 16; + unsigned int rtc_addr : 15; + unsigned int rtc_bcd : 1; + unsigned int max_asn : 16; unsigned long max_dma_address; - unsigned int nr_irqs; - unsigned int rtc_port, rtc_addr; - unsigned int max_asn; unsigned long mmu_context_mask; unsigned long irq_probe_mask; unsigned long iack_sc; @@ -52,13 +55,19 @@ struct alpha_machine_vector unsigned long (*mv_dense_mem)(unsigned long); - int (*pci_read_config_byte)(u8, u8, u8, u8 *value); - int (*pci_read_config_word)(u8, u8, u8, u16 *value); - int (*pci_read_config_dword)(u8, u8, u8, u32 *value); - - int (*pci_write_config_byte)(u8, u8, u8, u8 value); - int (*pci_write_config_word)(u8, u8, u8, u16 value); - int (*pci_write_config_dword)(u8, u8, u8, u32 value); + int (*hose_read_config_byte)(u8, u8, u8, u8 *value, + struct linux_hose_info *); + int (*hose_read_config_word)(u8, u8, u8, u16 *value, + struct linux_hose_info *); + int (*hose_read_config_dword)(u8, u8, u8, u32 *value, + struct linux_hose_info *); + + int (*hose_write_config_byte)(u8, u8, u8, u8 value, + struct linux_hose_info *); + int (*hose_write_config_word)(u8, u8, u8, u16 value, + struct linux_hose_info *); + int (*hose_write_config_dword)(u8, u8, u8, u32 value, + struct linux_hose_info *); void (*mv_get_mmu_context)(struct task_struct *); void (*mv_flush_tlb_current)(struct mm_struct *); diff --git a/include/asm-alpha/mmu_context.h b/include/asm-alpha/mmu_context.h index af97b6740..dcf1f05d7 100644 --- a/include/asm-alpha/mmu_context.h +++ b/include/asm-alpha/mmu_context.h @@ -35,14 +35,17 @@ */ #define EV4_MAX_ASN 63 #define EV5_MAX_ASN 127 +#define EV6_MAX_ASN 255 #ifdef CONFIG_ALPHA_GENERIC # define MAX_ASN (alpha_mv.max_asn) #else # ifdef CONFIG_ALPHA_EV4 # define MAX_ASN EV4_MAX_ASN -# else +# elif defined(CONFIG_ALPHA_EV5) # define MAX_ASN EV5_MAX_ASN +# else +# define MAX_ASN EV6_MAX_ASN # endif #endif @@ -155,7 +158,8 @@ __reload_tss(struct thread_struct *tss) a0 = MASK_CONTEXT(tss); __asm__ __volatile__( - "call_pal %2" : "=r"(v0), "=r"(a0) + "call_pal %2 #__reload_tss" + : "=r"(v0), "=r"(a0) : "i"(PAL_swpctx), "r"(a0) : "$1", "$16", "$22", "$23", "$24", "$25"); diff --git a/include/asm-alpha/page.h b/include/asm-alpha/page.h index aa2a67ae3..c2d27951e 100644 --- a/include/asm-alpha/page.h +++ b/include/asm-alpha/page.h @@ -8,6 +8,8 @@ #ifdef __KERNEL__ +#ifndef __ASSEMBLY__ + #define STRICT_MM_TYPECHECKS /* @@ -102,12 +104,18 @@ typedef unsigned long pgprot_t; #define __pgd(x) (x) #define __pgprot(x) (x) -#endif +#endif /* STRICT_MM_TYPECHECKS */ +#endif /* !ASSEMBLY */ /* to align the pointer to the (next) page boundary */ -#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) +#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) + +#ifdef USE_48_BIT_KSEG +#define PAGE_OFFSET 0xffff800000000000 +#else +#define PAGE_OFFSET 0xfffffc0000000000 +#endif -#define PAGE_OFFSET 0xFFFFFC0000000000UL #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET) #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) #define MAP_NR(addr) (__pa(addr) >> PAGE_SHIFT) diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h index 3cbbaa17a..47432c051 100644 --- a/include/asm-alpha/pgtable.h +++ b/include/asm-alpha/pgtable.h @@ -311,7 +311,7 @@ extern unsigned long __zero_page(void); #define BAD_PAGETABLE __bad_pagetable() #define BAD_PAGE __bad_page() -#define ZERO_PAGE 0xfffffc000030A000 +#define ZERO_PAGE (PAGE_OFFSET+0x30A000) /* number of bits that fit into a memory pointer */ #define BITS_PER_PTR (8*sizeof(unsigned long)) @@ -327,6 +327,24 @@ extern unsigned long __zero_page(void); ((unsigned long)(address)>>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK) /* + * On certain platforms whose physical address space can overlap KSEG, + * namely EV6 and above, we must re-twiddle the physaddr to restore the + * correct high-order bits. + */ + +#if defined(CONFIG_ALPHA_GENERIC) && defined(USE_48_BIT_KSEG) +#error "EV6-only feature in a generic kernel" +#endif +#if defined(CONFIG_ALPHA_GENERIC) || \ + (defined(CONFIG_ALPHA_EV6) && !defined(USE_48_BIT_KSEG)) +#define PHYS_TWIDDLE(phys) \ + ((((phys) & 0xc0000000000UL) == 0x40000000000UL) \ + ? ((phys) ^= 0xc0000000000UL) : (phys)) +#else +#define PHYS_TWIDDLE(phys) (phys) +#endif + +/* * Conversion functions: convert a page and protection to a page entry, * and a page entry and page directory to the page they refer to. */ @@ -334,7 +352,7 @@ extern inline pte_t mk_pte(unsigned long page, pgprot_t pgprot) { pte_t pte; pte_val(pte) = ((page-PAGE_OFFSET) << (32-PAGE_SHIFT)) | pgprot_val(pgprot); return pte; } extern inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) -{ pte_t pte; pte_val(pte) = (physpage << (32-PAGE_SHIFT)) | pgprot_val(pgprot); return pte; } +{ pte_t pte; pte_val(pte) = (PHYS_TWIDDLE(physpage) << (32-PAGE_SHIFT)) | pgprot_val(pgprot); return pte; } extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) { pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; } diff --git a/include/asm-alpha/posix_types.h b/include/asm-alpha/posix_types.h index 3cbf6d573..50967ef96 100644 --- a/include/asm-alpha/posix_types.h +++ b/include/asm-alpha/posix_types.h @@ -40,7 +40,7 @@ typedef struct { #define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) #define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) -#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) +#define __FD_ISSET(d, set) (((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) != 0) #define __FD_ZERO(set) \ ((void) memset ((__ptr_t) (set), 0, sizeof (__kernel_fd_set))) diff --git a/include/asm-alpha/processor.h b/include/asm-alpha/processor.h index ee6613b6a..dff34c973 100644 --- a/include/asm-alpha/processor.h +++ b/include/asm-alpha/processor.h @@ -62,7 +62,7 @@ struct thread_struct { long debugreg[8]; }; -#define INIT_MMAP { &init_mm, 0xfffffc0000000000, 0xfffffc0010000000, \ +#define INIT_MMAP { &init_mm, PAGE_OFFSET, PAGE_OFFSET+0x10000000, \ PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, NULL, &init_mm.mmap } #define INIT_TSS { \ diff --git a/include/asm-alpha/siginfo.h b/include/asm-alpha/siginfo.h index c2304b041..f9f3e040a 100644 --- a/include/asm-alpha/siginfo.h +++ b/include/asm-alpha/siginfo.h @@ -87,6 +87,7 @@ typedef struct siginfo { #define SI_TIMER -2 /* sent by timer expiration */ #define SI_MESGQ -3 /* sent by real time mesq state change */ #define SI_ASYNCIO -4 /* sent by AIO completion */ +#define SI_SIGIO -5 /* sent by queued SIGIO */ #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) diff --git a/include/asm-alpha/smp.h b/include/asm-alpha/smp.h index 90bfec2e2..9d5e8e084 100644 --- a/include/asm-alpha/smp.h +++ b/include/asm-alpha/smp.h @@ -4,6 +4,7 @@ #ifdef __SMP__ #include <linux/tasks.h> +#include <asm/pal.h> struct cpuinfo_alpha { unsigned long loops_per_sec; @@ -15,39 +16,29 @@ struct cpuinfo_alpha { extern struct cpuinfo_alpha cpu_data[NR_CPUS]; -typedef volatile struct { - unsigned int kernel_flag; /* 4 bytes, please */ - unsigned int akp; /* 4 bytes, please */ - unsigned long pc; - unsigned int cpu; -} klock_info_t; - -extern klock_info_t klock_info; - -#define KLOCK_HELD 0xff -#define KLOCK_CLEAR 0x00 - -extern int task_lock_depth; - #define PROC_CHANGE_PENALTY 20 extern __volatile__ int cpu_number_map[NR_CPUS]; /* HACK: Cabrio WHAMI return value is bogus if more than 8 bits used.. :-( */ -#define hard_smp_processor_id() \ -({ \ - register unsigned char __r0 __asm__("$0"); \ - __asm__ __volatile__( \ - "call_pal %0" \ - : /* no output (bound to the template) */ \ - :"i" (PAL_whami) \ - :"$0", "$1", "$22", "$23", "$24", "$25", "memory"); \ - __r0; \ -}) - -#define smp_processor_id() hard_smp_processor_id() + +static __inline__ unsigned char hard_smp_processor_id(void) +{ + register unsigned char __r0 __asm__("$0"); + __asm__ __volatile__( + "call_pal %1 #whami" + : "=r"(__r0) + :"i" (PAL_whami) + : "$1", "$22", "$23", "$24", "$25"); + return __r0; +} + +#define smp_processor_id() (current->processor) #define cpu_logical_map(cpu) (cpu) +/* For the benefit of panic. */ +void smp_message_pass(int target, int msg, unsigned long data, int wait); + #endif /* __SMP__ */ #define NO_PROC_ID (-1) diff --git a/include/asm-alpha/smplock.h b/include/asm-alpha/smplock.h index e62326a10..a33fd546a 100644 --- a/include/asm-alpha/smplock.h +++ b/include/asm-alpha/smplock.h @@ -3,6 +3,8 @@ * * Default SMP lock implementation */ + +#include <linux/sched.h> #include <linux/interrupt.h> #include <asm/spinlock.h> @@ -11,23 +13,22 @@ extern spinlock_t kernel_flag; /* * Release global kernel lock and global interrupt lock */ -#define release_kernel_lock(task, cpu) \ -do { \ - if (task->lock_depth >= 0) \ - spin_unlock(&kernel_flag); \ - release_irqlock(cpu); \ - __sti(); \ -} while (0) +static __inline__ void release_kernel_lock(struct task_struct *task, int cpu) +{ + if (task->lock_depth >= 0) + spin_unlock(&kernel_flag); + release_irqlock(cpu); + __sti(); +} /* * Re-acquire the kernel lock */ -#define reacquire_kernel_lock(task) \ -do { \ - if (task->lock_depth >= 0) \ - spin_lock(&kernel_flag); \ -} while (0) - +static __inline__ void reacquire_kernel_lock(struct task_struct *task) +{ + if (task->lock_depth >= 0) + spin_lock(&kernel_flag); +} /* * Getting the big kernel lock. @@ -36,13 +37,13 @@ do { \ * so we only need to worry about other * CPU's. */ -extern __inline__ void lock_kernel(void) +static __inline__ void lock_kernel(void) { if (!++current->lock_depth) spin_lock(&kernel_flag); } -extern __inline__ void unlock_kernel(void) +static __inline__ void unlock_kernel(void) { if (--current->lock_depth < 0) spin_unlock(&kernel_flag); diff --git a/include/asm-alpha/softirq.h b/include/asm-alpha/softirq.h index f49bad83f..b47281a3b 100644 --- a/include/asm-alpha/softirq.h +++ b/include/asm-alpha/softirq.h @@ -1,6 +1,7 @@ #ifndef _ALPHA_SOFTIRQ_H #define _ALPHA_SOFTIRQ_H +#include <linux/stddef.h> #include <asm/atomic.h> #include <asm/hardirq.h> diff --git a/include/asm-alpha/spinlock.h b/include/asm-alpha/spinlock.h index 1c7afd449..5fae6e924 100644 --- a/include/asm-alpha/spinlock.h +++ b/include/asm-alpha/spinlock.h @@ -1,22 +1,24 @@ #ifndef _ALPHA_SPINLOCK_H #define _ALPHA_SPINLOCK_H +#include <asm/system.h> + #ifndef __SMP__ /* gcc 2.7.2 can crash initializing an empty structure. */ typedef struct { int dummy; } spinlock_t; #define SPIN_LOCK_UNLOCKED { 0 } -#define spin_lock_init(lock) do { } while(0) -#define spin_lock(lock) do { } while(0) -#define spin_trylock(lock) do { } while(0) -#define spin_unlock_wait(lock) do { } while(0) -#define spin_unlock(lock) do { } while(0) -#define spin_lock_irq(lock) setipl(7) -#define spin_unlock_irq(lock) setipl(0) +#define spin_lock_init(lock) ((void) 0) +#define spin_lock(lock) ((void) 0) +#define spin_trylock(lock) ((void) 0) +#define spin_unlock_wait(lock) ((void) 0) +#define spin_unlock(lock) ((void) 0) +#define spin_lock_irq(lock) cli() +#define spin_unlock_irq(lock) sti() -#define spin_lock_irqsave(lock, flags) do { (flags) = swpipl(7); } while (0) -#define spin_unlock_irqrestore(lock, flags) setipl(flags) +#define spin_lock_irqsave(lock, flags) save_and_cli(flags) +#define spin_unlock_irqrestore(lock, flags) restore_flags(flags) /* * Read-write spinlocks, allowing multiple readers @@ -31,26 +33,30 @@ typedef struct { int dummy; } spinlock_t; typedef struct { int dummy; } rwlock_t; #define RW_LOCK_UNLOCKED { 0 } -#define read_lock(lock) do { } while(0) -#define read_unlock(lock) do { } while(0) -#define write_lock(lock) do { } while(0) -#define write_unlock(lock) do { } while(0) -#define read_lock_irq(lock) cli() -#define read_unlock_irq(lock) sti() -#define write_lock_irq(lock) cli() -#define write_unlock_irq(lock) sti() +#define read_lock(lock) ((void) 0) +#define read_unlock(lock) ((void) 0) +#define write_lock(lock) ((void) 0) +#define write_unlock(lock) ((void) 0) +#define read_lock_irq(lock) cli() +#define read_unlock_irq(lock) sti() +#define write_lock_irq(lock) cli() +#define write_unlock_irq(lock) sti() -#define read_lock_irqsave(lock, flags) do { (flags) = swpipl(7); } while (0) -#define read_unlock_irqrestore(lock, flags) setipl(flags) -#define write_lock_irqsave(lock, flags) do { (flags) = swpipl(7); } while (0) -#define write_unlock_irqrestore(lock, flags) setipl(flags) +#define read_lock_irqsave(lock, flags) save_and_cli(flags) +#define read_unlock_irqrestore(lock, flags) restore_flags(flags) +#define write_lock_irqsave(lock, flags) save_and_cli(flags) +#define write_unlock_irqrestore(lock, flags) restore_flags(flags) #else /* __SMP__ */ #include <linux/kernel.h> #include <asm/current.h> -/* Simple spin lock operations. There are two variants, one clears IRQ's +#define DEBUG_SPINLOCK 1 +#define DEBUG_RWLOCK 1 + +/* + * Simple spin lock operations. There are two variants, one clears IRQ's * on the local processor, one does not. * * We make no fairness assumptions. They have a cost. @@ -58,34 +64,21 @@ typedef struct { int dummy; } rwlock_t; typedef struct { volatile unsigned long lock; - unsigned long previous; - unsigned long task; + void *previous; + struct task_struct * task; } spinlock_t; -#define SPIN_LOCK_UNLOCKED { 0, 0 } +#define SPIN_LOCK_UNLOCKED { 0, 0, 0 } #define spin_lock_init(x) \ - do { (x)->lock = 0; (x)->previous = 0; } while(0) + ((x)->lock = 0, (x)->previous = 0, (x)->task = 0) #define spin_unlock_wait(x) \ - do { barrier(); } while(((volatile spinlock_t *)x)->lock) + ({ do { barrier(); } while(((volatile spinlock_t *)x)->lock); }) typedef struct { unsigned long a[100]; } __dummy_lock_t; #define __dummy_lock(lock) (*(__dummy_lock_t *)(lock)) -static inline void spin_unlock(spinlock_t * lock) -{ - __asm__ __volatile__( - "mb; stq $31,%0" - :"=m" (__dummy_lock(lock))); -} - -#if 1 -#define DEBUG_SPINLOCK -#else -#undef DEBUG_SPINLOCK -#endif - -#ifdef DEBUG_SPINLOCK +#if DEBUG_SPINLOCK extern void spin_lock(spinlock_t * lock); #else static inline void spin_lock(spinlock_t * lock) @@ -101,94 +94,79 @@ static inline void spin_lock(spinlock_t * lock) " or %0,1,%0\n" " stq_c %0,%1\n" " beq %0,2f\n" - "4: mb\n" + " mb\n" ".section .text2,\"ax\"\n" "2: ldq %0,%1\n" " blbs %0,2b\n" " br 1b\n" ".previous" - : "=r" (tmp), - "=m" (__dummy_lock(lock))); + : "=r" (tmp), "=m" (__dummy_lock(lock)) + : "m"(__dummy_lock(lock))); } #endif /* DEBUG_SPINLOCK */ +static inline void spin_unlock(spinlock_t * lock) +{ + mb(); + lock->lock = 0; +} + #define spin_trylock(lock) (!test_and_set_bit(0,(lock))) #define spin_lock_irq(lock) \ - do { __cli(); spin_lock(lock); } while (0) - + (__cli(), spin_lock(lock)) #define spin_unlock_irq(lock) \ - do { spin_unlock(lock); __sti(); } while (0) - + (spin_unlock(lock), __sti()) #define spin_lock_irqsave(lock, flags) \ - do { __save_and_cli(flags); spin_lock(lock); } while (0) - + (__save_and_cli(flags), spin_lock(lock)) #define spin_unlock_irqrestore(lock, flags) \ - do { spin_unlock(lock); __restore_flags(flags); } while (0) + (spin_unlock(lock), __restore_flags(flags)) /***********************************************************/ -#if 1 -#define DEBUG_RWLOCK -#else -#undef DEBUG_RWLOCK -#endif - typedef struct { volatile int write_lock:1, read_counter:31; } rwlock_t; #define RW_LOCK_UNLOCKED { 0, 0 } -#ifdef DEBUG_RWLOCK +#if DEBUG_RWLOCK extern void write_lock(rwlock_t * lock); +extern void read_lock(rwlock_t * lock); #else static inline void write_lock(rwlock_t * lock) { - long regx, regy; + long regx; __asm__ __volatile__( - "1: ldl_l %1,%0;" - " blbs %1,6f;" - " or %1,1,%2;" - " stl_c %2,%0;" - " beq %2,6f;" - " blt %1,8f;" - "4: mb\n" + "1: ldl_l %1,%0\n" + " bne %1,6f\n" + " or $31,1,%1\n" + " stl_c %1,%0\n" + " beq %1,6f\n" + " mb\n" ".section .text2,\"ax\"\n" - "6: ldl %1,%0;" - " blbs %1,6b;" - " br 1b;" - "8: ldl %1,%0;" - " blt %1,8b;" - "9: br 4b\n" + "6: ldl %1,%0\n" + " bne %1,6b\n" + " br 1b\n" ".previous" - : "=m" (__dummy_lock(lock)), "=&r" (regx), "=&r" (regy) + : "=m" (__dummy_lock(lock)), "=&r" (regx) : "0" (__dummy_lock(lock)) ); } -#endif /* DEBUG_RWLOCK */ -static inline void write_unlock(rwlock_t * lock) -{ - __asm__ __volatile__("mb; stl $31,%0" : "=m" (__dummy_lock(lock))); -} - -#ifdef DEBUG_RWLOCK -extern void _read_lock(rwlock_t * lock); -#else -static inline void _read_lock(rwlock_t * lock) +static inline void read_lock(rwlock_t * lock) { long regx; __asm__ __volatile__( - "1: ldl_l %1,%0;" - " blbs %1,6f;" - " subl %1,2,%1;" - " stl_c %1,%0;" - " beq %1,6f;" + "1: ldl_l %1,%0\n" + " blbs %1,6f\n" + " subl %1,2,%1\n" + " stl_c %1,%0\n" + " beq %1,6f\n" "4: mb\n" ".section .text2,\"ax\"\n" - "6: ldl %1,%0;" - " blbs %1,6b;" + "6: ldl %1,%0\n" + " blbs %1,6b\n" " br 1b\n" ".previous" : "=m" (__dummy_lock(lock)), "=&r" (regx) @@ -197,21 +175,20 @@ static inline void _read_lock(rwlock_t * lock) } #endif /* DEBUG_RWLOCK */ -#define read_lock(lock) \ -do { unsigned long flags; \ - __save_and_cli(flags); \ - _read_lock(lock); \ - __restore_flags(flags); \ -} while(0) +static inline void write_unlock(rwlock_t * lock) +{ + mb(); + *(volatile int *)lock = 0; +} -static inline void _read_unlock(rwlock_t * lock) +static inline void read_unlock(rwlock_t * lock) { long regx; __asm__ __volatile__( - "1: ldl_l %1,%0;" - " addl %1,2,%1;" - " stl_c %1,%0;" - " beq %1,6f;" + "1: ldl_l %1,%0\n" + " addl %1,2,%1\n" + " stl_c %1,%0\n" + " beq %1,6f\n" ".section .text2,\"ax\"\n" "6: br 1b\n" ".previous" @@ -219,26 +196,19 @@ static inline void _read_unlock(rwlock_t * lock) : "0" (__dummy_lock(lock))); } -#define read_unlock(lock) \ -do { unsigned long flags; \ - __save_and_cli(flags); \ - _read_unlock(lock); \ - __restore_flags(flags); \ -} while(0) - -#define read_lock_irq(lock) do { __cli(); _read_lock(lock); } while (0) -#define read_unlock_irq(lock) do { _read_unlock(lock); __sti(); } while (0) -#define write_lock_irq(lock) do { __cli(); write_lock(lock); } while (0) -#define write_unlock_irq(lock) do { write_unlock(lock); __sti(); } while (0) +#define read_lock_irq(lock) (__cli(), read_lock(lock)) +#define read_unlock_irq(lock) (read_unlock(lock), __sti()) +#define write_lock_irq(lock) (__cli(), write_lock(lock)) +#define write_unlock_irq(lock) (write_unlock(lock), __sti()) #define read_lock_irqsave(lock, flags) \ - do { __save_and_cli(flags); _read_lock(lock); } while (0) + (__save_and_cli(flags), read_lock(lock)) #define read_unlock_irqrestore(lock, flags) \ - do { _read_unlock(lock); __restore_flags(flags); } while (0) + (read_unlock(lock), __restore_flags(flags)) #define write_lock_irqsave(lock, flags) \ - do { __save_and_cli(flags); write_lock(lock); } while (0) + (__save_and_cli(flags), write_lock(lock)) #define write_unlock_irqrestore(lock, flags) \ - do { write_unlock(lock); __restore_flags(flags); } while (0) + (write_unlock(lock), __restore_flags(flags)) #endif /* SMP */ #endif /* _ALPHA_SPINLOCK_H */ diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h index a4f18c347..4ed5d5481 100644 --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h @@ -1,7 +1,8 @@ #ifndef __ALPHA_SYSTEM_H #define __ALPHA_SYSTEM_H -#include <asm/pal.h> /* for backwards compatibility... */ +#include <asm/pal.h> +#include <asm/page.h> /* * System defines.. Note that this is included both from .c and .S @@ -13,23 +14,21 @@ * the initial process structure. Also, the console eats 3 MB for * the initial bootloader (one of which we can reclaim later). * With a few other pages for various reasons, we'll use an initial - * load address of 0xfffffc0000310000UL + * load address of PAGE_OFFSET+0x310000UL */ #define BOOT_PCB 0x20000000 #define BOOT_ADDR 0x20000000 /* Remove when official MILO sources have ELF support: */ #define BOOT_SIZE (16*1024) -#define KERNEL_START 0xfffffc0000300000 -#define SWAPPER_PGD 0xfffffc0000300000 -#define INIT_STACK 0xfffffc0000302000 -#define EMPTY_PGT 0xfffffc0000304000 -#define EMPTY_PGE 0xfffffc0000308000 -#define ZERO_PGE 0xfffffc000030A000 +#define KERNEL_START (PAGE_OFFSET+0x300000) +#define SWAPPER_PGD (PAGE_OFFSET+0x300000) +#define INIT_STACK (PAGE_OFFSET+0x302000) +#define EMPTY_PGT (PAGE_OFFSET+0x304000) +#define EMPTY_PGE (PAGE_OFFSET+0x308000) +#define ZERO_PGE (PAGE_OFFSET+0x30A000) -#define START_ADDR 0xfffffc0000310000 -/* Remove when official MILO sources have ELF support: */ -#define START_SIZE (2*1024*1024) +#define START_ADDR (PAGE_OFFSET+0x310000) #ifndef __ASSEMBLY__ @@ -96,11 +95,12 @@ extern void wrmces (unsigned long); extern unsigned long whami(void); extern void wripir(unsigned long); -#define halt() __asm__ __volatile__ ("call_pal %0" : : "i" (PAL_halt) : "memory") +#define halt() \ +__asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt) : "memory") -#define switch_to(prev,next) do { \ - current = next; \ - alpha_switch_to((unsigned long) ¤t->tss - IDENT_ADDR); \ +#define switch_to(prev,next) do { \ + current = next; \ + alpha_switch_to((unsigned long) ¤t->tss - IDENT_ADDR); \ } while (0) extern void alpha_switch_to(unsigned long pctxp); @@ -112,127 +112,101 @@ __asm__ __volatile__("mb": : :"memory") __asm__ __volatile__("wmb": : :"memory") #define imb() \ -__asm__ __volatile__ ("call_pal %0" : : "i" (PAL_imb) : "memory") +__asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory") #define draina() \ -__asm__ __volatile__ ("call_pal %0" : : "i" (PAL_draina) : "memory") - -#define call_pal1(palno,arg) \ -({ \ - register unsigned long __r0 __asm__("$0"); \ - register unsigned long __r16 __asm__("$16"); __r16 = arg; \ - __asm__ __volatile__( \ - "call_pal %3" \ - :"=r" (__r0),"=r" (__r16) \ - :"1" (__r16),"i" (palno) \ - :"$1", "$22", "$23", "$24", "$25", "memory"); \ - __r0; \ +__asm__ __volatile__ ("call_pal %0 #draina" : : "i" (PAL_draina) : "memory") + +#define call_pal1(palno,arg) \ +({ \ + register unsigned long __r0 __asm__("$0"); \ + register unsigned long __r16 __asm__("$16"); __r16 = arg; \ + __asm__ __volatile__( \ + "call_pal %3 #call_pal1" \ + :"=r" (__r0),"=r" (__r16) \ + :"1" (__r16),"i" (palno) \ + :"$1", "$22", "$23", "$24", "$25", "memory"); \ + __r0; \ }) -#define getipl() \ -({ \ - register unsigned long r0 __asm__("$0"); \ - __asm__ __volatile__( \ - "call_pal %1" \ - :"=r" (r0) \ - :"i" (PAL_rdps) \ - :"$1", "$16", "$22", "$23", "$24", "$25", "memory"); \ - r0; \ +#define getipl() \ +({ \ + register unsigned long r0 __asm__("$0"); \ + __asm__ __volatile__( \ + "call_pal %1 #getipl" \ + :"=r" (r0) \ + :"i" (PAL_rdps) \ + :"$1", "$16", "$22", "$23", "$24", "$25", "memory"); \ + r0; \ }) -#ifdef THE_OLD_VERSION -#define setipl(ipl) \ -do { \ - register unsigned long __r16 __asm__("$16") = (ipl); \ - __asm__ __volatile__( \ - "call_pal %2" \ - :"=r" (__r16) \ - :"0" (__r16),"i" (PAL_swpipl) \ - :"$0", "$1", "$22", "$23", "$24", "$25", "memory"); \ -} while (0) - -#define swpipl(ipl) \ -({ \ - register unsigned long __r0 __asm__("$0"); \ - register unsigned long __r16 __asm__("$16") = (ipl); \ - __asm__ __volatile__( \ - "call_pal %3" \ - :"=r" (__r0),"=r" (__r16) \ - :"1" (__r16),"i" (PAL_swpipl) \ - :"$1", "$22", "$23", "$24", "$25", "memory"); \ - __r0; \ +#define setipl(ipl) \ +({ \ + register unsigned long __r16 __asm__("$16"); __r16 = (ipl); \ + __asm__ __volatile__( \ + "call_pal %2 #setipl" \ + :"=r" (__r16) \ + :"0" (__r16),"i" (PAL_swpipl) \ + :"$0", "$1", "$22", "$23", "$24", "$25", "memory"); \ }) -#else -#define setipl(ipl) \ -do { \ - __asm__ __volatile__( \ - "mov %0,$16; call_pal %1" \ - : /* no output */ \ - :"i,r" (ipl), "i,i" (PAL_swpipl) \ - :"$0", "$1", "$16", "$22", "$23", "$24", "$25", "memory"); \ -} while (0) -#define swpipl(ipl) \ -({ \ - register unsigned long __r0 __asm__("$0"); \ - __asm__ __volatile__( \ - "mov %0,$16; call_pal %1" \ - : /* no output (bound to the template) */ \ - : "i,r" (ipl), "i,i" (PAL_swpipl) \ - : "$0", "$1", "$16", "$22", "$23", "$24", "$25", "memory"); \ - __r0; \ +#define swpipl(ipl) \ +({ \ + register unsigned long __r0 __asm__("$0"); \ + register unsigned long __r16 __asm__("$16") = (ipl); \ + __asm__ __volatile__( \ + "call_pal %3 #swpipl" \ + :"=r" (__r0),"=r" (__r16) \ + :"1" (__r16),"i" (PAL_swpipl) \ + :"$1", "$22", "$23", "$24", "$25", "memory"); \ + __r0; \ }) -#endif #define __cli() setipl(7) #define __sti() setipl(0) -#define __save_flags(flags) do { (flags) = getipl(); } while (0) -#define __save_and_cli(flags) do { (flags) = swpipl(7); } while (0) +#define __save_flags(flags) ((flags) = getipl()) +#define __save_and_cli(flags) ((flags) = swpipl(7)) #define __restore_flags(flags) setipl(flags) #ifdef __SMP__ -extern unsigned char global_irq_holder; - -#define save_flags(x) \ -do { \ - (x) = ((global_irq_holder == (unsigned char) smp_processor_id()) \ - ? 1 \ - : ((getipl() & 7) ? 2 : 0)); \ -} while (0) +extern int global_irq_holder; -#define save_and_cli(flags) do { save_flags(flags); cli(); } while(0) +#define save_and_cli(flags) (save_flags(flags), cli()) extern void __global_cli(void); extern void __global_sti(void); +extern unsigned long __global_save_flags(void); extern void __global_restore_flags(unsigned long flags); #define cli() __global_cli() #define sti() __global_sti() +#define save_flags(flags) ((flags) = __global_save_flags()) #define restore_flags(flags) __global_restore_flags(flags) #else /* __SMP__ */ -#define cli() setipl(7) -#define sti() setipl(0) -#define save_flags(flags) do { (flags) = getipl(); } while (0) -#define save_and_cli(flags) do { (flags) = swpipl(7); } while (0) -#define restore_flags(flags) setipl(flags) +#define cli() __cli() +#define sti() __sti() +#define save_flags(flags) __save_flags(flags) +#define save_and_cli(flags) __save_and_cli(flags) +#define restore_flags(flags) __restore_flags(flags) #endif /* __SMP__ */ /* * TB routines.. */ -#define __tbi(nr,arg,arg1...) do { \ - register unsigned long __r16 __asm__("$16") = (nr); \ - register unsigned long __r17 __asm__("$17"); arg; \ - __asm__ __volatile__( \ - "call_pal %3" \ - :"=r" (__r16),"=r" (__r17) \ - :"0" (__r16),"i" (PAL_tbi) ,##arg1 \ - :"$0", "$1", "$22", "$23", "$24", "$25"); \ -} while (0) +#define __tbi(nr,arg,arg1...) \ +({ \ + register unsigned long __r16 __asm__("$16") = (nr); \ + register unsigned long __r17 __asm__("$17"); arg; \ + __asm__ __volatile__( \ + "call_pal %3 #__tbi" \ + :"=r" (__r16),"=r" (__r17) \ + :"0" (__r16),"i" (PAL_tbi) ,##arg1 \ + :"$0", "$1", "$22", "$23", "$24", "$25"); \ +}) #define tbi(x,y) __tbi(x,__r17=(y),"1" (__r17)) #define tbisi(x) __tbi(1,__r17=(x),"1" (__r17)) @@ -244,10 +218,10 @@ extern void __global_restore_flags(unsigned long flags); /* * Give prototypes to shut up gcc. */ -extern __inline__ unsigned long xchg_u32 (volatile int * m, unsigned long val); -extern __inline__ unsigned long xchg_u64 (volatile long * m, unsigned long val); +extern __inline__ unsigned long xchg_u32(volatile int *m, unsigned long val); +extern __inline__ unsigned long xchg_u64(volatile long *m, unsigned long val); -extern __inline__ unsigned long xchg_u32(volatile int * m, unsigned long val) +extern __inline__ unsigned long xchg_u32(volatile int *m, unsigned long val) { unsigned long dummy; @@ -283,9 +257,6 @@ extern __inline__ unsigned long xchg_u64(volatile long * m, unsigned long val) return val; } -#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) -#define tas(ptr) (xchg((ptr),1)) - /* * This function doesn't exist, so you'll get a linker error * if something tries to do an invalid xchg(). @@ -296,7 +267,8 @@ extern __inline__ unsigned long xchg_u64(volatile long * m, unsigned long val) */ extern void __xchg_called_with_bad_pointer(void); -static __inline__ unsigned long __xchg(unsigned long x, volatile void * ptr, int size) +static __inline__ unsigned long +__xchg(unsigned long x, volatile void * ptr, int size) { switch (size) { case 4: @@ -308,6 +280,10 @@ static __inline__ unsigned long __xchg(unsigned long x, volatile void * ptr, int return x; } +#define xchg(ptr,x) \ + ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) +#define tas(ptr) (xchg((ptr),1)) + #endif /* __ASSEMBLY__ */ #endif diff --git a/include/asm-alpha/unistd.h b/include/asm-alpha/unistd.h index 6fcf82aff..9de6e47ad 100644 --- a/include/asm-alpha/unistd.h +++ b/include/asm-alpha/unistd.h @@ -23,7 +23,7 @@ #define __NR_lseek 19 #define __NR_getxpid 20 #define __NR_osf_mount 21 -#define __NR_osf_umount 22 +#define __NR_umount 22 #define __NR_setuid 23 #define __NR_getxuid 24 #define __NR_exec_with_loader 25 /* not implemented */ @@ -258,7 +258,7 @@ #define __NR_sysinfo 318 #define __NR__sysctl 319 #define __NR_idle 320 -#define __NR_umount 321 +#define __NR_oldumount 321 #define __NR_swapon 322 #define __NR_times 323 #define __NR_personality 324 @@ -508,12 +508,6 @@ static inline void idle(void) sys_idle(); } -extern int sys_setup(int); -static inline int setup(int magic) -{ - return sys_setup(magic); -} - extern int sys_open(const char *, int, int); static inline int open(const char * name, int mode, int flags) { diff --git a/include/asm-arm/arch-arc/irq.h b/include/asm-arm/arch-arc/irq.h index 937a79c3c..0faabaf4d 100644 --- a/include/asm-arm/arch-arc/irq.h +++ b/include/asm-arm/arch-arc/irq.h @@ -8,123 +8,138 @@ * 10-10-1996 RMK Brought up to date with arch-sa110eval * 22-10-1996 RMK Changed interrupt numbers & uses new inb/outb macros * 11-01-1998 RMK Added mask_and_ack_irq + * 22-08-1998 RMK Restructured IRQ routines */ -#define BUILD_IRQ(s,n,m) \ - void IRQ##n##_interrupt(void); \ - void fast_IRQ##n##_interrupt(void); \ - void bad_IRQ##n##_interrupt(void); \ - void probe_IRQ##n##_interrupt(void); +static void arc_mask_irq_ack_a(unsigned int irq) +{ + unsigned int temp; -/* - * The timer is a special interrupt - */ -#define IRQ5_interrupt timer_IRQ_interrupt + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]\n" +" strb %1, [%3]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKA)), + "r" (ioaddr(IOC_IRQCLRA))); +} + +static void arc_mask_irq_a(unsigned int irq) +{ + unsigned int temp; -#define IRQ_INTERRUPT(n) IRQ##n##_interrupt -#define FAST_INTERRUPT(n) fast_IRQ##n##_interrupt -#define BAD_INTERRUPT(n) bad_IRQ##n##_interrupt -#define PROBE_INTERRUPT(n) probe_IRQ##n##_interrupt + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKA))); +} + +static void arc_unmask_irq_a(unsigned int irq) +{ + unsigned int temp; -#define X(x) (x)|0x01, (x)|0x02, (x)|0x04, (x)|0x08, (x)|0x10, (x)|0x20, (x)|0x40, (x)|0x80 -#define Z(x) (x), (x), (x), (x), (x), (x), (x), (x) + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" orr %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKA))); +} -static __inline__ void mask_and_ack_irq(unsigned int irq) +static void arc_mask_irq_b(unsigned int irq) { - static const int addrmasks[] = { - X((IOC_IRQMASKA - IOC_BASE)<<18 | (1 << 15)), - X((IOC_IRQMASKB - IOC_BASE)<<18), - Z(0), - Z(0), - Z(0), - Z(0), - Z(0), - Z(0), - X((IOC_FIQMASK - IOC_BASE)<<18), - Z(0), - Z(0), - Z(0), - Z(0), - Z(0), - Z(0), - Z(0) - }; - unsigned int temp1, temp2; + unsigned int temp; __asm__ __volatile__( -" ldr %1, [%5, %3, lsl #2]\n" -" teq %1, #0\n" -" beq 2f\n" -" ldrb %0, [%2, %1, lsr #16]\n" + "ldrb %0, [%2]\n" " bic %0, %0, %1\n" -" strb %0, [%2, %1, lsr #16]\n" -" tst %1, #0x8000\n" /* do we need an IRQ clear? */ -" strneb %1, [%2, %4]\n" -"2:" - : "=&r" (temp1), "=&r" (temp2) - : "r" (ioaddr(IOC_BASE)), "r" (irq), - "I" ((IOC_IRQCLRA - IOC_BASE) << 2), "r" (addrmasks)); +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKB))); } -#undef X -#undef Z - -static __inline__ void mask_irq(unsigned int irq) +static void arc_unmask_irq_b(unsigned int irq) { - extern void ecard_disableirq (unsigned int); - extern void ecard_disablefiq (unsigned int); - unsigned char mask = 1 << (irq & 7); - - switch (irq >> 3) { - case 0: - outb(inb(IOC_IRQMASKA) & ~mask, IOC_IRQMASKA); - break; - case 1: - outb(inb(IOC_IRQMASKB) & ~mask, IOC_IRQMASKB); - break; - case 4: - ecard_disableirq (irq & 7); - break; - case 8: - outb(inb(IOC_FIQMASK) & ~mask, IOC_FIQMASK); - break; - case 12: - ecard_disablefiq (irq & 7); - } + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" orr %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKB))); } -static __inline__ void unmask_irq(unsigned int irq) +static void arc_mask_irq_fiq(unsigned int irq) { - extern void ecard_enableirq (unsigned int); - extern void ecard_enablefiq (unsigned int); - unsigned char mask = 1 << (irq & 7); - - switch (irq >> 3) { - case 0: - outb(inb(IOC_IRQMASKA) | mask, IOC_IRQMASKA); - break; - case 1: - outb(inb(IOC_IRQMASKB) | mask, IOC_IRQMASKB); - break; - case 4: - ecard_enableirq (irq & 7); - break; - case 8: - outb(inb(IOC_FIQMASK) | mask, IOC_FIQMASK); - break; - case 12: - ecard_enablefiq (irq & 7); - } + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_FIQMASK))); } -static __inline__ unsigned long get_enabled_irqs(void) +static void arc_unmask_irq_fiq(unsigned int irq) { - return inb(IOC_IRQMASKA) | inb(IOC_IRQMASKB) << 8; + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" orr %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_FIQMASK))); } static __inline__ void irq_init_irq(void) { + extern void ecard_disableirq(unsigned int irq); + extern void ecard_enableirq(unsigned int irq); + int irq; + outb(0, IOC_IRQMASKA); outb(0, IOC_IRQMASKB); outb(0, IOC_FIQMASK); + + for (irq = 0; irq < NR_IRQS; irq++) { + switch (irq & 0xf8) { + case 0 ... 6: + irq_desc[irq].probe_ok = 1; + case 7: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = arc_mask_irq_ack_a; + irq_desc[irq].mask = arc_mask_irq_a; + irq_desc[irq].unmask = arc_unmask_irq_a; + break; + + case 9 ... 15: + irq_desc[irq].probe_ok = 1; + case 8: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = arc_mask_irq_b; + irq_desc[irq].mask = arc_mask_irq_b; + irq_desc[irq].unmask = arc_unmask_irq_b; + break; + + case 32 ... 40: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = ecard_disableirq; + irq_desc[irq].mask = ecard_disableirq; + irq_desc[irq].unmask = ecard_enableirq; + break; + + case 64 ... 72: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = arc_mask_irq_fiq; + irq_desc[irq].mask = arc_mask_irq_fiq; + irq_desc[irq].unmask = arc_unmask_irq_fiq; + break; + } + } } diff --git a/include/asm-arm/arch-arc/uncompress.h b/include/asm-arm/arch-arc/uncompress.h index f378f1166..f8c274f86 100644 --- a/include/asm-arm/arch-arc/uncompress.h +++ b/include/asm-arm/arch-arc/uncompress.h @@ -102,3 +102,8 @@ static void arch_decomp_setup(void) if (params->nr_pages * params->page_size < 4096*1024) error("<4M of mem\n"); } + +/* + * nothing to do + */ +#define arch_decomp_wdog() diff --git a/include/asm-arm/arch-ebsa110/irq.h b/include/asm-arm/arch-ebsa110/irq.h index 18ddf053b..2f8b804d5 100644 --- a/include/asm-arm/arch-ebsa110/irq.h +++ b/include/asm-arm/arch-ebsa110/irq.h @@ -1,39 +1,35 @@ /* * include/asm-arm/arch-ebsa110/irq.h * - * Copyright (C) 1996,1997,1998 Russell King + * Copyright (C) 1996-1998 Russell King + * + * Changelog: + * 22-08-1998 RMK Restructured IRQ routines */ #define IRQ_MCLR ((volatile unsigned char *)0xf3000000) #define IRQ_MSET ((volatile unsigned char *)0xf2c00000) #define IRQ_MASK ((volatile unsigned char *)0xf2c00000) -static __inline__ void mask_and_ack_irq(unsigned int irq) +static void ebsa110_mask_and_ack_irq(unsigned int irq) { - if (irq < 8) - *IRQ_MCLR = 1 << irq; + *IRQ_MCLR = 1 << irq; } -static __inline__ void mask_irq(unsigned int irq) +static void ebsa110_mask_irq(unsigned int irq) { - if (irq < 8) - *IRQ_MCLR = 1 << irq; + *IRQ_MCLR = 1 << irq; } -static __inline__ void unmask_irq(unsigned int irq) +static void ebsa110_unmask_irq(unsigned int irq) { - if (irq < 8) - *IRQ_MSET = 1 << irq; + *IRQ_MSET = 1 << irq; } -static __inline__ unsigned long get_enabled_irqs(void) -{ - return 0; -} - static __inline__ void irq_init_irq(void) { unsigned long flags; + int irq; save_flags_cli (flags); *IRQ_MCLR = 0xff; @@ -43,4 +39,12 @@ static __inline__ void irq_init_irq(void) while (1); *IRQ_MCLR = 0xff; /* clear all interrupt enables */ restore_flags (flags); + + for (irq = 0; irq < NR_IRQS; irq++) { + irq_desc[irq].valid = 1; + irq_desc[irq].probe_ok = 1; + irq_desc[irq].mask_ack = ebsa110_mask_and_ack_irq; + irq_desc[irq].mask = ebsa110_mask_irq; + irq_desc[irq].unmask = ebsa110_unmask_irq; + } } diff --git a/include/asm-arm/arch-ebsa110/irqs.h b/include/asm-arm/arch-ebsa110/irqs.h index 909a6f169..0add03e59 100644 --- a/include/asm-arm/arch-ebsa110/irqs.h +++ b/include/asm-arm/arch-ebsa110/irqs.h @@ -4,16 +4,13 @@ * Copyright (C) 1996 Russell King */ -#define IRQ_PRINTER 0 -#define IRQ_COM1 1 -#define IRQ_COM2 2 -#define IRQ_ETHERNET 3 -#define IRQ_TIMER0 4 -#define IRQ_TIMER1 5 -#define IRQ_PCMCIA 6 -#define IRQ_IMMEDIATE 7 - -#define IRQ_TIMER IRQ_TIMER0 - -#define irq_cannonicalize(i) (i) +#define NR_IRQS 8 +#define IRQ_EBSA110_PRINTER 0 +#define IRQ_EBSA110_COM1 1 +#define IRQ_EBSA110_COM2 2 +#define IRQ_EBSA110_ETHERNET 3 +#define IRQ_EBSA110_TIMER0 4 +#define IRQ_EBSA110_TIMER1 5 +#define IRQ_EBSA110_PCMCIA 6 +#define IRQ_EBSA110_IMMEDIATE 7 diff --git a/include/asm-arm/arch-ebsa110/mm-init.h b/include/asm-arm/arch-ebsa110/mm-init.h index 3e3794140..c6937abd0 100644 --- a/include/asm-arm/arch-ebsa110/mm-init.h +++ b/include/asm-arm/arch-ebsa110/mm-init.h @@ -3,4 +3,3 @@ * * Copyright (C) 1996,1997,1998 Russell King */ - diff --git a/include/asm-arm/arch-ebsa110/mmu.h b/include/asm-arm/arch-ebsa110/mmu.h index 07006f82e..97776045d 100644 --- a/include/asm-arm/arch-ebsa110/mmu.h +++ b/include/asm-arm/arch-ebsa110/mmu.h @@ -10,9 +10,6 @@ #ifndef __ASM_ARCH_MMU_H #define __ASM_ARCH_MMU_H -/* - * On ebsa, the dram is contiguous - */ #define __virt_to_phys__is_a_macro #define __virt_to_phys(vpage) ((vpage) - PAGE_OFFSET) #define __phys_to_virt__is_a_macro diff --git a/include/asm-arm/arch-ebsa110/param.h b/include/asm-arm/arch-ebsa110/param.h new file mode 100644 index 000000000..865d8cc7a --- /dev/null +++ b/include/asm-arm/arch-ebsa110/param.h @@ -0,0 +1,8 @@ +/* + * linux/include/asm-arm/arch-ebsa110/param.h + * + * Copyright (C) 1996 Russell King + * Copyright (C) 1998 Philip Blundell + */ + +#define HZ 100 diff --git a/include/asm-arm/arch-ebsa110/system.h b/include/asm-arm/arch-ebsa110/system.h index 7a2957cae..a28161cb2 100644 --- a/include/asm-arm/arch-ebsa110/system.h +++ b/include/asm-arm/arch-ebsa110/system.h @@ -1,7 +1,7 @@ /* * linux/include/asm-arm/arch-ebsa110/system.h * - * Copyright (c) 1996,1997,1998 Russell King. + * Copyright (c) 1996-1998 Russell King. */ #ifndef __ASM_ARCH_SYSTEM_H #define __ASM_ARCH_SYSTEM_H diff --git a/include/asm-arm/arch-ebsa110/time.h b/include/asm-arm/arch-ebsa110/time.h index 84d04d90f..5b1447b7e 100644 --- a/include/asm-arm/arch-ebsa110/time.h +++ b/include/asm-arm/arch-ebsa110/time.h @@ -7,9 +7,14 @@ * * Changelog: * 10-Oct-1996 RMK Created - * 04-Dec-1997 RMK Updated for new arch/arm/time.c + * 04-Dec-1997 RMK Updated for new arch/arm/kernel/time.c + * 07-Aug-1998 RMK Updated for arch/arm/kernel/leds.c */ +#include <asm/leds.h> + +#define IRQ_TIMER IRQ_EBSA110_TIMER0 + #define MCLK_47_8 #if defined(MCLK_42_3) @@ -49,7 +54,7 @@ extern __inline__ int reset_timer (void) if (--count == 0) { count = 50; - *(volatile unsigned char *)0xf2400000 ^= 128; + leds_event(led_timer); } if (divisor == 0) { diff --git a/include/asm-arm/arch-ebsa110/timex.h b/include/asm-arm/arch-ebsa110/timex.h index 86bb588e7..06acb9dfc 100644 --- a/include/asm-arm/arch-ebsa110/timex.h +++ b/include/asm-arm/arch-ebsa110/timex.h @@ -1,7 +1,7 @@ /* * linux/include/asm-arm/arch-ebsa110/timex.h * - * RiscPC architecture timex specifications + * EBSA110 architecture timex specifications * * Copyright (C) 1997, 1998 Russell King */ diff --git a/include/asm-arm/arch-ebsa110/uncompress.h b/include/asm-arm/arch-ebsa110/uncompress.h index d5260b027..d6097d43f 100644 --- a/include/asm-arm/arch-ebsa110/uncompress.h +++ b/include/asm-arm/arch-ebsa110/uncompress.h @@ -31,3 +31,4 @@ static void puts(const char *s) * nothing to do */ #define arch_decomp_setup() +#define arch_decomp_wdog() diff --git a/include/asm-arm/arch-ebsa285/dma.h b/include/asm-arm/arch-ebsa285/dma.h index 96a265927..d3a2aa0c9 100644 --- a/include/asm-arm/arch-ebsa285/dma.h +++ b/include/asm-arm/arch-ebsa285/dma.h @@ -1,29 +1,35 @@ /* - * linux/include/asm-arm/arch-ebsa110/dma.h + * linux/include/asm-arm/arch-ebsa285/dma.h * - * Architecture DMA routes + * Architecture DMA routines * - * Copyright (C) 1997.1998 Russell King + * Copyright (C) 1998 Russell King + * Copyright (C) 1998 Philip Blundell */ #ifndef __ASM_ARCH_DMA_H #define __ASM_ARCH_DMA_H /* * This is the maximum DMA address that can be DMAd to. - * There should not be more than (0xd0000000 - 0xc0000000) - * bytes of RAM. */ -#define MAX_DMA_ADDRESS 0xd0000000 +#define MAX_DMA_ADDRESS 0xffffffff /* * DMA modes - we have two, IN and OUT */ -typedef enum { - DMA_MODE_READ, - DMA_MODE_WRITE -} dmamode_t; -#define MAX_DMA_CHANNELS 8 +typedef int dmamode_t; +#define DMA_MODE_READ 0x44 +#define DMA_MODE_WRITE 0x48 -#endif /* _ASM_ARCH_DMA_H */ +/* + * The 21285 has two internal DMA channels; we call these 0 and 1. + * On CATS hardware we have an additional eight ISA dma channels + * numbered 2..9. + */ +#define MAX_DMA_CHANNELS 10 +#define DMA_ISA_BASE 2 +#define DMA_FLOPPY (DMA_ISA_BASE + 2) + +#endif /* _ASM_ARCH_DMA_H */ diff --git a/include/asm-arm/arch-ebsa285/irq.h b/include/asm-arm/arch-ebsa285/irq.h index ece9464cd..029b1b1a6 100644 --- a/include/asm-arm/arch-ebsa285/irq.h +++ b/include/asm-arm/arch-ebsa285/irq.h @@ -1,34 +1,34 @@ /* - * include/asm-arm/arch-ebsa110/irq.h + * include/asm-arm/arch-ebsa285/irq.h * - * Copyright (C) 1996,1997,1998 Russell King + * Copyright (C) 1996-1998 Russell King + * + * Changelog: + * 22-08-1998 RMK Restructured IRQ routines */ -static __inline__ void mask_and_ack_irq(unsigned int irq) +static void ebsa285_mask_irq(unsigned int irq) { - if (irq < 32) - *CSR_IRQ_DISABLE = 1 << irq; + *CSR_IRQ_DISABLE = 1 << irq; } -static __inline__ void mask_irq(unsigned int irq) +static void ebsa285_unmask_irq(unsigned int irq) { - if (irq < 32) - *CSR_IRQ_DISABLE = 1 << irq; -} - -static __inline__ void unmask_irq(unsigned int irq) -{ - if (irq < 32) - *CSR_IRQ_ENABLE = 1 << irq; + *CSR_IRQ_ENABLE = 1 << irq; } -static __inline__ unsigned long get_enabled_irqs(void) -{ - return 0; -} - static __inline__ void irq_init_irq(void) { + int irq; + *CSR_IRQ_DISABLE = -1; *CSR_FIQ_DISABLE = -1; + + for (irq = 0; irq < NR_IRQS; irq++) { + irq_desc[irq].valid = 1; + irq_desc[irq].probe_ok = 1; + irq_desc[irq].mask_ack = ebsa285_mask_irq; + irq_desc[irq].mask = ebsa285_mask_irq; + irq_desc[irq].unmask = ebsa285_unmask_irq; + } } diff --git a/include/asm-arm/arch-ebsa285/param.h b/include/asm-arm/arch-ebsa285/param.h new file mode 100644 index 000000000..021282dd7 --- /dev/null +++ b/include/asm-arm/arch-ebsa285/param.h @@ -0,0 +1,8 @@ +/* + * linux/include/asm-arm/arch-ebsa285/param.h + * + * Copyright (C) 1996 Russell King + * Copyright (C) 1998 Philip Blundell + */ + +#define HZ 100 diff --git a/include/asm-arm/arch-ebsa285/serial.h b/include/asm-arm/arch-ebsa285/serial.h index e824c8d31..0e8479ff8 100644 --- a/include/asm-arm/arch-ebsa285/serial.h +++ b/include/asm-arm/arch-ebsa285/serial.h @@ -38,4 +38,3 @@ { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS13 */ #endif - diff --git a/include/asm-arm/arch-ebsa285/uncompress.h b/include/asm-arm/arch-ebsa285/uncompress.h index d5260b027..d6097d43f 100644 --- a/include/asm-arm/arch-ebsa285/uncompress.h +++ b/include/asm-arm/arch-ebsa285/uncompress.h @@ -31,3 +31,4 @@ static void puts(const char *s) * nothing to do */ #define arch_decomp_setup() +#define arch_decomp_wdog() diff --git a/include/asm-arm/arch-nexuspci/irq.h b/include/asm-arm/arch-nexuspci/irq.h index cf25a5dea..7b03006dd 100644 --- a/include/asm-arm/arch-nexuspci/irq.h +++ b/include/asm-arm/arch-nexuspci/irq.h @@ -2,6 +2,9 @@ * include/asm-arm/arch-nexuspci/irq.h * * Copyright (C) 1998 Philip Blundell + * + * Changelog: + * 22-08-1998 RMK Restructured IRQ routines */ #include <asm/io.h> @@ -10,29 +13,28 @@ extern unsigned long soft_irq_mask; -static __inline__ void mask_irq(unsigned int irq) +static void nexuspci_mask_irq(unsigned int irq) { writel((irq << 1), INTCONT); soft_irq_mask &= ~(1<<irq); } -#define mask_and_ack_irq(_x) mask_irq(_x) - -static __inline__ void unmask_irq(unsigned int irq) +static void nexuspci_unmask_irq(unsigned int irq) { writel((irq << 1) + 1, INTCONT); soft_irq_mask |= (1<<irq); } -static __inline__ unsigned long get_enabled_irqs(void) -{ - return soft_irq_mask; -} - static __inline__ void irq_init_irq(void) { unsigned int i; /* Disable all interrupts initially. */ - for (i = 0; i < NR_IRQS; i++) + for (i = 0; i < NR_IRQS; i++) { + irq_desc[i].valid = 1; + irq_desc[i].probe_ok = 1; + irq_desc[i].mask_ack = nexuspci_mask_irq; + irq_desc[i].mask = nexuspci_mask_irq; + irq_desc[i].unmask = nexuspci_unmask_irq; mask_irq(i); + } } diff --git a/include/asm-arm/arch-nexuspci/param.h b/include/asm-arm/arch-nexuspci/param.h new file mode 100644 index 000000000..f663d01f2 --- /dev/null +++ b/include/asm-arm/arch-nexuspci/param.h @@ -0,0 +1,8 @@ +/* + * linux/include/asm-arm/arch-nexuspci/param.h + * + * Copyright (C) 1996 Russell King + * Copyright (C) 1998 Philip Blundell + */ + +#define HZ 100 diff --git a/include/asm-arm/arch-rpc/irq.h b/include/asm-arm/arch-rpc/irq.h index 9ef1bacc7..a65f487d4 100644 --- a/include/asm-arm/arch-rpc/irq.h +++ b/include/asm-arm/arch-rpc/irq.h @@ -5,130 +5,170 @@ * * Changelog: * 10-10-1996 RMK Brought up to date with arch-sa110eval + * 22-08-1998 RMK Restructured IRQ routines */ -#define BUILD_IRQ(s,n,m) \ - void IRQ##n##_interrupt(void); \ - void fast_IRQ##n##_interrupt(void); \ - void bad_IRQ##n##_interrupt(void); \ - void probe_IRQ##n##_interrupt(void); +static void rpc_mask_irq_ack_a(unsigned int irq) +{ + unsigned int temp; -/* - * The timer is a special interrupt - */ -#define IRQ5_interrupt timer_IRQ_interrupt + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]\n" +" strb %1, [%3]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_IRQMASKA)), + "r" (ioaddr(IOMD_IRQCLRA))); +} -#define IRQ_INTERRUPT(n) IRQ##n##_interrupt -#define FAST_INTERRUPT(n) fast_IRQ##n##_interrupt -#define BAD_INTERRUPT(n) bad_IRQ##n##_interrupt -#define PROBE_INTERRUPT(n) probe_IRQ##n##_interrupt +static void rpc_mask_irq_a(unsigned int irq) +{ + unsigned int temp; -#define X(x) (x)|0x01, (x)|0x02, (x)|0x04, (x)|0x08, (x)|0x10, (x)|0x20, (x)|0x40, (x)|0x80 -#define Z(x) (x), (x), (x), (x), (x), (x), (x), (x) + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_IRQMASKA))); +} -static __inline__ void mask_and_ack_irq(unsigned int irq) +static void rpc_unmask_irq_a(unsigned int irq) { - static const int addrmasks[] = { - X((IOMD_IRQMASKA - IOMD_BASE)<<18 | (1 << 15)), - X((IOMD_IRQMASKB - IOMD_BASE)<<18), - X((IOMD_DMAMASK - IOMD_BASE)<<18), - Z(0), - Z(0), - Z(0), - Z(0), - Z(0), - X((IOMD_FIQMASK - IOMD_BASE)<<18), - Z(0), - Z(0), - Z(0), - Z(0), - Z(0), - Z(0), - Z(0) - }; - unsigned int temp1, temp2; + unsigned int temp; __asm__ __volatile__( -" ldr %1, [%5, %3, lsl #2]\n" -" teq %1, #0\n" -" beq 2f\n" -" ldrb %0, [%2, %1, lsr #16]\n" + "ldrb %0, [%2]\n" +" orr %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_IRQMASKA))); +} + +static void rpc_mask_irq_b(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" " bic %0, %0, %1\n" -" strb %0, [%2, %1, lsr #16]\n" -" tst %1, #0x8000\n" /* do we need an IRQ clear? */ -" strneb %1, [%2, %4]\n" -"2:" - : "=&r" (temp1), "=&r" (temp2) - : "r" (ioaddr(IOMD_BASE)), "r" (irq), - "I" ((IOMD_IRQCLRA - IOMD_BASE) << 2), "r" (addrmasks)); +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_IRQMASKB))); } -#undef X -#undef Z +static void rpc_unmask_irq_b(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" orr %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_IRQMASKB))); +} -static __inline__ void mask_irq(unsigned int irq) +static void rpc_mask_irq_dma(unsigned int irq) { - extern void ecard_disableirq (unsigned int); - extern void ecard_disablefiq (unsigned int); - unsigned char mask = 1 << (irq & 7); - - switch (irq >> 3) { - case 0: - outb(inb(IOMD_IRQMASKA) & ~mask, IOMD_IRQMASKA); - break; - case 1: - outb(inb(IOMD_IRQMASKB) & ~mask, IOMD_IRQMASKB); - break; - case 2: - outb(inb(IOMD_DMAMASK) & ~mask, IOMD_DMAMASK); - break; - case 4: - ecard_disableirq (irq & 7); - break; - case 8: - outb(inb(IOMD_FIQMASK) & ~mask, IOMD_FIQMASK); - break; - case 12: - ecard_disablefiq (irq & 7); - } + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_DMAMASK))); } -static __inline__ void unmask_irq(unsigned int irq) +static void rpc_unmask_irq_dma(unsigned int irq) { - extern void ecard_enableirq (unsigned int); - extern void ecard_enablefiq (unsigned int); - unsigned char mask = 1 << (irq & 7); - - switch (irq >> 3) { - case 0: - outb(inb(IOMD_IRQMASKA) | mask, IOMD_IRQMASKA); - break; - case 1: - outb(inb(IOMD_IRQMASKB) | mask, IOMD_IRQMASKB); - break; - case 2: - outb(inb(IOMD_DMAMASK) | mask, IOMD_DMAMASK); - break; - case 4: - ecard_enableirq (irq & 7); - break; - case 8: - outb(inb(IOMD_FIQMASK) | mask, IOMD_FIQMASK); - break; - case 12: - ecard_enablefiq (irq & 7); - } + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" orr %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_DMAMASK))); +} + +static void rpc_mask_irq_fiq(unsigned int irq) +{ + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" bic %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_FIQMASK))); } -static __inline__ unsigned long get_enabled_irqs(void) +static void rpc_unmask_irq_fiq(unsigned int irq) { - return inb(IOMD_IRQMASKA) | inb(IOMD_IRQMASKB) << 8 | inb(IOMD_DMAMASK) << 16; + unsigned int temp; + + __asm__ __volatile__( + "ldrb %0, [%2]\n" +" orr %0, %0, %1\n" +" strb %0, [%2]" + : "=&r" (temp) + : "r" (1 << (irq & 7)), "r" (ioaddr(IOMD_FIQMASK))); } static __inline__ void irq_init_irq(void) { + extern void ecard_disableirq(unsigned int irq); + extern void ecard_enableirq(unsigned int irq); + int irq; + outb(0, IOMD_IRQMASKA); outb(0, IOMD_IRQMASKB); outb(0, IOMD_FIQMASK); outb(0, IOMD_DMAMASK); + + for (irq = 0; irq < NR_IRQS; irq++) { + switch (irq) { + case 0 ... 6: + irq_desc[irq].probe_ok = 1; + case 7: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = rpc_mask_irq_ack_a; + irq_desc[irq].mask = rpc_mask_irq_a; + irq_desc[irq].unmask = rpc_unmask_irq_a; + break; + + case 9 ... 15: + irq_desc[irq].probe_ok = 1; + case 8: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = rpc_mask_irq_b; + irq_desc[irq].mask = rpc_mask_irq_b; + irq_desc[irq].unmask = rpc_unmask_irq_b; + break; + + case 16 ... 22: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = rpc_mask_irq_dma; + irq_desc[irq].mask = rpc_mask_irq_dma; + irq_desc[irq].unmask = rpc_unmask_irq_dma; + break; + + case 32 ... 40: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = ecard_disableirq; + irq_desc[irq].mask = ecard_disableirq; + irq_desc[irq].unmask = ecard_enableirq; + break; + + case 64 ... 72: + irq_desc[irq].valid = 1; + irq_desc[irq].mask_ack = rpc_mask_irq_fiq; + irq_desc[irq].mask = rpc_mask_irq_fiq; + irq_desc[irq].unmask = rpc_unmask_irq_fiq; + break; + } + } } diff --git a/include/asm-arm/arch-rpc/irqs.h b/include/asm-arm/arch-rpc/irqs.h index 1faaf758e..948ba961d 100644 --- a/include/asm-arm/arch-rpc/irqs.h +++ b/include/asm-arm/arch-rpc/irqs.h @@ -35,5 +35,3 @@ #define IRQ_TIMER IRQ_TIMER0 -#define irq_cannonicalize(i) (i) - diff --git a/include/asm-arm/arch-rpc/param.h b/include/asm-arm/arch-rpc/param.h new file mode 100644 index 000000000..bd1279f60 --- /dev/null +++ b/include/asm-arm/arch-rpc/param.h @@ -0,0 +1,8 @@ +/* + * linux/include/asm-arm/arch-rpc/param.h + * + * Copyright (C) 1996 Russell King + * Copyright (C) 1998 Philip Blundell + */ + +#define HZ 100 diff --git a/include/asm-arm/arch-rpc/uncompress.h b/include/asm-arm/arch-rpc/uncompress.h index 577d18d1e..7740f0c3f 100644 --- a/include/asm-arm/arch-rpc/uncompress.h +++ b/include/asm-arm/arch-rpc/uncompress.h @@ -141,3 +141,7 @@ static void arch_decomp_setup(void) } #endif +/* + * nothing to do + */ +#define arch_decomp_wdog() diff --git a/include/asm-arm/arch-vnc/a.out.h b/include/asm-arm/arch-vnc/a.out.h index 0123eb29a..05f7c1d58 100644 --- a/include/asm-arm/arch-vnc/a.out.h +++ b/include/asm-arm/arch-vnc/a.out.h @@ -13,4 +13,3 @@ #endif #endif - diff --git a/include/asm-arm/arch-vnc/dma.h b/include/asm-arm/arch-vnc/dma.h index 96a265927..e6d042675 100644 --- a/include/asm-arm/arch-vnc/dma.h +++ b/include/asm-arm/arch-vnc/dma.h @@ -26,4 +26,3 @@ typedef enum { #define MAX_DMA_CHANNELS 8 #endif /* _ASM_ARCH_DMA_H */ - diff --git a/include/asm-arm/arch-vnc/hardware.h b/include/asm-arm/arch-vnc/hardware.h index 947456659..b0021b724 100644 --- a/include/asm-arm/arch-vnc/hardware.h +++ b/include/asm-arm/arch-vnc/hardware.h @@ -118,4 +118,3 @@ #define PARAMS_BASE (PAGE_OFFSET + PARAMS_OFFSET) #define SAFE_ADDR 0x50000000 - diff --git a/include/asm-arm/arch-vnc/irq.h b/include/asm-arm/arch-vnc/irq.h index 2273d433b..abf877dc9 100644 --- a/include/asm-arm/arch-vnc/irq.h +++ b/include/asm-arm/arch-vnc/irq.h @@ -2,6 +2,9 @@ * include/asm-arm/arch-vnc/irq.h * * Copyright (C) 1998 Russell King + * + * Changelog: + * 22-08-1998 RMK Restructured IRQ routines */ #include <asm/irq.h> @@ -29,67 +32,48 @@ static int fb_irq_mask[16] = { IRQ_MASK_PCI_ERR }; -static __inline__ void mask_and_ack_irq(unsigned int irq) +static void vnc_mask_csr_irq(unsigned int irq) { - if (irq < 16) - *CSR_IRQ_DISABLE = fb_irq_mask[irq]; - else { - unsigned int pic_mask, mask; - - if (irq < 24) - pic_mask = PIC_MASK_LO; - else - pic_mask = PIC_MASK_HI; - - mask = 1 << (irq & 7); - - outb(inb(pic_mask) | mask, pic_mask); - } + *CSR_IRQ_DISABLE = fb_irq_mask[irq]; } -static __inline__ void mask_irq(unsigned int irq) +static void vnc_unmask_csr_irq(unsigned int irq) { - if (irq < 16) - *CSR_IRQ_DISABLE = fb_irq_mask[irq]; - else { - unsigned int pic_mask, mask; - - if (irq < 24) - pic_mask = PIC_MASK_LO; - else - pic_mask = PIC_MASK_HI; + *CSR_IRQ_DISABLE = fb_irq_mask[irq]; +} - mask = 1 << (irq & 7); +static void vnc_mask_pic_lo_irq(unsigned int irq) +{ + unsigned int mask = 1 << (irq & 7); - outb(inb(pic_mask) | mask, pic_mask); - } + outb(inb(PIC_MASK_LO) | mask, PIC_MASK_LO); } -static __inline__ void unmask_irq(unsigned int irq) +static void vnc_unmask_pic_lo_irq(unsigned int irq) { - if (irq < 16) - *CSR_IRQ_ENABLE = fb_irq_mask[irq]; - else { - unsigned int pic_mask, mask; + unsigned int mask = 1 << (irq & 7); - if (irq < 24) - pic_mask = PIC_MASK_LO; - else - pic_mask = PIC_MASK_HI; + outb(inb(PIC_MASK_LO) & ~mask, PIC_MASK_LO); +} - mask = 1 << (irq & 7); +static void vnc_mask_pic_hi_irq(unsigned int irq) +{ + unsigned int mask = 1 << (irq & 7); - outb(inb(pic_mask) & ~mask, pic_mask); - } + outb(inb(PIC_MASK_HI) | mask, PIC_MASK_HI); } - -static __inline__ unsigned long get_enabled_irqs(void) + +static void vnc_unmask_pic_hi_irq(unsigned int irq) { - return 0; + unsigned int mask = 1 << (irq & 7); + + outb(inb(PIC_MASK_HI) & ~mask, PIC_MASK_HI); } static __inline__ void irq_init_irq(void) { + unsigned int irq; + outb(0x11, PIC_LO); outb(0x10, PIC_MASK_LO); outb(0x04, PIC_MASK_LO); @@ -103,4 +87,23 @@ static __inline__ void irq_init_irq(void) *CSR_IRQ_DISABLE = ~IRQ_MASK_EXTERN_IRQ; *CSR_IRQ_ENABLE = IRQ_MASK_EXTERN_IRQ; *CSR_FIQ_DISABLE = -1; + + for (irq = 0; irq < NR_IRQS; irq++) { + irq_desc[irq].valid = 1; + irq_desc[irq].probe_ok = 1; + + if (irq < 16) { + irq_desc[irq].mask_ack = vnc_mask_csr_irq; + irq_desc[irq].mask = vnc_mask_csr_irq; + irq_desc[irq].unmask = vnc_unmask_csr_irq; + } else if (irq < 24) { + irq_desc[irq].mask_ack = vnc_mask_pic_lo_irq; + irq_desc[irq].mask = vnc_mask_pic_lo_irq; + irq_desc[irq].unmask = vnc_unmask_pic_lo_irq; + } else { + irq_desc[irq].mask_ack = vnc_mask_pic_hi_irq; + irq_desc[irq].mask = vnc_mask_pic_hi_irq; + irq_desc[irq].unmask = vnc_unmask_pic_hi_irq; + } + } } diff --git a/include/asm-arm/arch-vnc/irqs.h b/include/asm-arm/arch-vnc/irqs.h index 53e01a1d6..37b48c43d 100644 --- a/include/asm-arm/arch-vnc/irqs.h +++ b/include/asm-arm/arch-vnc/irqs.h @@ -60,4 +60,3 @@ #define IRQ_TIMER IRQ_TIMER0 #define irq_cannonicalize(i) (i) - diff --git a/include/asm-arm/arch-vnc/keyboard.h b/include/asm-arm/arch-vnc/keyboard.h index 4620ff165..4498ecc9b 100644 --- a/include/asm-arm/arch-vnc/keyboard.h +++ b/include/asm-arm/arch-vnc/keyboard.h @@ -34,4 +34,3 @@ static unsigned char kbd_sysrq_xlate[NR_SCANCODES]; //#define kbd_sysrq_xlate ps2kbd_sysrq_xlate #define kbd_disable_irq() #define kbd_enable_irq() - diff --git a/include/asm-arm/arch-vnc/param.h b/include/asm-arm/arch-vnc/param.h new file mode 100644 index 000000000..c86000125 --- /dev/null +++ b/include/asm-arm/arch-vnc/param.h @@ -0,0 +1,8 @@ +/* + * linux/include/asm-arm/arch-vnc/param.h + * + * Copyright (C) 1996 Russell King + * Copyright (C) 1998 Philip Blundell + */ + +#define HZ 100 diff --git a/include/asm-arm/arch-vnc/uncompress.h b/include/asm-arm/arch-vnc/uncompress.h index d5260b027..d6097d43f 100644 --- a/include/asm-arm/arch-vnc/uncompress.h +++ b/include/asm-arm/arch-vnc/uncompress.h @@ -31,3 +31,4 @@ static void puts(const char *s) * nothing to do */ #define arch_decomp_setup() +#define arch_decomp_wdog() diff --git a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h index df9e941db..48d688eb1 100644 --- a/include/asm-arm/atomic.h +++ b/include/asm-arm/atomic.h @@ -7,20 +7,22 @@ * 27-06-1996 RMK Created * 13-04-1997 RMK Made functions atomic! * 07-12-1997 RMK Upgraded for v2.1. + * 26-08-1998 PJB Added #ifdef __KERNEL__ */ #ifndef __ASM_ARM_ATOMIC_H #define __ASM_ARM_ATOMIC_H +typedef struct { int counter; } atomic_t; + +#define ATOMIC_INIT(i) { (i) } + +#ifdef __KERNEL__ #include <asm/system.h> #ifdef __SMP__ #error SMP not supported #endif -typedef struct { int counter; } atomic_t; - -#define ATOMIC_INIT(i) { (i) } - #define atomic_read(v) ((v)->counter) #define atomic_set(v,i) (((v)->counter) = (i)) @@ -83,3 +85,4 @@ static __inline__ void atomic_clear_mask(unsigned long mask, unsigned long *addr } #endif +#endif diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h index 8dd37e026..c99a67292 100644 --- a/include/asm-arm/elf.h +++ b/include/asm-arm/elf.h @@ -30,7 +30,7 @@ typedef struct { void *null; } elf_fpregset_t; #define ELF_ARCH EM_ARM #define USE_ELF_CORE_DUMP -#define ELF_EXEC_PAGESIZE 32768 +#define ELF_EXEC_PAGESIZE 4096 /* This is the location that an ET_DYN program is loaded if exec'ed. Typical use of this is to invoke "./ld.so someprog" to test out a new version of @@ -39,6 +39,11 @@ typedef struct { void *null; } elf_fpregset_t; #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) +/* When the program starts, a1 contains a pointer to a function to be + registered with atexit, as per the SVR4 ABI. A value of 0 means we + have no such handler. */ +#define ELF_PLAT_INIT(_r) (_r)->ARM_r0 = 0 + /* This yields a mask that user programs can use to figure out what instruction set this cpu supports. */ @@ -65,17 +70,4 @@ extern char elf_platform[]; current->personality = PER_LINUX_32BIT #endif -#define R_ARM_NONE (0) -#define R_ARM_32 (1) /* => ld 32 */ -#define R_ARM_PC26 (2) /* => ld b/bl branches */ -#define R_ARM_PC32 (3) -#define R_ARM_GOT32 (4) /* -> object relocation into GOT */ -#define R_ARM_PLT32 (5) -#define R_ARM_COPY (6) /* => dlink copy object */ -#define R_ARM_GLOB_DAT (7) /* => dlink 32bit absolute address for .got */ -#define R_ARM_JUMP_SLOT (8) /* => dlink 32bit absolute address for .got.plt */ -#define R_ARM_RELATIVE (9) /* => ld resolved 32bit absolute address requiring load address adjustment */ -#define R_ARM_GOTOFF (10) /* => ld calculates offset of data from base of GOT */ -#define R_ARM_GOTPC (11) /* => ld 32-bit relative offset */ - #endif diff --git a/include/asm-arm/fcntl.h b/include/asm-arm/fcntl.h index af29f7f46..a9e469a49 100644 --- a/include/asm-arm/fcntl.h +++ b/include/asm-arm/fcntl.h @@ -28,6 +28,8 @@ #define F_SETOWN 8 /* for sockets. */ #define F_GETOWN 9 /* for sockets. */ +#define F_SETSIG 10 /* for sockets. */ +#define F_GETSIG 11 /* for sockets. */ /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ diff --git a/include/asm-arm/fiq.h b/include/asm-arm/fiq.h index 2203fa2a5..0516d115a 100644 --- a/include/asm-arm/fiq.h +++ b/include/asm-arm/fiq.h @@ -1,32 +1,34 @@ -/* Support for FIQ on ARM architectures. +/* + * linux/include/asm-arm/fiq.h + * + * Support for FIQ on ARM architectures. * Written by Philip Blundell <philb@gnu.org>, 1998 + * Re-written by Russell King */ #ifndef __ASM_FIQ_H #define __ASM_FIQ_H -struct fiq_handler { - const char *name; - int (*callback)(void); -}; - -extern int claim_fiq(struct fiq_handler *f); -extern void release_fiq(struct fiq_handler *f); - -#endif -/* Support for FIQ on ARM architectures. - * Written by Philip Blundell <philb@gnu.org>, 1998 - */ - -#ifndef __ASM_FIQ_H -#define __ASM_FIQ_H +#include <asm/ptrace.h> struct fiq_handler { - const char *name; - int (*callback)(void); + struct fiq_handler *next; + /* Name + */ + const char *name; + /* Called to ask driver to relinquish/ + * reacquire FIQ + * return zero to accept, or -<errno> + */ + int (*fiq_op)(void *, int relinquish); + /* data for the relinquish/reacquire functions + */ + void *dev_id; }; extern int claim_fiq(struct fiq_handler *f); extern void release_fiq(struct fiq_handler *f); +extern void set_fiq_handler(void *start, unsigned int length); +extern void set_fiq_regs(struct pt_regs *regs); #endif diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index 09713cda9..10b20184a 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h @@ -15,6 +15,7 @@ #include <asm/hardware.h> #include <asm/arch/mmu.h> #include <asm/arch/io.h> +#include <asm/proc/io.h> /* unsigned long virt_to_phys(void *x) */ #define virt_to_phys(x) (__virt_to_phys((unsigned long)(x))) diff --git a/include/asm-arm/irq.h b/include/asm-arm/irq.h index 99b949ddb..59770101e 100644 --- a/include/asm-arm/irq.h +++ b/include/asm-arm/irq.h @@ -3,6 +3,8 @@ #include <asm/arch/irqs.h> +#define irq_cannonicalize(i) (i) + #ifndef NR_IRQS #define NR_IRQS 128 #endif diff --git a/include/asm-arm/linux_logo.h b/include/asm-arm/linux_logo.h index b10646254..9eeae3619 100644 --- a/include/asm-arm/linux_logo.h +++ b/include/asm-arm/linux_logo.h @@ -11,17 +11,26 @@ #define linux_logo_banner "ARM Linux version " UTS_RELEASE -#define LINUX_LOGO_COLORS 0 +#define LINUX_LOGO_COLORS 221 -unsigned char linux_logo_red[] __initdata = { }; -unsigned char linux_logo_green[] __initdata = { }; -unsigned char linux_logo_blue[] __initdata = { }; +#ifdef INCLUDE_LINUX_LOGO_DATA -unsigned char linux_logo16_red[] __initdata = { }; -unsigned char linux_logo16_green[] __initdata = { }; -unsigned char linux_logo16_blue[] __initdata = { }; +#define INCLUDE_LINUX_LOGO16 +#include <linux/linux_logo.h> -unsigned char linux_logo[] __initdata = { }; -unsigned char linux_logo16[] __initdata = { }; -unsigned char linux_logo_bw[] __initdata = { }; +/* prototypes only */ +extern unsigned char linux_logo_red[]; +extern unsigned char linux_logo_green[]; +extern unsigned char linux_logo_blue[]; +extern unsigned char linux_logo[]; +extern unsigned char linux_logo_bw[]; +extern unsigned char linux_logo16_red[]; +extern unsigned char linux_logo16_green[]; +extern unsigned char linux_logo16_blue[]; +extern unsigned char linux_logo16[]; +extern unsigned char *linux_serial_image; + +extern int (*console_show_logo)(void); + +#endif diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index c447459a0..5512cdd4c 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h @@ -9,4 +9,7 @@ extern int do_check_pgt_cache(int, int); +/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ +#define PageSkip(page) (0) + #endif /* _ASMARM_PGTABLE_H */ diff --git a/include/asm-arm/proc-armo/io.h b/include/asm-arm/proc-armo/io.h new file mode 100644 index 000000000..84143003e --- /dev/null +++ b/include/asm-arm/proc-armo/io.h @@ -0,0 +1,8 @@ +/* + * linux/include/asm-arm/proc-armo/io.h + */ + +/* Nothing to do */ +#define dma_cache_inv(_start,_size) do { } while (0) +#define dma_cache_wback(_start,_size) do { } while (0) +#define dma_cache_wback_inv(_start,_size) do { } while (0) diff --git a/include/asm-arm/proc-armo/pgtable.h b/include/asm-arm/proc-armo/pgtable.h index ef732f784..10631f7b2 100644 --- a/include/asm-arm/proc-armo/pgtable.h +++ b/include/asm-arm/proc-armo/pgtable.h @@ -128,6 +128,7 @@ extern __inline__ void update_memc_addr(struct mm_struct *mm, unsigned long addr */ #define VMALLOC_START 0x01a00000 #define VMALLOC_VMADDR(x) ((unsigned long)(x)) +#define VMALLOC_END 0x01c00000 #define _PAGE_PRESENT 0x01 #define _PAGE_READONLY 0x02 diff --git a/include/asm-arm/proc-armo/ptrace.h b/include/asm-arm/proc-armo/ptrace.h index 6468fb549..30a05ecdc 100644 --- a/include/asm-arm/proc-armo/ptrace.h +++ b/include/asm-arm/proc-armo/ptrace.h @@ -44,12 +44,12 @@ struct pt_regs { #define CC_Z_BIT (1 << 30) #define CC_N_BIT (1 << 31) -#define user_mode(regs) \ - (((regs)->ARM_pc & MODE_MASK) == USR26_MODE) - #define processor_mode(regs) \ ((regs)->ARM_pc & MODE_MASK) +#define user_mode(regs) \ + (processor_mode(regs) == USR26_MODE) + #define interrupts_enabled(regs) \ (!((regs)->ARM_pc & I_BIT)) @@ -59,7 +59,17 @@ struct pt_regs { #define condition_codes(regs) \ ((regs)->ARM_pc & (CC_V_BIT|CC_C_BIT|CC_Z_BIT|CC_N_BIT)) -#define instruction_pointer(regs) ((regs)->ARM_pc & 0x03fffffc) -#define pc_pointer(v) ((v) & 0x03fffffc) +#define pc_pointer(v) \ + ((v) & 0x03fffffc) + +#define instruction_pointer(regs) \ + (pc_pointer((regs)->ARM_pc)) + +/* Are the current registers suitable for user mode? + * (used to maintain security in signal handlers) + */ +#define valid_user_regs(regs) \ + (user_mode(regs) && ((regs)->ARM_sp & 3) == 0) + #endif diff --git a/include/asm-arm/proc-armv/io.h b/include/asm-arm/proc-armv/io.h new file mode 100644 index 000000000..949d41010 --- /dev/null +++ b/include/asm-arm/proc-armv/io.h @@ -0,0 +1,38 @@ +/* + * linux/include/asm-arm/proc-armv/io.h + */ + +/* + * The caches on some architectures aren't dma-coherent and have need to + * handle this in software. There are two types of operations that + * can be applied to dma buffers. + * + * - dma_cache_wback_inv(start, size) makes caches and RAM coherent by + * writing the content of the caches back to memory, if necessary. + * The function also invalidates the affected part of the caches as + * necessary before DMA transfers from outside to memory. + * - dma_cache_inv(start, size) invalidates the affected parts of the + * caches. Dirty lines of the caches may be written back or simply + * be discarded. This operation is necessary before dma operations + * to the memory. + * - dma_cache_wback(start, size) writes back any dirty lines but does + * not invalidate the cache. This can be used before DMA reads from + * memory, + */ + +#include <asm/proc-fns.h> + +#define dma_cache_inv(_start,_size) \ + do { \ + processor.u.armv3v4._cache_purge_area(_start,(_start+_size)); \ + } while (0) + +#define dma_cache_wback(_start,_size) \ + do { \ + processor.u.armv3v4._cache_wback_area(_start,(_start+_size)); \ + } while (0) + +#define dma_cache_wback_inv(_start,_size) \ + do { \ + processor.u.armv3v4._flush_cache_area(_start,(_start+_size),0); \ + } while (0) diff --git a/include/asm-arm/proc-armv/param.h b/include/asm-arm/proc-armv/param.h index fa22ce2d3..45bb5662d 100644 --- a/include/asm-arm/proc-armv/param.h +++ b/include/asm-arm/proc-armv/param.h @@ -7,9 +7,7 @@ #ifndef __ASM_PROC_PARAM_H #define __ASM_PROC_PARAM_H -#ifndef HZ -#define HZ 100 -#endif +#include <asm/arch/param.h> /* for HZ */ #define EXEC_PAGESIZE 4096 diff --git a/include/asm-arm/proc-armv/pgtable.h b/include/asm-arm/proc-armv/pgtable.h index 60b670fc2..f3f740373 100644 --- a/include/asm-arm/proc-armv/pgtable.h +++ b/include/asm-arm/proc-armv/pgtable.h @@ -145,6 +145,7 @@ #define VMALLOC_OFFSET (8*1024*1024) #define VMALLOC_START (((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)) #define VMALLOC_VMADDR(x) ((unsigned long)(x)) +#define VMALLOC_END (PAGE_OFFSET + 0x10000000) /* PMD types (actually level 1 descriptor) */ #define PMD_TYPE_MASK 0x0003 @@ -199,7 +200,7 @@ #define PAGE_SHARED __pgprot(PTE_TYPE_SMALL | _PTE_YOUNG | _PTE_READ | _PTE_WRITE) #define PAGE_COPY __pgprot(PTE_TYPE_SMALL | _PTE_YOUNG | _PTE_READ) #define PAGE_READONLY __pgprot(PTE_TYPE_SMALL | _PTE_YOUNG | _PTE_READ) -#define PAGE_KERNEL __pgprot(PTE_TYPE_SMALL | _PTE_YOUNG | _PTE_DIRTY | _PTE_WRITE) +#define PAGE_KERNEL __pgprot(PTE_TYPE_SMALL | _PTE_READ | _PTE_DIRTY | _PTE_WRITE) #define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_DOMAIN(DOMAIN_USER)) #define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_DOMAIN(DOMAIN_KERNEL)) diff --git a/include/asm-arm/proc-armv/ptrace.h b/include/asm-arm/proc-armv/ptrace.h index 42a56433f..213c17ce7 100644 --- a/include/asm-arm/proc-armv/ptrace.h +++ b/include/asm-arm/proc-armv/ptrace.h @@ -71,5 +71,11 @@ struct pt_regs { #define instruction_pointer(regs) ((regs)->ARM_pc) #define pc_pointer(v) (v) +/* Are the current registers suitable for user mode? + * (used to maintain security in signal handlers) + */ +#define valid_user_regs(regs) \ + (user_mode(regs) && ((regs)->ARM_sp & 3) == 0) + #endif diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h index 4f8a48d06..e3b35c9f2 100644 --- a/include/asm-arm/proc-fns.h +++ b/include/asm-arm/proc-fns.h @@ -83,6 +83,14 @@ extern struct processor { * flush an icached page */ void (*_flush_icache_area)(unsigned long start, unsigned long end); + /* + * write back dirty cached data + */ + void (*_cache_wback_area)(unsigned long start, unsigned long end); + /* + * purge cached data without (necessarily) writing it back + */ + void (*_cache_purge_area)(unsigned long start, unsigned long end); } armv3v4; struct { /* MEMC diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h index d12829171..edab09ace 100644 --- a/include/asm-arm/processor.h +++ b/include/asm-arm/processor.h @@ -22,12 +22,15 @@ union fp_state { typedef unsigned long mm_segment_t; /* domain register */ +#define NR_DEBUGS 5 + #define DECLARE_THREAD_STRUCT \ struct thread_struct { \ unsigned long address; /* Address of fault */ \ unsigned long trap_no; /* Trap number */ \ unsigned long error_code; /* Error code of trap */ \ union fp_state fpstate; /* FPE save state */ \ + unsigned long debug[NR_DEBUGS]; /* Debug/ptrace */ \ EXTRA_THREAD_STRUCT \ } @@ -39,6 +42,7 @@ struct thread_struct { \ 0, \ 0, \ { { { 0, }, }, }, \ + { 0, }, \ EXTRA_THREAD_STRUCT_INIT \ } diff --git a/include/asm-arm/siginfo.h b/include/asm-arm/siginfo.h index bcec2810f..2dec6e080 100644 --- a/include/asm-arm/siginfo.h +++ b/include/asm-arm/siginfo.h @@ -87,6 +87,7 @@ typedef struct siginfo { #define SI_TIMER -2 /* sent by timer expiration */ #define SI_MESGQ -3 /* sent by real time mesq state change */ #define SI_ASYNCIO -4 /* sent by AIO completion */ +#define SI_SIGIO -5 /* sent by queued SIGIO */ #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) diff --git a/include/asm-arm/signal.h b/include/asm-arm/signal.h index d171f77bf..08b5edb50 100644 --- a/include/asm-arm/signal.h +++ b/include/asm-arm/signal.h @@ -115,8 +115,9 @@ typedef unsigned long sigset_t; * SA_INTERRUPT is also used by the irq handling routines. * SA_SHIRQ is for shared interrupt support on PCI and EISA. */ -#define SA_PROBE SA_ONESHOT -#define SA_SAMPLE_RANDOM SA_RESTART +#define SA_PROBE 0x80000000 +#define SA_SAMPLE_RANDOM 0x10000000 +#define SA_IRQNOMASK 0x08000000 #define SA_SHIRQ 0x04000000 #endif diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index a952afe52..e72553f1a 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h @@ -6,8 +6,13 @@ /* * Your basic spinlocks, allowing only a single CPU anywhere */ -typedef struct { } spinlock_t; -#define SPIN_LOCK_UNLOCKED { } +#if (__GNUC__ > 2) || (__GNUC_MINOR__ >= 8) + typedef struct { } spinlock_t; +# define SPIN_LOCK_UNLOCKED { } +#else + typedef unsigned char spinlock_t; +# define SPIN_LOCK_UNLOCKED 0 +#endif #define spin_lock_init(lock) do { } while(0) #define spin_lock(lock) do { } while(0) diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index 88148d4cd..1d7e28b0b 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h @@ -1,6 +1,16 @@ #ifndef __ASM_ARM_SYSTEM_H #define __ASM_ARM_SYSTEM_H +/* The type of machine we're running on */ +extern unsigned int machine_type; +#define MACH_TYPE_EBSA110 0 +#define MACH_TYPE_RISCPC 1 +#define MACH_TYPE_NEXUSPCI 3 +#define MACH_TYPE_EBSA285 4 +#define MACH_TYPE_NETWINDER 5 +#define MACH_TYPE_CATS 6 +#define MACH_TYPE_TBOX 7 + #include <linux/kernel.h> #include <asm/proc-fns.h> diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h index 30b4950fe..5e4c118a9 100644 --- a/include/asm-arm/uaccess.h +++ b/include/asm-arm/uaccess.h @@ -60,8 +60,11 @@ extern inline int verify_area(int type, const void * addr, unsigned long size) static __inline__ unsigned long copy_from_user(void *to, const void *from, unsigned long n) { - if (access_ok(VERIFY_READ, from, n)) + char *end = (char *)to + n; + if (access_ok(VERIFY_READ, from, n)) { __do_copy_from_user(to, from, n); + if (n) memset(end - n, 0, n); + } return n; } diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index 5ec2e008d..780b7a13c 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h @@ -319,6 +319,7 @@ static inline _syscall0(int,sync); static inline _syscall0(pid_t,setsid); static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count); static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) +static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count); static inline _syscall1(int,dup,int,fd); static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp); static inline _syscall3(int,open,const char *,file,int,flag,int,mode); diff --git a/include/asm-arm/vga.h b/include/asm-arm/vga.h new file mode 100644 index 000000000..6a9278df9 --- /dev/null +++ b/include/asm-arm/vga.h @@ -0,0 +1,11 @@ +#ifndef ASMARM_VGA_H +#define ASMARM_VGA_H + +#include <asm/io.h> + +#define VGA_MAP_MEM(x) (0xe0000000 + (x)) + +#define vga_readb(x) (*(x)) +#define vga_writeb(x,y) (*(y) = (x)) + +#endif diff --git a/include/asm-i386/checksum.h b/include/asm-i386/checksum.h index 4d7a66fdf..cad2910fe 100644 --- a/include/asm-i386/checksum.h +++ b/include/asm-i386/checksum.h @@ -195,4 +195,22 @@ static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr, return csum_fold(sum); } +/* + * Copy and checksum to user + */ +#define HAVE_CSUM_COPY_USER +static __inline__ unsigned int csum_and_copy_to_user (const char *src, char *dst, + int len, int sum, int *err_ptr) +{ + int *src_err_ptr=NULL; + + if (verify_area(VERIFY_WRITE, dst, len) == 0) + return csum_partial_copy_generic(src, dst, len, sum, src_err_ptr, err_ptr); + + if (len) + *err_ptr = -EFAULT; + + return sum; +} + #endif diff --git a/include/asm-i386/fcntl.h b/include/asm-i386/fcntl.h index 369ac5153..f0ddc3e61 100644 --- a/include/asm-i386/fcntl.h +++ b/include/asm-i386/fcntl.h @@ -3,19 +3,21 @@ /* open/fcntl - O_SYNC is only implemented on blocks devices and on files located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_NOCTTY 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 -#define O_NONBLOCK 04000 +#define O_ACCMODE 0003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 0100 /* not fcntl */ +#define O_EXCL 0200 /* not fcntl */ +#define O_NOCTTY 0400 /* not fcntl */ +#define O_TRUNC 01000 /* not fcntl */ +#define O_APPEND 02000 +#define O_NONBLOCK 04000 #define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 -#define FASYNC 020000 /* fcntl, for BSD compatibility */ +#define O_SYNC 010000 +#define FASYNC 020000 /* fcntl, for BSD compatibility */ +#define O_DIRECT 040000 /* direct disk access hint - currently ignored */ +#define O_LARGEFILE 0100000 #define F_DUPFD 0 /* dup */ #define F_GETFD 1 /* get f_flags */ @@ -28,6 +30,8 @@ #define F_SETOWN 8 /* for sockets. */ #define F_GETOWN 9 /* for sockets. */ +#define F_SETSIG 10 /* for sockets. */ +#define F_GETSIG 11 /* for sockets. */ /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ diff --git a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h index c56966f64..dc9d624d7 100644 --- a/include/asm-i386/fixmap.h +++ b/include/asm-i386/fixmap.h @@ -60,6 +60,10 @@ extern void set_fixmap (enum fixed_addresses idx, unsigned long phys); #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) +#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT)) + +extern void __this_fixmap_does_not_exist(void); + /* * 'index to address' translation. If anyone tries to use the idx * directly without tranlation, we catch the bug with a NULL-deference @@ -71,12 +75,15 @@ extern inline unsigned long fix_to_virt(const unsigned int idx) * this branch gets completely eliminated after inlining, * except when someone tries to use fixaddr indices in an * illegal way. (such as mixing up address types or using - * out-of-range indices) + * out-of-range indices). + * + * If it doesn't get removed, the linker will complain + * loudly with a reasonably clear error message.. */ if (idx >= __end_of_fixed_addresses) - panic("illegal fixaddr index!"); + __this_fixmap_does_not_exist(); - return FIXADDR_TOP - (idx << PAGE_SHIFT); + return __fix_to_virt(idx); } #endif diff --git a/include/asm-i386/hardirq.h b/include/asm-i386/hardirq.h index bfc535137..533961343 100644 --- a/include/asm-i386/hardirq.h +++ b/include/asm-i386/hardirq.h @@ -20,7 +20,7 @@ extern unsigned int local_irq_count[NR_CPUS]; #define hardirq_enter(cpu) (local_irq_count[cpu]++) #define hardirq_exit(cpu) (local_irq_count[cpu]--) -#define synchronize_irq() do { } while (0) +#define synchronize_irq() barrier() #else diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 4a8e92c54..e0cd4b361 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h @@ -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. diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 7caccbdc0..3a9968c69 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h @@ -31,6 +31,8 @@ struct cpuinfo_x86 { __u32 x86_capability; char x86_vendor_id[16]; char x86_model_id[64]; + int x86_cache_size; /* in KB - valid for CPUS which support this + call */ int fdiv_bug; int f00f_bug; unsigned long loops_per_sec; diff --git a/include/asm-i386/siginfo.h b/include/asm-i386/siginfo.h index 01ef4d08a..d0cae4709 100644 --- a/include/asm-i386/siginfo.h +++ b/include/asm-i386/siginfo.h @@ -87,6 +87,7 @@ typedef struct siginfo { #define SI_TIMER -2 /* sent by timer expiration */ #define SI_MESGQ -3 /* sent by real time mesq state change */ #define SI_ASYNCIO -4 /* sent by AIO completion */ +#define SI_SIGIO -5 /* sent by queued SIGIO */ #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) diff --git a/include/asm-i386/softirq.h b/include/asm-i386/softirq.h index f77cce80a..c96481626 100644 --- a/include/asm-i386/softirq.h +++ b/include/asm-i386/softirq.h @@ -86,7 +86,7 @@ extern inline void end_bh_atomic(void) /* These are for the irq's testing the lock */ #define softirq_trylock(cpu) (local_bh_count[cpu] ? 0 : (local_bh_count[cpu]=1)) #define softirq_endlock(cpu) (local_bh_count[cpu] = 0) -#define synchronize_bh() do { } while (0) +#define synchronize_bh() barrier() #endif /* SMP */ diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index 91b98d5e8..cb04cefe4 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h @@ -4,38 +4,6 @@ #include <linux/kernel.h> #include <asm/segment.h> -/* - * 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)) - #ifdef __KERNEL__ struct task_struct; /* one of the stranger aspects of C forward declarations.. */ @@ -227,61 +195,6 @@ extern void __global_restore_flags(unsigned long); #endif -#define _set_gate(gate_addr,type,dpl,addr) \ -__asm__ __volatile__ ("movw %%dx,%%ax\n\t" \ - "movw %2,%%dx\n\t" \ - "movl %%eax,%0\n\t" \ - "movl %%edx,%1" \ - :"=m" (*((long *) (gate_addr))), \ - "=m" (*(1+(long *) (gate_addr))) \ - :"i" ((short) (0x8000+(dpl<<13)+(type<<8))), \ - "d" ((char *) (addr)),"a" (__KERNEL_CS << 16) \ - :"ax","dx") - -#define set_intr_gate(n,addr) \ - _set_gate(idt+(n),14,0,addr) - -#define set_trap_gate(n,addr) \ - _set_gate(idt+(n),15,0,addr) - -#define set_system_gate(n,addr) \ - _set_gate(idt+(n),15,3,addr) - -#define set_call_gate(a,addr) \ - _set_gate(a,12,3,addr) - -#define _set_seg_desc(gate_addr,type,dpl,base,limit) {\ - *((gate_addr)+1) = ((base) & 0xff000000) | \ - (((base) & 0x00ff0000)>>16) | \ - ((limit) & 0xf0000) | \ - ((dpl)<<13) | \ - (0x00408000) | \ - ((type)<<8); \ - *(gate_addr) = (((base) & 0x0000ffff)<<16) | \ - ((limit) & 0x0ffff); } - -#define _set_tssldt_desc(n,addr,limit,type) \ -__asm__ __volatile__ ("movw %3,0(%2)\n\t" \ - "movw %%ax,2(%2)\n\t" \ - "rorl $16,%%eax\n\t" \ - "movb %%al,4(%2)\n\t" \ - "movb %4,5(%2)\n\t" \ - "movb $0,6(%2)\n\t" \ - "movb %%ah,7(%2)\n\t" \ - "rorl $16,%%eax" \ - : "=m"(*(n)) : "a" (addr), "r"(n), "ir"(limit), "i"(type)) - -#define set_tss_desc(n,addr) \ - _set_tssldt_desc(((char *) (n)),((int)(addr)),235,0x89) -#define set_ldt_desc(n,addr,size) \ - _set_tssldt_desc(((char *) (n)),((int)(addr)),((size << 3) - 1),0x82) - -/* - * This is the ldt that every process will get unless we need - * something other than this. - */ -extern struct desc_struct default_ldt; - /* * disable hlt during certain critical i/o operations */ diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h index 9da2fff06..dcc56f31c 100644 --- a/include/asm-i386/uaccess.h +++ b/include/asm-i386/uaccess.h @@ -268,13 +268,38 @@ do { \ : "r"(size & 3), "0"(size / 4), "D"(to), "S"(from) \ : "di", "si", "memory") +#define __copy_user_zeroing(to,from,size) \ + __asm__ __volatile__( \ + "0: rep; movsl\n" \ + " movl %1,%0\n" \ + "1: rep; movsb\n" \ + "2:\n" \ + ".section .fixup,\"ax\"\n" \ + "3: lea 0(%1,%0,4),%0\n" \ + "4: pushl %0\n" \ + " pushl %%eax\n" \ + " xorl %%eax,%%eax\n" \ + " rep; stosb\n" \ + " popl %%eax\n" \ + " popl %0\n" \ + " jmp 2b\n" \ + ".previous\n" \ + ".section __ex_table,\"a\"\n" \ + " .align 4\n" \ + " .long 0b,3b\n" \ + " .long 1b,4b\n" \ + ".previous" \ + : "=&c"(size) \ + : "r"(size & 3), "0"(size / 4), "D"(to), "S"(from) \ + : "di", "si", "memory"); + /* We let the __ versions of copy_from/to_user inline, because they're often * used in fast paths and have only a small space overhead. */ static inline unsigned long __generic_copy_from_user_nocheck(void *to, const void *from, unsigned long n) { - __copy_user(to,from,n); + __copy_user_zeroing(to,from,n); return n; } @@ -369,6 +394,141 @@ do { \ } \ } while (0) +/* Optimize just a little bit when we know the size of the move. */ +#define __constant_copy_user_zeroing(to, from, size) \ +do { \ + switch (size & 3) { \ + default: \ + __asm__ __volatile__( \ + "0: rep; movsl\n" \ + "1:\n" \ + ".section .fixup,\"ax\"\n" \ + "2: pushl %0\n" \ + " pushl %%eax\n" \ + " xorl %%eax,%%eax\n" \ + " rep; stosl\n" \ + " popl %%eax\n" \ + " popl %0\n" \ + " shl $2,%0\n" \ + " jmp 1b\n" \ + ".previous\n" \ + ".section __ex_table,\"a\"\n" \ + " .align 4\n" \ + " .long 0b,2b\n" \ + ".previous" \ + : "=c"(size) \ + : "S"(from), "D"(to), "0"(size/4) \ + : "di", "si", "memory"); \ + break; \ + case 1: \ + __asm__ __volatile__( \ + "0: rep; movsl\n" \ + "1: movsb\n" \ + "2:\n" \ + ".section .fixup,\"ax\"\n" \ + "3: pushl %0\n" \ + " pushl %%eax\n" \ + " xorl %%eax,%%eax\n" \ + " rep; stosl\n" \ + " stosb\n" \ + " popl %%eax\n" \ + " popl %0\n" \ + " shl $2,%0\n" \ + " incl %0\n" \ + " jmp 2b\n" \ + "4: pushl %%eax\n" \ + " xorl %%eax,%%eax\n" \ + " stosb\n" \ + " popl %%eax\n" \ + " incl %0\n" \ + " jmp 2b\n" \ + ".previous\n" \ + ".section __ex_table,\"a\"\n" \ + " .align 4\n" \ + " .long 0b,3b\n" \ + " .long 1b,4b\n" \ + ".previous" \ + : "=c"(size) \ + : "S"(from), "D"(to), "0"(size/4) \ + : "di", "si", "memory"); \ + break; \ + case 2: \ + __asm__ __volatile__( \ + "0: rep; movsl\n" \ + "1: movsw\n" \ + "2:\n" \ + ".section .fixup,\"ax\"\n" \ + "3: pushl %0\n" \ + " pushl %%eax\n" \ + " xorl %%eax,%%eax\n" \ + " rep; stosl\n" \ + " stosw\n" \ + " popl %%eax\n" \ + " popl %0\n" \ + " shl $2,%0\n" \ + " addl $2,%0\n" \ + " jmp 2b\n" \ + "4: pushl %%eax\n" \ + " xorl %%eax,%%eax\n" \ + " stosw\n" \ + " popl %%eax\n" \ + " addl $2,%0\n" \ + " jmp 2b\n" \ + ".previous\n" \ + ".section __ex_table,\"a\"\n" \ + " .align 4\n" \ + " .long 0b,3b\n" \ + " .long 1b,4b\n" \ + ".previous" \ + : "=c"(size) \ + : "S"(from), "D"(to), "0"(size/4) \ + : "di", "si", "memory"); \ + break; \ + case 3: \ + __asm__ __volatile__( \ + "0: rep; movsl\n" \ + "1: movsw\n" \ + "2: movsb\n" \ + "3:\n" \ + ".section .fixup,\"ax\"\n" \ + "4: pushl %0\n" \ + " pushl %%eax\n" \ + " xorl %%eax,%%eax\n" \ + " rep; stosl\n" \ + " stosw\n" \ + " stosb\n" \ + " popl %%eax\n" \ + " popl %0\n" \ + " shl $2,%0\n" \ + " addl $3,%0\n" \ + " jmp 2b\n" \ + "5: pushl %%eax\n" \ + " xorl %%eax,%%eax\n" \ + " stosw\n" \ + " stosb\n" \ + " popl %%eax\n" \ + " addl $3,%0\n" \ + " jmp 2b\n" \ + "6: pushl %%eax\n" \ + " xorl %%eax,%%eax\n" \ + " stosb\n" \ + " popl %%eax\n" \ + " incl %0\n" \ + " jmp 2b\n" \ + ".previous\n" \ + ".section __ex_table,\"a\"\n" \ + " .align 4\n" \ + " .long 0b,4b\n" \ + " .long 1b,5b\n" \ + " .long 2b,6b\n" \ + ".previous" \ + : "=c"(size) \ + : "S"(from), "D"(to), "0"(size/4) \ + : "di", "si", "memory"); \ + break; \ + } \ +} while (0) + unsigned long __generic_copy_to_user(void *, const void *, unsigned long); unsigned long __generic_copy_from_user(void *, const void *, unsigned long); @@ -384,7 +544,7 @@ static inline unsigned long __constant_copy_from_user(void *to, const void *from, unsigned long n) { if (access_ok(VERIFY_READ, from, n)) - __constant_copy_user(to,from,n); + __constant_copy_user_zeroing(to,from,n); return n; } @@ -398,7 +558,7 @@ __constant_copy_to_user_nocheck(void *to, const void *from, unsigned long n) static inline unsigned long __constant_copy_from_user_nocheck(void *to, const void *from, unsigned long n) { - __constant_copy_user(to,from,n); + __constant_copy_user_zeroing(to,from,n); return n; } diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index 1b23625c6..b354c47aa 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h @@ -5,7 +5,6 @@ * This file contains the system call numbers. */ -#define __NR_setup 0 /* used only by init, to get system going */ #define __NR_exit 1 #define __NR_fork 2 #define __NR_read 3 @@ -27,7 +26,7 @@ #define __NR_lseek 19 #define __NR_getpid 20 #define __NR_mount 21 -#define __NR_oldumount 22 +#define __NR_umount 22 #define __NR_setuid 23 #define __NR_getuid 24 #define __NR_stime 25 @@ -57,7 +56,7 @@ #define __NR_geteuid 49 #define __NR_getegid 50 #define __NR_acct 51 -#define __NR_umount 52 +#define __NR_umount2 52 #define __NR_lock 53 #define __NR_ioctl 54 #define __NR_fcntl 55 @@ -289,7 +288,6 @@ __syscall_return(type,__res); \ #define __NR__exit __NR_exit static inline _syscall0(int,idle) static inline _syscall0(int,pause) -static inline _syscall1(int,setup,int,magic) static inline _syscall0(int,sync) static inline _syscall0(pid_t,setsid) static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) diff --git a/include/asm-m68k/adb_mouse.h b/include/asm-m68k/adb_mouse.h new file mode 100644 index 000000000..824113662 --- /dev/null +++ b/include/asm-m68k/adb_mouse.h @@ -0,0 +1,23 @@ +#ifndef _ASM_ADB_MOUSE_H +#define _ASM_ADB_MOUSE_H + +/* + * linux/include/asm-m68k/adb_mouse.h + * header file for Macintosh ADB mouse driver + * 27-10-97 Michael Schmitz + * copied from: + * header file for Atari Mouse driver + * by Robert de Vries (robert@and.nl) on 19Jul93 + */ + +struct mouse_status { + char buttons; + short dx; + short dy; + int ready; + int active; + struct wait_queue *wait; + struct fasync_struct *fasyncptr; +}; + +#endif diff --git a/include/asm-m68k/amigahw.h b/include/asm-m68k/amigahw.h index a5d105979..39dd49979 100644 --- a/include/asm-m68k/amigahw.h +++ b/include/asm-m68k/amigahw.h @@ -20,7 +20,7 @@ * Different Amiga models */ -extern u_long amiga_model; +extern unsigned long amiga_model; #define AMI_UNKNOWN (0) #define AMI_500 (1) @@ -44,7 +44,7 @@ extern u_long amiga_model; * Chipsets */ -extern u_long amiga_chipset; +extern unsigned long amiga_chipset; #define CS_STONEAGE (0) #define CS_OCS (1) @@ -56,12 +56,12 @@ extern u_long amiga_chipset; * Miscellaneous */ -extern u_long amiga_eclock; /* 700 kHz E Peripheral Clock */ -extern u_long amiga_masterclock; /* 28 MHz Master Clock */ -extern u_long amiga_colorclock; /* 3.5 MHz Color Clock */ -extern u_long amiga_chip_size; /* Chip RAM Size (bytes) */ -extern u_char amiga_vblank; /* VBLANK Frequency */ -extern u_char amiga_psfreq; /* Power Supply Frequency */ +extern unsigned long amiga_eclock; /* 700 kHz E Peripheral Clock */ +extern unsigned long amiga_masterclock; /* 28 MHz Master Clock */ +extern unsigned long amiga_colorclock; /* 3.5 MHz Color Clock */ +extern unsigned long amiga_chip_size; /* Chip RAM Size (bytes) */ +extern unsigned char amiga_vblank; /* VBLANK Frequency */ +extern unsigned char amiga_psfreq; /* Power Supply Frequency */ #define AMIGAHW_DECLARE(name) unsigned name : 1 @@ -111,122 +111,122 @@ struct amiga_hw_present { extern struct amiga_hw_present amiga_hw_present; struct CUSTOM { - u_short bltddat; - u_short dmaconr; - u_short vposr; - u_short vhposr; - u_short dskdatr; - u_short joy0dat; - u_short joy1dat; - u_short clxdat; - u_short adkconr; - u_short pot0dat; - u_short pot1dat; - u_short potgor; - u_short serdatr; - u_short dskbytr; - u_short intenar; - u_short intreqr; - u_char *dskptr; - u_short dsklen; - u_short dskdat; - u_short refptr; - u_short vposw; - u_short vhposw; - u_short copcon; - u_short serdat; - u_short serper; - u_short potgo; - u_short joytest; - u_short strequ; - u_short strvbl; - u_short strhor; - u_short strlong; - u_short bltcon0; - u_short bltcon1; - u_short bltafwm; - u_short bltalwm; - u_char *bltcpt; - u_char *bltbpt; - u_char *bltapt; - u_char *bltdpt; - u_short bltsize; - u_char pad2d; - u_char bltcon0l; - u_short bltsizv; - u_short bltsizh; - u_short bltcmod; - u_short bltbmod; - u_short bltamod; - u_short bltdmod; - u_short spare2[4]; - u_short bltcdat; - u_short bltbdat; - u_short bltadat; - u_short spare3[3]; - u_short deniseid; - u_short dsksync; - u_short *cop1lc; - u_short *cop2lc; - u_short copjmp1; - u_short copjmp2; - u_short copins; - u_short diwstrt; - u_short diwstop; - u_short ddfstrt; - u_short ddfstop; - u_short dmacon; - u_short clxcon; - u_short intena; - u_short intreq; - u_short adkcon; + unsigned short bltddat; + unsigned short dmaconr; + unsigned short vposr; + unsigned short vhposr; + unsigned short dskdatr; + unsigned short joy0dat; + unsigned short joy1dat; + unsigned short clxdat; + unsigned short adkconr; + unsigned short pot0dat; + unsigned short pot1dat; + unsigned short potgor; + unsigned short serdatr; + unsigned short dskbytr; + unsigned short intenar; + unsigned short intreqr; + unsigned char *dskptr; + unsigned short dsklen; + unsigned short dskdat; + unsigned short refptr; + unsigned short vposw; + unsigned short vhposw; + unsigned short copcon; + unsigned short serdat; + unsigned short serper; + unsigned short potgo; + unsigned short joytest; + unsigned short strequ; + unsigned short strvbl; + unsigned short strhor; + unsigned short strlong; + unsigned short bltcon0; + unsigned short bltcon1; + unsigned short bltafwm; + unsigned short bltalwm; + unsigned char *bltcpt; + unsigned char *bltbpt; + unsigned char *bltapt; + unsigned char *bltdpt; + unsigned short bltsize; + unsigned char pad2d; + unsigned char bltcon0l; + unsigned short bltsizv; + unsigned short bltsizh; + unsigned short bltcmod; + unsigned short bltbmod; + unsigned short bltamod; + unsigned short bltdmod; + unsigned short spare2[4]; + unsigned short bltcdat; + unsigned short bltbdat; + unsigned short bltadat; + unsigned short spare3[3]; + unsigned short deniseid; + unsigned short dsksync; + unsigned short *cop1lc; + unsigned short *cop2lc; + unsigned short copjmp1; + unsigned short copjmp2; + unsigned short copins; + unsigned short diwstrt; + unsigned short diwstop; + unsigned short ddfstrt; + unsigned short ddfstop; + unsigned short dmacon; + unsigned short clxcon; + unsigned short intena; + unsigned short intreq; + unsigned short adkcon; struct { - u_short *audlc; - u_short audlen; - u_short audper; - u_short audvol; - u_short auddat; - u_short audspare[2]; + unsigned short *audlc; + unsigned short audlen; + unsigned short audper; + unsigned short audvol; + unsigned short auddat; + unsigned short audspare[2]; } aud[4]; - u_char *bplpt[8]; - u_short bplcon0; - u_short bplcon1; - u_short bplcon2; - u_short bplcon3; - u_short bpl1mod; - u_short bpl2mod; - u_short bplcon4; - u_short clxcon2; - u_short bpldat[8]; - u_char *sprpt[8]; + unsigned char *bplpt[8]; + unsigned short bplcon0; + unsigned short bplcon1; + unsigned short bplcon2; + unsigned short bplcon3; + unsigned short bpl1mod; + unsigned short bpl2mod; + unsigned short bplcon4; + unsigned short clxcon2; + unsigned short bpldat[8]; + unsigned char *sprpt[8]; struct { - u_short pos; - u_short ctl; - u_short dataa; - u_short datab; + unsigned short pos; + unsigned short ctl; + unsigned short dataa; + unsigned short datab; } spr[8]; - u_short color[32]; - u_short htotal; - u_short hsstop; - u_short hbstrt; - u_short hbstop; - u_short vtotal; - u_short vsstop; - u_short vbstrt; - u_short vbstop; - u_short sprhstrt; - u_short sprhstop; - u_short bplhstrt; - u_short bplhstop; - u_short hhposw; - u_short hhposr; - u_short beamcon0; - u_short hsstrt; - u_short vsstrt; - u_short hcenter; - u_short diwhigh; - u_short spare4[11]; - u_short fmode; + unsigned short color[32]; + unsigned short htotal; + unsigned short hsstop; + unsigned short hbstrt; + unsigned short hbstop; + unsigned short vtotal; + unsigned short vsstop; + unsigned short vbstrt; + unsigned short vbstop; + unsigned short sprhstrt; + unsigned short sprhstop; + unsigned short bplhstrt; + unsigned short bplhstop; + unsigned short hhposw; + unsigned short hhposr; + unsigned short beamcon0; + unsigned short hsstrt; + unsigned short vsstrt; + unsigned short hcenter; + unsigned short diwhigh; + unsigned short spare4[11]; + unsigned short fmode; }; /* @@ -249,21 +249,21 @@ struct CUSTOM { #define DMAF_ALL (0x01FF) struct CIA { - u_char pra; char pad0[0xff]; - u_char prb; char pad1[0xff]; - u_char ddra; char pad2[0xff]; - u_char ddrb; char pad3[0xff]; - u_char talo; char pad4[0xff]; - u_char tahi; char pad5[0xff]; - u_char tblo; char pad6[0xff]; - u_char tbhi; char pad7[0xff]; - u_char todlo; char pad8[0xff]; - u_char todmid; char pad9[0xff]; - u_char todhi; char pada[0x1ff]; - u_char sdr; char padb[0xff]; - u_char icr; char padc[0xff]; - u_char cra; char padd[0xff]; - u_char crb; char pade[0xff]; + unsigned char pra; char pad0[0xff]; + unsigned char prb; char pad1[0xff]; + unsigned char ddra; char pad2[0xff]; + unsigned char ddrb; char pad3[0xff]; + unsigned char talo; char pad4[0xff]; + unsigned char tahi; char pad5[0xff]; + unsigned char tblo; char pad6[0xff]; + unsigned char tbhi; char pad7[0xff]; + unsigned char todlo; char pad8[0xff]; + unsigned char todmid; char pad9[0xff]; + unsigned char todhi; char pada[0x1ff]; + unsigned char sdr; char padb[0xff]; + unsigned char icr; char padc[0xff]; + unsigned char cra; char padd[0xff]; + unsigned char crb; char pade[0xff]; }; #define zTwoBase (0x80000000) diff --git a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h index 97aac09b2..e17fdf7f8 100644 --- a/include/asm-m68k/bitops.h +++ b/include/asm-m68k/bitops.h @@ -236,8 +236,6 @@ extern __inline__ int ffs(int x) #define hweight16(x) generic_hweight16(x) #define hweight8(x) generic_hweight8(x) -#endif /* __KERNEL__ */ - /* Bitmap functions for the minix filesystem */ extern __inline__ int @@ -366,4 +364,6 @@ ext2_find_next_zero_bit (const void *vaddr, unsigned size, unsigned offset) return (p - addr) * 32 + res; } +#endif /* __KERNEL__ */ + #endif /* _M68K_BITOPS_H */ diff --git a/include/asm-m68k/checksum.h b/include/asm-m68k/checksum.h index d4a6e6fb9..f5236490a 100644 --- a/include/asm-m68k/checksum.h +++ b/include/asm-m68k/checksum.h @@ -16,7 +16,7 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum); /* - * the same as csum_partial_copy, but copies from src while it + * the same as csum_partial, but copies from src while it * checksums * * here even more important to align src and dst on a 32-bit (or even @@ -33,13 +33,9 @@ unsigned int csum_partial_copy(const char *src, char *dst, int len, int sum); * better 64-bit) boundary */ -unsigned int csum_partial_copy_fromuser(const char *src, char *dst, int len, int sum); +extern unsigned int csum_partial_copy_from_user(const char *src, char *dst, + int len, int sum, int *csum_err); -extern unsigned int -csum_partial_copy_from_user ( const char *src, char *dst, - int len, int sum, int *csum_err); - -/* FIXME: this needs to be written to really do no check -- Cort */ #define csum_partial_copy_nocheck(src, dst, len, sum) \ csum_partial_copy((src), (dst), (len), (sum)) diff --git a/include/asm-m68k/fcntl.h b/include/asm-m68k/fcntl.h index c1f6ea405..500d495bf 100644 --- a/include/asm-m68k/fcntl.h +++ b/include/asm-m68k/fcntl.h @@ -28,6 +28,8 @@ #define F_SETOWN 8 /* for sockets. */ #define F_GETOWN 9 /* for sockets. */ +#define F_SETSIG 10 /* for sockets. */ +#define F_GETSIG 11 /* for sockets. */ /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ diff --git a/include/asm-m68k/hardirq.h b/include/asm-m68k/hardirq.h index 350fc0f69..acae65fc6 100644 --- a/include/asm-m68k/hardirq.h +++ b/include/asm-m68k/hardirq.h @@ -7,12 +7,12 @@ extern unsigned int local_irq_count[NR_CPUS]; #define in_interrupt() (local_irq_count[smp_processor_id()] + local_bh_count[smp_processor_id()] != 0) -#define hardirq_trylock(cpu) (++local_irq_count[cpu], (cpu) == 0) -#define hardirq_endlock(cpu) (--local_irq_count[cpu]) +#define hardirq_trylock(cpu) (local_irq_count[cpu] == 0) +#define hardirq_endlock(cpu) do { } while (0) #define hardirq_enter(cpu) (local_irq_count[cpu]++) #define hardirq_exit(cpu) (local_irq_count[cpu]--) -#define synchronize_irq() do { } while (0) +#define synchronize_irq() barrier() #endif diff --git a/include/asm-m68k/io.h b/include/asm-m68k/io.h index a002fe2a0..d60096384 100644 --- a/include/asm-m68k/io.h +++ b/include/asm-m68k/io.h @@ -3,8 +3,7 @@ #ifdef __KERNEL__ -#include <linux/config.h> /* CONFIG_ATARI, CONFIG_HADES */ -#include <asm/byteorder.h> +#include <linux/config.h> #ifdef CONFIG_ATARI #include <asm/atarihw.h> @@ -12,6 +11,8 @@ #define SLOW_DOWN_IO do { if (MACH_IS_ATARI) MFPDELAY(); } while (0) #endif +#include <asm/virtconvert.h> + /* * readX/writeX() are used to access memory mapped devices. On some * architectures the memory mapped IO stuff needs to be accessed @@ -42,34 +43,6 @@ #define outb(x,addr) ((void) writeb(x,addr)) #define outb_p(x,addr) outb(x,addr) -/* - * Change virtual addresses to physical addresses and vv. - */ -extern unsigned long mm_vtop(unsigned long addr) __attribute__ ((const)); -extern unsigned long mm_ptov(unsigned long addr) __attribute__ ((const)); - -extern inline unsigned long virt_to_phys(volatile void * address) -{ - return mm_vtop((unsigned long)address); -} - -extern inline void * phys_to_virt(unsigned long address) -{ - return (void *) mm_ptov(address); -} - -/* - * IO bus memory addresses are 1:1 with the physical address, - * except on the PCI bus of the Hades. - */ -#ifdef CONFIG_HADES -#define virt_to_bus(a) (virt_to_phys(a) + (MACH_IS_HADES ? 0x80000000 : 0)) -#define bus_to_virt(a) (phys_to_virt((a) - (MACH_IS_HADES ? 0x80000000 : 0))) -#else -#define virt_to_bus virt_to_phys -#define bus_to_virt phys_to_virt -#endif - #endif /* __KERNEL__ */ #endif /* _M68K_IO_H */ diff --git a/include/asm-m68k/linux_logo.h b/include/asm-m68k/linux_logo.h index e57168b1e..85f7d03f1 100644 --- a/include/asm-m68k/linux_logo.h +++ b/include/asm-m68k/linux_logo.h @@ -26,9 +26,1422 @@ #define LINUX_LOGO_COLORS 221 #ifdef INCLUDE_LINUX_LOGO_DATA +unsigned char linux_logo_red[] __initdata = { + 0xF3, 0xF6, 0xF8, 0xF7, 0xEF, 0xE7, 0xE5, 0xE3, + 0xCA, 0xD4, 0xDD, 0xC8, 0xC7, 0xC4, 0xC2, 0xE5, + 0xF1, 0xED, 0xEE, 0xE6, 0xC6, 0xDA, 0xDD, 0xE5, + 0xD9, 0xC6, 0xE3, 0xD0, 0xC6, 0xBA, 0xB0, 0xB6, + 0xBB, 0xBE, 0xB9, 0xB8, 0xB3, 0xB2, 0xB0, 0xAD, + 0xAC, 0xA9, 0xA8, 0xA6, 0xA4, 0xA1, 0xA0, 0x9D, + 0xA0, 0x9F, 0x9E, 0x9C, 0x9B, 0x99, 0x9A, 0x99, + 0x98, 0x95, 0x96, 0x94, 0x93, 0x92, 0x8F, 0x8D, + 0x8C, 0x8A, 0x87, 0x86, 0x83, 0x81, 0x0D, 0x03, + 0x66, 0x44, 0x24, 0x08, 0xD6, 0xE6, 0xE9, 0xE6, + 0xE7, 0xCA, 0xDC, 0xDB, 0xD5, 0xD0, 0xC9, 0xE2, + 0xD5, 0xC6, 0xC4, 0xB3, 0xB2, 0xB9, 0xA9, 0x9A, + 0xB2, 0x9D, 0xE8, 0xEC, 0xF5, 0xF5, 0xF4, 0xF4, + 0xEC, 0xEE, 0xF0, 0xF5, 0xE0, 0xD6, 0xC5, 0xC2, + 0xD9, 0xD5, 0xD8, 0xD6, 0xF6, 0xF4, 0xED, 0xEC, + 0xEB, 0xF1, 0xF6, 0xF5, 0xF5, 0xEE, 0xEF, 0xEC, + 0xE7, 0xE3, 0xE6, 0xD6, 0xDD, 0xC3, 0xD6, 0xD7, + 0xCD, 0xCA, 0xC3, 0xAC, 0x95, 0x99, 0xB7, 0xA3, + 0x8B, 0x88, 0x95, 0x8A, 0x94, 0xD2, 0xCC, 0xC4, + 0xA8, 0x8E, 0x8F, 0xAE, 0xB8, 0xAC, 0xB6, 0xB4, + 0xAD, 0xA5, 0xA0, 0x9B, 0x8B, 0xA3, 0x94, 0x87, + 0x85, 0x89, 0x53, 0x80, 0x7D, 0x7C, 0x7A, 0x78, + 0x76, 0x71, 0x73, 0x6E, 0x6B, 0x67, 0x65, 0x62, + 0x4B, 0x5B, 0x5F, 0x53, 0x56, 0x52, 0x4F, 0x46, + 0x42, 0x0F, 0x75, 0x78, 0x7D, 0x72, 0x5F, 0x6E, + 0x7A, 0x75, 0x6A, 0x58, 0x48, 0x4F, 0x00, 0x2B, + 0x37, 0x3E, 0x32, 0x33, 0x25, 0x2C, 0x3B, 0x11, + 0x1D, 0x14, 0x06, 0x02, 0x00 +}; -#define INCLUDE_LINUX_LOGO16 -#include <linux/linux_logo.h> +unsigned char linux_logo_green[] __initdata = { + 0xF3, 0xF6, 0xF8, 0xF7, 0xEF, 0xE7, 0xE5, 0xE3, + 0xCA, 0xD4, 0xDD, 0xC8, 0xC7, 0xC4, 0xC2, 0xD3, + 0xDA, 0xD4, 0xD7, 0xCC, 0xC1, 0xCC, 0xCB, 0xC9, + 0xC5, 0xBC, 0xBC, 0xBB, 0xB7, 0xA5, 0xB0, 0xB6, + 0xBB, 0xBE, 0xB9, 0xB8, 0xB3, 0xB2, 0xAD, 0xAD, + 0xAC, 0xA9, 0xA8, 0xA6, 0xA4, 0xA1, 0xA0, 0x95, + 0xA0, 0x9F, 0x9E, 0x9C, 0x9B, 0x99, 0x9A, 0x99, + 0x98, 0x95, 0x96, 0x94, 0x93, 0x92, 0x8F, 0x8D, + 0x8C, 0x8A, 0x87, 0x86, 0x83, 0x81, 0x08, 0x02, + 0x53, 0x2E, 0x19, 0x06, 0xC6, 0xC8, 0xCF, 0xBD, + 0xB3, 0xB6, 0xB4, 0xAB, 0xA5, 0xA3, 0x9B, 0xB6, + 0xA7, 0x99, 0x92, 0xA4, 0x9E, 0x9D, 0x98, 0x8C, + 0x8A, 0x86, 0xCD, 0xCC, 0xC9, 0xD7, 0xCA, 0xC4, + 0xCA, 0xC3, 0xC7, 0xC3, 0xC8, 0xB4, 0x91, 0x8E, + 0x8A, 0x82, 0x87, 0x85, 0xBD, 0xBF, 0xB6, 0xBC, + 0xAE, 0xB7, 0xBC, 0xB8, 0xBF, 0xB6, 0xBC, 0xB5, + 0xAB, 0xA6, 0xAD, 0xB2, 0xA5, 0x87, 0x9C, 0x96, + 0x95, 0x8E, 0x87, 0x8F, 0x86, 0x86, 0x8E, 0x80, + 0x7A, 0x70, 0x7B, 0x78, 0x78, 0x7F, 0x77, 0x6F, + 0x70, 0x76, 0x59, 0x77, 0x68, 0x64, 0x7B, 0x7C, + 0x75, 0x6D, 0x77, 0x69, 0x65, 0x5F, 0x5B, 0x54, + 0x4F, 0x5B, 0x39, 0x80, 0x7D, 0x7C, 0x7A, 0x78, + 0x76, 0x71, 0x73, 0x6E, 0x6B, 0x67, 0x65, 0x62, + 0x4B, 0x5B, 0x5F, 0x53, 0x56, 0x52, 0x4F, 0x46, + 0x42, 0x0B, 0x69, 0x66, 0x64, 0x57, 0x4A, 0x4E, + 0x55, 0x4B, 0x46, 0x3B, 0x30, 0x33, 0x00, 0x2B, + 0x37, 0x3E, 0x32, 0x33, 0x25, 0x2C, 0x29, 0x0D, + 0x1D, 0x14, 0x06, 0x02, 0x00 +}; + +unsigned char linux_logo_blue[] __initdata = { + 0xF3, 0xF6, 0xF8, 0xF7, 0xEF, 0xEE, 0xE5, 0xDE, + 0xD7, 0xD3, 0xDD, 0xC8, 0xC7, 0xC4, 0xC2, 0xB5, + 0xB0, 0xA6, 0xAC, 0x9B, 0xB5, 0xB5, 0xAE, 0x84, + 0x90, 0xA9, 0x81, 0x8D, 0x96, 0x86, 0xB0, 0xB6, + 0xBB, 0xBE, 0xB9, 0xB8, 0xB3, 0xB2, 0xA7, 0xAD, + 0xAC, 0xA9, 0xA8, 0xA6, 0xA4, 0xA1, 0xA5, 0x87, + 0xA0, 0x9F, 0x9E, 0x9C, 0x9B, 0x9A, 0x9A, 0x99, + 0x98, 0x95, 0x96, 0x94, 0x93, 0x92, 0x8F, 0x8D, + 0x8C, 0x8A, 0x87, 0x86, 0x83, 0x81, 0xC8, 0xD7, + 0x9B, 0x8E, 0x8C, 0xB2, 0x77, 0x77, 0x4E, 0x77, + 0x69, 0x71, 0x78, 0x6B, 0x65, 0x66, 0x64, 0x59, + 0x5C, 0x5A, 0x48, 0x72, 0x7B, 0x6B, 0x67, 0x6E, + 0x42, 0x5B, 0x29, 0x36, 0x25, 0x10, 0x17, 0x14, + 0x19, 0x16, 0x13, 0x0E, 0x08, 0x2E, 0x2E, 0x3D, + 0x24, 0x24, 0x24, 0x24, 0x13, 0x12, 0x14, 0x14, + 0x0E, 0x08, 0x0D, 0x0F, 0x08, 0x0D, 0x0E, 0x08, + 0x08, 0x0C, 0x06, 0x06, 0x07, 0x16, 0x07, 0x0E, + 0x08, 0x0A, 0x07, 0x0D, 0x2D, 0x3E, 0x09, 0x4E, + 0x68, 0x52, 0x56, 0x58, 0x4B, 0x22, 0x20, 0x20, + 0x27, 0x39, 0x28, 0x19, 0x1E, 0x1E, 0x08, 0x06, + 0x07, 0x09, 0x08, 0x08, 0x05, 0x1D, 0x1F, 0x17, + 0x18, 0x06, 0x79, 0x80, 0x7D, 0x7C, 0x7A, 0x78, + 0x76, 0x71, 0x73, 0x6E, 0x6B, 0x68, 0x65, 0x62, + 0x4B, 0x5B, 0x5F, 0x55, 0x56, 0x52, 0x4F, 0x46, + 0x42, 0x5A, 0x14, 0x23, 0x3D, 0x2B, 0x21, 0x14, + 0x06, 0x04, 0x03, 0x07, 0x09, 0x13, 0x2A, 0x3A, + 0x37, 0x3E, 0x32, 0x33, 0x25, 0x2C, 0x07, 0x09, + 0x1D, 0x14, 0x06, 0x02, 0x00 +}; + +unsigned char linux_logo[] __initdata = { + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x58, 0x57, + 0x58, 0x58, 0x59, 0x5C, 0x5D, 0x5F, 0x60, 0x61, + 0x62, 0x61, 0x61, 0x62, 0x62, 0x62, 0x63, 0x63, + 0x61, 0x61, 0x61, 0x61, 0x61, 0x60, 0x5E, 0x5E, + 0x5E, 0x5D, 0x5D, 0x5C, 0x5D, 0x5B, 0x58, 0x58, + 0x58, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x58, + 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x58, 0x57, + 0x54, 0x56, 0x57, 0x67, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x67, 0x4C, + 0x4A, 0x49, 0x4A, 0x49, 0x4A, 0x49, 0x49, 0x4A, + 0x4A, 0x4B, 0x4B, 0x4B, 0x4C, 0x50, 0x51, 0x52, + 0x54, 0x54, 0x56, 0x57, 0x57, 0x57, 0x57, 0x58, + 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x58, 0x56, 0x56, 0x53, + 0x52, 0x53, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFB, 0xFB, 0xFB, + 0x4B, 0x4B, 0x4B, 0x4A, 0x49, 0x4A, 0x4A, 0x49, + 0x49, 0x49, 0x48, 0x49, 0x49, 0x4A, 0x4A, 0x4B, + 0x4C, 0x4D, 0x52, 0x54, 0x56, 0x55, 0x57, 0x58, + 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x55, 0x54, 0x53, 0x52, 0x51, 0x50, + 0x50, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xF8, 0xF0, 0xF4, 0xFB, + 0xFC, 0x67, 0x53, 0x50, 0x4D, 0x4C, 0x4C, 0x4C, + 0x4B, 0x4A, 0x4A, 0x48, 0x49, 0x48, 0x48, 0x49, + 0x49, 0x49, 0x4B, 0x4C, 0x50, 0x52, 0x53, 0x56, + 0x57, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x55, 0x54, 0x53, 0x51, 0x51, 0x50, 0x4C, 0x4D, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xF4, 0xD2, 0xD7, 0xF5, + 0xFC, 0xFC, 0x5D, 0x5D, 0x5C, 0x5C, 0x59, 0x58, + 0x58, 0x56, 0x52, 0x4C, 0x4B, 0x4A, 0x4A, 0x48, + 0x48, 0x48, 0x48, 0x48, 0x49, 0x4B, 0x4D, 0x51, + 0x54, 0x56, 0x58, 0x57, 0x57, 0x58, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x58, 0x57, 0x57, 0x57, 0x55, 0x54, + 0x53, 0x52, 0x51, 0x4D, 0x4D, 0x4D, 0x50, 0x50, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xF4, 0x64, 0xD9, 0xF5, + 0xF9, 0xFC, 0xFC, 0x64, 0x63, 0x62, 0x61, 0x61, + 0x61, 0x60, 0x5E, 0x5B, 0x5A, 0x54, 0x52, 0x4C, + 0x4B, 0x49, 0x49, 0x47, 0x47, 0x48, 0x49, 0x4B, + 0x4C, 0x51, 0x53, 0x56, 0x57, 0x58, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x58, 0x57, 0x57, 0x55, 0x53, 0x53, + 0x51, 0x50, 0x50, 0x50, 0x50, 0x50, 0x53, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xF4, 0xF5, 0xF9, 0xFC, + 0xFC, 0xFC, 0xFC, 0x64, 0x64, 0x64, 0x64, 0x64, + 0x64, 0x64, 0x64, 0x63, 0x61, 0x61, 0x5E, 0x59, + 0x55, 0x52, 0x4C, 0x4A, 0x49, 0x47, 0x48, 0x48, + 0x49, 0x4B, 0x4D, 0x51, 0x54, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x58, 0x55, 0x54, 0x54, 0x52, 0x51, + 0x51, 0x51, 0x51, 0x51, 0x53, 0x54, 0x59, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xF7, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0x60, 0x60, 0x60, 0x61, + 0x62, 0x63, 0x64, 0x64, 0x65, 0x65, 0x64, 0x63, + 0x61, 0x5E, 0x59, 0x56, 0x4D, 0x4B, 0x48, 0x48, + 0x48, 0x48, 0x49, 0x4B, 0x50, 0x53, 0x56, 0x56, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x56, 0x54, 0x53, 0x52, 0x51, 0x51, + 0x51, 0x52, 0x53, 0x55, 0x59, 0x5D, 0x5E, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFB, 0xFB, 0xFB, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0x4C, 0x4E, 0x51, 0x52, + 0x57, 0x5A, 0x5E, 0x60, 0x61, 0x63, 0x65, 0xCB, + 0x64, 0x64, 0x63, 0x60, 0x5C, 0x57, 0x50, 0x4B, + 0x48, 0x47, 0x47, 0x47, 0x4A, 0x4C, 0x52, 0x53, + 0x54, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x55, 0x54, 0x53, 0x53, 0x51, 0x52, 0x52, 0x53, + 0x53, 0x57, 0x5A, 0x5D, 0x5E, 0x5E, 0x60, 0xFC, + 0xFC, 0xFC, 0xFB, 0xF9, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFA, 0xF9, 0xF5, 0xFB, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFB, 0x45, 0x3F, 0x3F, + 0x45, 0x48, 0x4B, 0x4D, 0x54, 0x5A, 0x5E, 0x61, + 0x63, 0xCB, 0xCB, 0x65, 0x64, 0x62, 0x5E, 0x57, + 0x50, 0x4B, 0x48, 0x47, 0x47, 0x48, 0x4B, 0x4D, + 0x51, 0x56, 0x56, 0x57, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x55, + 0x54, 0x54, 0x53, 0x53, 0x52, 0x53, 0x54, 0x57, + 0x59, 0x5C, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0xFC, + 0xFC, 0xFA, 0xFC, 0xFA, 0xE0, 0xFC, 0xFC, 0xFC, + 0xFB, 0xFB, 0xFB, 0xDF, 0xD8, 0xF9, 0xE0, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFB, 0x4C, 0x4A, 0x48, + 0x48, 0x3E, 0x44, 0x43, 0x3F, 0x47, 0x4B, 0x52, + 0x5A, 0x5E, 0x62, 0x64, 0xCB, 0xCB, 0x64, 0x61, + 0x5E, 0x57, 0x4D, 0x49, 0x47, 0x47, 0x48, 0x4A, + 0x4C, 0x52, 0x54, 0x56, 0x57, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x55, + 0x54, 0x53, 0x53, 0x54, 0x54, 0x55, 0x58, 0x5B, + 0x5C, 0x5D, 0x5E, 0x5D, 0x5D, 0x5B, 0x58, 0xFC, + 0xFC, 0xD8, 0x4C, 0x60, 0xFC, 0xF5, 0xFC, 0xFC, + 0xFC, 0xF7, 0x5F, 0x48, 0x48, 0x2C, 0xF8, 0xF9, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x4B, 0x4A, 0x49, + 0x49, 0x49, 0x49, 0x47, 0x3E, 0x44, 0x42, 0x3F, + 0x3E, 0x4B, 0x54, 0x5C, 0x61, 0x64, 0xCB, 0xCB, + 0x64, 0x61, 0x5D, 0x53, 0x4B, 0x49, 0x47, 0x47, + 0x49, 0x4B, 0x50, 0x53, 0x56, 0x57, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x57, 0x55, 0x55, 0x54, + 0x53, 0x53, 0x54, 0x56, 0x58, 0x5A, 0x5B, 0x5D, + 0x5D, 0x5D, 0x5C, 0x5A, 0x54, 0x52, 0x4C, 0xFC, + 0xF7, 0x4E, 0x2D, 0x29, 0x4E, 0xFC, 0xFC, 0xFC, + 0xFB, 0x5F, 0x26, 0x24, 0x20, 0x2E, 0x65, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x45, 0x3F, 0x45, + 0x3E, 0x47, 0x47, 0x47, 0x47, 0x47, 0x3E, 0x44, + 0x43, 0x40, 0x44, 0x49, 0x51, 0x5C, 0x62, 0x64, + 0xCB, 0xCB, 0x63, 0x60, 0x58, 0x50, 0x49, 0x48, + 0x48, 0x48, 0x4A, 0x4D, 0x53, 0x54, 0x57, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x55, 0x54, 0x54, 0x54, + 0x54, 0x54, 0x55, 0x57, 0x59, 0x5B, 0x5C, 0x5D, + 0x5C, 0x5A, 0x54, 0x51, 0x4C, 0x4C, 0x54, 0xFC, + 0xF9, 0x23, 0xDB, 0x2D, 0x23, 0xFA, 0xFB, 0xFA, + 0xF5, 0x27, 0x21, 0xD9, 0xF8, 0x20, 0x21, 0xFB, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x5D, 0x58, 0x55, + 0x50, 0x48, 0x45, 0x43, 0x44, 0x44, 0x45, 0x45, + 0x3E, 0x3F, 0x43, 0x41, 0x3F, 0x48, 0x52, 0x5D, + 0x63, 0x65, 0xCB, 0x65, 0x61, 0x5D, 0x52, 0x4B, + 0x48, 0x47, 0x47, 0x49, 0x4C, 0x51, 0x54, 0x57, + 0x57, 0x57, 0x57, 0x57, 0x55, 0x54, 0x54, 0x54, + 0x54, 0x58, 0x5A, 0x59, 0x5B, 0x5B, 0x5B, 0x5A, + 0x55, 0x52, 0x4D, 0x4D, 0x55, 0x5B, 0x5D, 0xFC, + 0xF1, 0xF9, 0xFC, 0xD4, 0x21, 0xCC, 0xF7, 0xF8, + 0xF2, 0x21, 0xD9, 0xFC, 0xF2, 0xFB, 0x21, 0x45, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFB, 0xD1, 0xD0, 0xCD, + 0xCC, 0x63, 0x5E, 0x58, 0x50, 0x47, 0x43, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x40, 0x41, 0x3F, 0x4A, + 0x56, 0x5E, 0x64, 0xCB, 0x65, 0x63, 0x5E, 0x56, + 0x4C, 0x48, 0x47, 0x47, 0x49, 0x4C, 0x51, 0x54, + 0x58, 0x57, 0x57, 0x57, 0x57, 0x55, 0x54, 0x54, + 0x57, 0x5A, 0x5A, 0x5C, 0x5B, 0x5A, 0x58, 0x54, + 0x51, 0x4C, 0x55, 0x5D, 0x5D, 0x5B, 0x54, 0xFC, + 0xF0, 0xF9, 0xFC, 0x65, 0x45, 0xCD, 0xFB, 0xFB, + 0xF8, 0x26, 0xFB, 0xFC, 0xFC, 0xFC, 0x21, 0x27, + 0xFB, 0xFC, 0xFC, 0xFC, 0xFB, 0xD7, 0x35, 0x34, + 0x2F, 0x35, 0x36, 0x2F, 0x2F, 0x36, 0x2F, 0x2F, + 0x36, 0x36, 0x35, 0x35, 0x43, 0x42, 0x41, 0x2E, + 0x45, 0x4C, 0x5B, 0x62, 0x65, 0xCC, 0x64, 0x60, + 0x58, 0x4D, 0x49, 0x47, 0x47, 0x49, 0x4C, 0x51, + 0x58, 0x57, 0x57, 0x57, 0x57, 0x57, 0x55, 0x57, + 0x58, 0x5A, 0x5A, 0x5B, 0x5A, 0x55, 0x54, 0x51, + 0x53, 0x5C, 0x5D, 0x5D, 0x54, 0x4B, 0x4D, 0xFC, + 0xFC, 0x44, 0xFC, 0xFB, 0x7B, 0xAB, 0xA8, 0xAE, + 0xAB, 0x7F, 0xFC, 0xFC, 0xFB, 0xFB, 0x22, 0x2A, + 0xFC, 0xFC, 0xFC, 0xFC, 0x36, 0x2F, 0x30, 0x30, + 0x32, 0x30, 0x32, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x30, 0x2F, 0x2F, 0x40, 0x41, + 0x2E, 0x40, 0x48, 0x56, 0x5F, 0x64, 0xCC, 0x65, + 0x61, 0x59, 0x50, 0x49, 0x47, 0x47, 0x49, 0x4C, + 0x5A, 0x57, 0x57, 0x57, 0x57, 0x57, 0x57, 0x58, + 0x5A, 0x5A, 0x5A, 0x58, 0x55, 0x52, 0x51, 0x5A, + 0x5D, 0x5D, 0x57, 0x4C, 0x51, 0x54, 0x5D, 0xFC, + 0xFC, 0x2A, 0xFC, 0xC9, 0xAA, 0x8B, 0x8A, 0x8C, + 0xAB, 0x8C, 0x8C, 0xFB, 0xFB, 0x23, 0x20, 0xF1, + 0xFC, 0xFC, 0xFC, 0x3B, 0x33, 0x33, 0x32, 0x32, + 0x31, 0x32, 0x30, 0x32, 0x32, 0x32, 0x32, 0x30, + 0x31, 0x31, 0x31, 0x32, 0x33, 0x33, 0x3C, 0x41, + 0x41, 0x2E, 0x2D, 0x45, 0x4D, 0x5D, 0x63, 0xCC, + 0x65, 0x62, 0x5D, 0x51, 0x49, 0x47, 0x47, 0x4A, + 0x59, 0x57, 0x57, 0x57, 0x57, 0x58, 0x58, 0x58, + 0x5A, 0x5A, 0x58, 0x55, 0x53, 0x53, 0x5C, 0x5E, + 0x59, 0x51, 0x4E, 0x54, 0x59, 0x5E, 0x62, 0xFC, + 0xFC, 0xDB, 0xAA, 0xA1, 0x95, 0x9C, 0x8C, 0x88, + 0x82, 0x83, 0x83, 0x8C, 0x88, 0xAE, 0xB9, 0xFB, + 0xFC, 0xFC, 0xFC, 0x3C, 0x3B, 0x72, 0x38, 0x33, + 0x33, 0x33, 0x31, 0x33, 0x31, 0x31, 0x31, 0x31, + 0x33, 0x33, 0x38, 0x33, 0x72, 0x3B, 0x44, 0x2E, + 0x41, 0x2E, 0x2E, 0x2D, 0x43, 0x4B, 0x5B, 0x63, + 0xCB, 0xCC, 0x63, 0x5D, 0x51, 0x49, 0x47, 0x49, + 0x5C, 0x58, 0x57, 0x57, 0x57, 0x57, 0x58, 0x58, + 0x58, 0x58, 0x57, 0x53, 0x58, 0x5D, 0x5E, 0x55, + 0x51, 0x53, 0x58, 0x5E, 0x60, 0x63, 0x64, 0xFC, + 0xFC, 0xC0, 0xA6, 0x9D, 0x8B, 0x9C, 0x8C, 0x8C, + 0x6E, 0x83, 0x88, 0x8C, 0x8C, 0x8C, 0x83, 0xE8, + 0xFB, 0xFC, 0xFC, 0xFC, 0x33, 0x70, 0x70, 0x6F, + 0x6F, 0x6F, 0x6F, 0x3A, 0x6F, 0x6D, 0x6F, 0x6F, + 0x70, 0x6F, 0x6F, 0x70, 0x6F, 0x32, 0x5A, 0x48, + 0x41, 0x2D, 0x2D, 0x2D, 0x2C, 0x41, 0x49, 0x5A, + 0x62, 0xCB, 0xCB, 0x63, 0x5D, 0x50, 0x49, 0x4A, + 0x5C, 0x58, 0x58, 0x57, 0x55, 0x57, 0x57, 0x57, + 0x57, 0x55, 0x56, 0x59, 0x5E, 0x5C, 0x52, 0x53, + 0x55, 0x5B, 0x5E, 0x61, 0x63, 0x64, 0x63, 0xFC, + 0xE8, 0xBF, 0xA4, 0x99, 0x9C, 0x8C, 0x88, 0x88, + 0x6E, 0x88, 0x8C, 0x8C, 0x8C, 0xC2, 0xA6, 0xC4, + 0xFC, 0xFC, 0xFC, 0xFC, 0x36, 0x3A, 0x6F, 0x70, + 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, + 0x70, 0x70, 0x70, 0x70, 0x37, 0x32, 0xCD, 0x5E, + 0x4C, 0x43, 0x2C, 0x2D, 0x2D, 0x2C, 0x2E, 0x47, + 0x57, 0x61, 0x65, 0xCC, 0x63, 0x5C, 0x50, 0x4D, + 0x5C, 0x5A, 0x57, 0x55, 0x55, 0x55, 0x58, 0x58, + 0x55, 0x54, 0x5B, 0x5E, 0x5D, 0x53, 0x53, 0x55, + 0x5D, 0x5E, 0x61, 0x61, 0x61, 0x61, 0x5E, 0xFC, + 0xEA, 0xBE, 0xA4, 0x9B, 0x8B, 0x85, 0x8C, 0x6E, + 0x8C, 0x8C, 0x8C, 0xA3, 0xAA, 0xA4, 0xA4, 0xE9, + 0xFB, 0xFC, 0xFC, 0xFC, 0x36, 0x6D, 0x70, 0x73, + 0x70, 0x70, 0x70, 0x73, 0x73, 0x73, 0x73, 0x70, + 0x70, 0x70, 0x73, 0x70, 0x37, 0x38, 0xD1, 0xCF, + 0x61, 0x4D, 0x44, 0x2C, 0x2D, 0x2E, 0x2C, 0x2E, + 0x3E, 0x56, 0x61, 0xCB, 0xCC, 0x62, 0x5B, 0x57, + 0x59, 0x58, 0x55, 0x54, 0x54, 0x55, 0x58, 0x58, + 0x58, 0x5B, 0x5E, 0x5B, 0x53, 0x55, 0x55, 0x5C, + 0x5E, 0x61, 0x61, 0x60, 0x5D, 0x5A, 0x4E, 0xFC, + 0xFC, 0xEA, 0xAA, 0x9C, 0x8A, 0x85, 0x82, 0x8C, + 0x8C, 0xA8, 0xEB, 0xA8, 0xA4, 0xA4, 0xAA, 0xFC, + 0xFC, 0xFC, 0x64, 0xFB, 0x39, 0x31, 0x72, 0x78, + 0x73, 0x78, 0x73, 0x74, 0x74, 0x74, 0x74, 0x73, + 0x78, 0x70, 0x73, 0x73, 0x33, 0xCC, 0xD2, 0xD1, + 0xCE, 0x62, 0x53, 0x3F, 0x2D, 0x2D, 0x41, 0x2C, + 0x2E, 0x3E, 0x56, 0x62, 0xCB, 0xCB, 0x61, 0x5D, + 0x54, 0x54, 0x54, 0x54, 0x56, 0x58, 0x58, 0x58, + 0x5C, 0x5E, 0x5A, 0x55, 0x58, 0x58, 0x5B, 0x5E, + 0x61, 0x5E, 0x5D, 0x5A, 0x52, 0x55, 0xCD, 0xFC, + 0xFC, 0x34, 0xC9, 0xE8, 0xA8, 0xAE, 0xC2, 0xE8, + 0xC3, 0xA6, 0xA7, 0xA6, 0xAA, 0x78, 0x2E, 0x42, + 0xFC, 0xFC, 0xD2, 0x64, 0xF8, 0x31, 0x72, 0x73, + 0x73, 0x73, 0x73, 0x74, 0x75, 0x75, 0x74, 0x73, + 0x73, 0x73, 0x73, 0x72, 0x33, 0x5C, 0x64, 0xD2, + 0xD1, 0xCF, 0x63, 0x54, 0x3F, 0x2C, 0x41, 0x41, + 0x2C, 0x2E, 0x47, 0x58, 0x63, 0xCB, 0xCB, 0x62, + 0x52, 0x53, 0x53, 0x56, 0x58, 0x58, 0x5A, 0x5B, + 0x5E, 0x5A, 0x57, 0x58, 0x58, 0x58, 0x60, 0x60, + 0x5D, 0x5A, 0x55, 0x4E, 0x64, 0xD2, 0xD1, 0xFC, + 0xFC, 0x41, 0x3E, 0xC1, 0xC0, 0xA3, 0xA6, 0xA7, + 0xA7, 0xA9, 0xAA, 0xB8, 0x2E, 0x3F, 0x2C, 0x41, + 0xFC, 0xFC, 0xF7, 0xCE, 0xCD, 0x36, 0x72, 0x73, + 0x74, 0x75, 0x78, 0x75, 0x75, 0x75, 0x74, 0x74, + 0x74, 0x74, 0x78, 0x72, 0x6D, 0x49, 0x59, 0xCB, + 0xD1, 0xD1, 0xD2, 0xCB, 0x56, 0x3F, 0x2C, 0x41, + 0x40, 0x2D, 0x2E, 0x49, 0x5B, 0x64, 0xCC, 0x64, + 0x51, 0x53, 0x53, 0x55, 0x58, 0x59, 0x5B, 0x5E, + 0x59, 0x58, 0x58, 0x58, 0x55, 0x60, 0x60, 0x5C, + 0x5A, 0x53, 0x5B, 0xD0, 0xD3, 0xD3, 0xD3, 0xFB, + 0xFC, 0x40, 0x41, 0x45, 0xC4, 0xC0, 0xBE, 0xBE, + 0xC1, 0xC0, 0x3C, 0x47, 0x2E, 0x21, 0x22, 0x20, + 0x65, 0xFC, 0xFC, 0xFC, 0xFC, 0x6D, 0x72, 0x75, + 0x78, 0x76, 0x75, 0x79, 0x76, 0x76, 0x76, 0x76, + 0x75, 0x75, 0x75, 0x72, 0x6D, 0x2E, 0x48, 0x5D, + 0xCE, 0xD1, 0xD4, 0xD3, 0xCB, 0x56, 0x43, 0x2C, + 0x42, 0x43, 0x2E, 0x2E, 0x4A, 0x5D, 0x64, 0x64, + 0x50, 0x52, 0x56, 0x58, 0x5C, 0x5D, 0x5E, 0x5D, + 0x5A, 0x58, 0x58, 0x55, 0x61, 0x60, 0x58, 0x58, + 0x4E, 0x61, 0xD1, 0xD4, 0xD4, 0xD1, 0xEE, 0xFC, + 0xFC, 0x2B, 0x29, 0x2E, 0x3F, 0xB0, 0xAD, 0x81, + 0x46, 0x2D, 0x46, 0x2C, 0x24, 0x22, 0x22, 0x23, + 0x25, 0xFC, 0xFC, 0xFC, 0xFC, 0x6E, 0x73, 0x76, + 0x76, 0x79, 0x79, 0x79, 0x76, 0x76, 0x79, 0x76, + 0x79, 0x79, 0x79, 0x74, 0x3F, 0x41, 0x2C, 0x48, + 0x5F, 0xCF, 0xD5, 0xD7, 0xD6, 0xCD, 0x57, 0x40, + 0x2E, 0x3F, 0x44, 0x2E, 0x41, 0x4C, 0x60, 0x61, + 0x51, 0x53, 0x58, 0x5C, 0x5D, 0x5E, 0x5D, 0x5C, + 0x58, 0x57, 0x54, 0x5F, 0x5E, 0x55, 0x55, 0x52, + 0x64, 0xD4, 0xD5, 0xD4, 0xD1, 0x5D, 0xFA, 0xFB, + 0xF4, 0x21, 0x24, 0x41, 0x40, 0x44, 0x2E, 0x2E, + 0x42, 0x41, 0x2A, 0x24, 0x22, 0x22, 0x22, 0x22, + 0x23, 0xD9, 0xFC, 0xFC, 0xFC, 0xFC, 0xE5, 0xB8, + 0x8F, 0x8F, 0x7A, 0x8F, 0x7A, 0x8F, 0x7A, 0x8F, + 0x8F, 0x8F, 0xB8, 0xE5, 0x3F, 0x3E, 0x43, 0x2C, + 0x48, 0x61, 0xD1, 0xD7, 0xD9, 0xD7, 0xD0, 0x57, + 0x41, 0x2E, 0x3E, 0x44, 0x2D, 0x40, 0x52, 0x5D, + 0x53, 0x55, 0x59, 0x5D, 0x5E, 0x5E, 0x5D, 0x5A, + 0x57, 0x53, 0x5E, 0x5E, 0x54, 0x53, 0x54, 0x65, + 0xD5, 0xD6, 0xD4, 0xCE, 0x53, 0xFB, 0xF9, 0xFC, + 0x24, 0x22, 0x23, 0x23, 0x41, 0x42, 0x2E, 0x40, + 0x2B, 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x23, 0x23, 0xFC, 0xFC, 0xFC, 0xFC, 0xE7, 0xBD, + 0xB5, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, + 0x93, 0xB5, 0xC6, 0xEB, 0x2D, 0x47, 0x4A, 0x47, + 0x2C, 0x3E, 0x61, 0xD4, 0xDC, 0xDC, 0xDA, 0xCF, + 0x54, 0x41, 0x41, 0x3E, 0x45, 0x2C, 0x3F, 0x4A, + 0x58, 0x5A, 0x5C, 0x5F, 0x60, 0x5E, 0x5D, 0x57, + 0x51, 0x5D, 0x5D, 0x51, 0x53, 0x53, 0xCB, 0xD5, + 0xD6, 0xD5, 0x63, 0x55, 0xFC, 0xFC, 0xFC, 0x2C, + 0x23, 0x22, 0x23, 0x22, 0x20, 0x2D, 0x2C, 0x26, + 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x21, 0xF0, 0xFC, 0xFC, 0xFC, 0xE2, 0xC6, + 0xB5, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, + 0x93, 0x93, 0xC7, 0xE3, 0x3E, 0x2E, 0x49, 0x52, + 0x4C, 0x41, 0x44, 0x62, 0xD6, 0xDE, 0xDE, 0xD9, + 0xD0, 0x51, 0x2E, 0x40, 0x47, 0x44, 0x2C, 0x42, + 0x5D, 0x5D, 0x5F, 0x60, 0x60, 0x5D, 0x57, 0x51, + 0x58, 0x5D, 0x4E, 0x52, 0x55, 0x64, 0xD5, 0xD6, + 0xD4, 0x61, 0x59, 0x6B, 0xFC, 0xFC, 0xFC, 0x21, + 0x23, 0x22, 0x23, 0x22, 0x23, 0x21, 0x23, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x21, 0x24, 0xFC, 0xFC, 0xFC, 0xE2, 0xC7, + 0xB5, 0x90, 0x93, 0x93, 0x93, 0x90, 0x93, 0x93, + 0x90, 0xB5, 0xC8, 0xE4, 0x5F, 0x45, 0x2E, 0x4D, + 0x57, 0x57, 0x44, 0x43, 0x63, 0xDA, 0xDF, 0xDF, + 0xD9, 0xCE, 0x4C, 0x2C, 0x3F, 0x3E, 0x40, 0x40, + 0x60, 0x5E, 0x61, 0x61, 0x5E, 0x5B, 0x53, 0x52, + 0x5C, 0x52, 0x52, 0x55, 0x61, 0xD4, 0xD5, 0xD1, + 0x5E, 0x5B, 0x5C, 0xFB, 0xFC, 0xFC, 0x2A, 0x21, + 0x23, 0x22, 0x23, 0x22, 0x22, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x22, 0x22, 0x22, 0xFB, 0xFC, 0xFC, 0xB3, 0xC8, + 0xB5, 0x90, 0x92, 0xB5, 0x93, 0x93, 0xB5, 0x93, + 0x92, 0xB5, 0xC8, 0xB9, 0xD0, 0x5E, 0x44, 0x40, + 0x52, 0x58, 0x57, 0x48, 0x40, 0x63, 0xD9, 0xE0, + 0xE0, 0xD9, 0xCB, 0x49, 0x2D, 0x3F, 0x45, 0x3F, + 0x63, 0x61, 0x62, 0x60, 0x5E, 0x55, 0x4D, 0x59, + 0x53, 0x4E, 0x54, 0x5D, 0xD2, 0xD4, 0xD2, 0x5E, + 0x5C, 0x5D, 0xFC, 0xFC, 0xFC, 0xF8, 0x29, 0x23, + 0x23, 0x23, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, + 0x23, 0x22, 0x22, 0x23, 0x23, 0x23, 0x22, 0x22, + 0x22, 0x22, 0x22, 0xF0, 0xFC, 0xFC, 0xB3, 0xC7, + 0xB5, 0x93, 0xB5, 0x93, 0x93, 0x91, 0x93, 0x93, + 0x91, 0xB5, 0xC7, 0xAD, 0xD6, 0xD2, 0x5E, 0x3F, + 0x3F, 0x57, 0x57, 0x58, 0x4A, 0x41, 0x64, 0xDC, + 0xF1, 0xDF, 0xDA, 0x61, 0x45, 0x2E, 0x43, 0x47, + 0xCB, 0x63, 0x62, 0x5F, 0x58, 0x51, 0x53, 0x54, + 0x4C, 0x52, 0x5C, 0xCD, 0xD3, 0xD2, 0x60, 0x5D, + 0x5D, 0xFB, 0xFC, 0xFC, 0xFC, 0xDB, 0x49, 0x24, + 0x21, 0x23, 0x23, 0x22, 0x26, 0x26, 0x2A, 0x24, + 0x22, 0x23, 0x22, 0x21, 0x24, 0x26, 0x26, 0x2A, + 0x29, 0x2B, 0x24, 0x25, 0xFC, 0xFC, 0xB3, 0xC5, + 0x91, 0x91, 0x92, 0x91, 0x92, 0x92, 0x93, 0x93, + 0x91, 0x93, 0xC6, 0xAD, 0xDC, 0xD9, 0xD4, 0x60, + 0x43, 0x45, 0x58, 0x58, 0x57, 0x4B, 0x43, 0xCC, + 0xDD, 0xF1, 0xD8, 0xD5, 0x5D, 0x43, 0x41, 0x47, + 0xCD, 0x63, 0x62, 0x5D, 0x54, 0x4C, 0x55, 0x4B, + 0x51, 0x58, 0x62, 0xD0, 0xD0, 0x62, 0x5D, 0x5D, + 0x67, 0xFC, 0xFC, 0xFC, 0xFC, 0x58, 0x4E, 0x28, + 0x2A, 0x20, 0x23, 0x22, 0x23, 0x2A, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x23, 0x25, 0x2A, 0x2E, 0x2D, + 0x2E, 0x2E, 0x2E, 0x23, 0xFA, 0xFC, 0xB2, 0xBD, + 0xB5, 0x90, 0x91, 0x93, 0x92, 0x90, 0x91, 0x93, + 0x92, 0x91, 0xBD, 0xAD, 0xDE, 0xE0, 0xD8, 0xD7, + 0x61, 0x40, 0x48, 0x58, 0x58, 0x58, 0x48, 0x44, + 0xCF, 0xDE, 0xE0, 0xDD, 0xD0, 0x52, 0x41, 0x45, + 0xCD, 0x63, 0x61, 0x58, 0x4D, 0x51, 0x4C, 0x4B, + 0x54, 0x5D, 0xCC, 0xCE, 0x63, 0x61, 0x5D, 0x5D, + 0xFB, 0xFC, 0xFC, 0xFC, 0xFC, 0x4B, 0x27, 0x21, + 0x22, 0x22, 0x23, 0x22, 0x22, 0x24, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x20, + 0x27, 0x2B, 0x41, 0x2B, 0x23, 0xFC, 0xB2, 0xB6, + 0x93, 0x90, 0x92, 0xB5, 0x92, 0x90, 0xB5, 0x90, + 0x92, 0x93, 0xBC, 0xAD, 0xDC, 0xF1, 0xF3, 0xF0, + 0xD9, 0x61, 0x41, 0x4A, 0x58, 0x57, 0x57, 0x44, + 0x49, 0xD2, 0xDD, 0xD8, 0xDA, 0x63, 0x4A, 0x45, + 0xCC, 0x63, 0x5E, 0x52, 0x4B, 0x4C, 0x49, 0x51, + 0x5C, 0x61, 0xCD, 0x65, 0x63, 0x5E, 0x4E, 0xCF, + 0xFB, 0xFB, 0xF0, 0xFC, 0xD2, 0x2A, 0x22, 0x23, + 0x22, 0x22, 0x23, 0x22, 0x22, 0x21, 0x22, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, + 0x23, 0x22, 0x26, 0x41, 0x27, 0xF9, 0x81, 0xB7, + 0xB5, 0x91, 0x92, 0xB5, 0x91, 0xB5, 0x93, 0xB5, + 0x93, 0xB6, 0xB7, 0xB9, 0xCB, 0xD8, 0xF3, 0xF2, + 0xF2, 0xDB, 0x61, 0x2D, 0x51, 0x58, 0x57, 0x58, + 0x41, 0x51, 0xD4, 0xDB, 0xDC, 0xD1, 0x5B, 0x4C, + 0xCB, 0x62, 0x59, 0x4C, 0x4A, 0x49, 0x4B, 0x55, + 0x60, 0x64, 0xCC, 0x64, 0x5E, 0x55, 0x60, 0xE1, + 0xFB, 0xF8, 0xFC, 0xFC, 0x21, 0x22, 0x22, 0x23, + 0x22, 0x22, 0x23, 0x22, 0x22, 0x21, 0x22, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, + 0x23, 0x22, 0x21, 0x24, 0x2D, 0x21, 0xB4, 0xBB, + 0xB6, 0xB5, 0xB6, 0xB7, 0xB7, 0xB7, 0xB7, 0xB6, + 0xB6, 0xB6, 0xBB, 0xB9, 0x45, 0xCB, 0xDF, 0xF3, + 0xF3, 0xF3, 0xDB, 0x5E, 0x2C, 0x51, 0x58, 0x58, + 0x52, 0x2D, 0x5C, 0xD4, 0xD9, 0xD5, 0x63, 0x58, + 0x64, 0x60, 0x53, 0x49, 0x4A, 0x49, 0x52, 0x5C, + 0x63, 0xCD, 0xCD, 0x63, 0x5C, 0x4E, 0x65, 0xFC, + 0xFC, 0xF5, 0xFC, 0xD2, 0x23, 0x22, 0x22, 0x23, + 0x22, 0x22, 0x23, 0x22, 0x22, 0x21, 0x22, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, + 0x23, 0x22, 0x21, 0x22, 0x25, 0x29, 0xB3, 0xC7, + 0xB5, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, 0xB6, + 0xB6, 0xB5, 0xC7, 0xAD, 0x57, 0x3F, 0xCB, 0xF0, + 0xF3, 0xF3, 0xF2, 0xD9, 0x58, 0x41, 0x4C, 0x58, + 0x57, 0x47, 0x42, 0x62, 0xD4, 0xD4, 0xCC, 0x60, + 0x63, 0x5D, 0x50, 0x47, 0x48, 0x4B, 0x58, 0x60, + 0xCC, 0xCE, 0xCD, 0x60, 0x53, 0x5C, 0x62, 0xFB, + 0xF9, 0xFC, 0xFC, 0x21, 0x23, 0x22, 0x22, 0x23, + 0x22, 0x22, 0x23, 0x23, 0x23, 0x21, 0x22, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, + 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, 0x81, 0xC7, + 0xB7, 0xB7, 0xBC, 0xB7, 0xBC, 0xBC, 0xBC, 0xB7, + 0xB7, 0xB7, 0xC8, 0x80, 0x58, 0x57, 0x40, 0xCE, + 0xF3, 0xF2, 0xF2, 0xF0, 0xD5, 0x4C, 0x3F, 0x4B, + 0x52, 0x50, 0x2D, 0x4B, 0x64, 0xD2, 0xCC, 0x61, + 0x60, 0x58, 0x4A, 0x47, 0x47, 0x4C, 0x59, 0x64, + 0xD0, 0xD0, 0x64, 0x59, 0x49, 0x5D, 0xFB, 0xFC, + 0xD9, 0xFC, 0xD6, 0x23, 0x22, 0x22, 0x22, 0x23, + 0x22, 0x22, 0x23, 0x23, 0x21, 0x21, 0x22, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, + 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, 0xB4, 0xC8, + 0xBD, 0xB7, 0xBD, 0xBC, 0xBD, 0xC5, 0xBC, 0xC5, + 0xBC, 0xBD, 0xC7, 0xAC, 0x58, 0x57, 0x58, 0x2C, + 0xD1, 0xF0, 0xF3, 0xF3, 0xE0, 0xCD, 0x45, 0x3E, + 0x48, 0x4B, 0x3F, 0x41, 0x56, 0x64, 0x65, 0x62, + 0x5D, 0x52, 0x47, 0x48, 0x48, 0x53, 0x60, 0xCC, + 0xD2, 0xD0, 0x63, 0x52, 0x4E, 0x53, 0xFB, 0xFB, + 0xFC, 0xFC, 0x23, 0x23, 0x22, 0x23, 0x22, 0x23, + 0x22, 0x22, 0x23, 0x23, 0x20, 0x21, 0x22, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, + 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, 0xB4, 0xC7, + 0xC5, 0xBC, 0xC5, 0xBD, 0xC5, 0xC5, 0xBD, 0xC5, + 0xBC, 0xC6, 0xC7, 0xB9, 0x58, 0x57, 0x58, 0x57, + 0x2D, 0xD4, 0xF1, 0xF2, 0xF0, 0xD9, 0x5D, 0x47, + 0x48, 0x3F, 0x42, 0x2C, 0x48, 0x5C, 0x5F, 0x60, + 0x58, 0x50, 0x47, 0x4A, 0x49, 0x55, 0x63, 0xD0, + 0xD2, 0xCD, 0x5D, 0x49, 0x4E, 0xE1, 0xFC, 0xF0, + 0xFC, 0xF8, 0x22, 0x22, 0x22, 0x23, 0x22, 0x23, + 0x22, 0x22, 0x23, 0x20, 0x21, 0x21, 0x22, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x23, 0x22, + 0x23, 0x22, 0x23, 0x23, 0x23, 0x22, 0xC4, 0xC8, + 0xBD, 0xBD, 0xC6, 0xBD, 0xC6, 0xC6, 0xC5, 0xC6, + 0xBD, 0xC6, 0xC7, 0xE4, 0x54, 0x57, 0x58, 0x57, + 0x57, 0x43, 0xD7, 0xE0, 0xF1, 0xD8, 0xCD, 0x4B, + 0x4A, 0x47, 0x42, 0x2C, 0x3F, 0x4D, 0x58, 0x5C, + 0x52, 0x4B, 0x48, 0x4B, 0x4A, 0x58, 0xCB, 0xD3, + 0xD2, 0xCD, 0x58, 0x47, 0x4A, 0xFC, 0xFC, 0xFB, + 0xFC, 0x2B, 0x22, 0x22, 0x22, 0x23, 0x22, 0x23, + 0x22, 0x22, 0x23, 0x26, 0x21, 0x21, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, + 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0xE5, 0xC8, + 0xBA, 0xC5, 0xC6, 0xC6, 0xC6, 0xC7, 0xC6, 0xC7, + 0xC5, 0xC6, 0xC8, 0xE5, 0x2E, 0x54, 0x58, 0x57, + 0x57, 0x4C, 0x4D, 0xDA, 0xD8, 0xD8, 0xD4, 0x5C, + 0x4B, 0x4B, 0x3F, 0x42, 0x44, 0x4A, 0x51, 0x58, + 0x4B, 0x48, 0x4B, 0x51, 0x4D, 0x5F, 0xD0, 0xD1, + 0xD0, 0x64, 0x51, 0x44, 0x6B, 0xFC, 0xFB, 0xFC, + 0xFC, 0x21, 0x23, 0x22, 0x22, 0x23, 0x22, 0x23, + 0x22, 0x22, 0x23, 0x26, 0x21, 0x23, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, + 0x22, 0x23, 0x22, 0x23, 0x23, 0x23, 0xE5, 0xED, + 0xE7, 0xBA, 0xC8, 0xC6, 0xC6, 0xC6, 0xC6, 0xC7, + 0xC7, 0xE5, 0xED, 0xE6, 0x61, 0x41, 0x52, 0x58, + 0x58, 0x57, 0x45, 0x5E, 0xD7, 0xDD, 0xD5, 0x60, + 0x4B, 0x4C, 0x48, 0x4D, 0x4D, 0x50, 0x4D, 0x56, + 0x4A, 0x3E, 0x53, 0x53, 0x52, 0x63, 0xD3, 0xD0, + 0xCE, 0x60, 0x4A, 0x45, 0xFC, 0xFC, 0xF7, 0xFC, + 0xFC, 0x21, 0x23, 0x23, 0x22, 0x23, 0x22, 0x23, + 0x22, 0x23, 0x21, 0x2A, 0x20, 0x23, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, + 0x23, 0x22, 0x23, 0x22, 0x21, 0x23, 0xEB, 0xF6, + 0xF6, 0xED, 0xED, 0xED, 0xED, 0xED, 0xED, 0xED, + 0xF6, 0xF6, 0xF6, 0xE6, 0xDB, 0x58, 0x45, 0x4B, + 0x58, 0x57, 0x4D, 0x4B, 0x64, 0xD4, 0xD0, 0x5C, + 0x48, 0x51, 0x4C, 0x5D, 0x5E, 0x5C, 0x56, 0x59, + 0x3E, 0x4A, 0x58, 0x54, 0x52, 0x65, 0xD3, 0xD0, + 0xCF, 0x5D, 0x48, 0xFC, 0xFC, 0xFC, 0xFA, 0xFC, + 0xFC, 0x21, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, + 0x22, 0x23, 0x21, 0x2A, 0x21, 0x23, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, + 0x23, 0x22, 0x23, 0x22, 0x21, 0x4F, 0xE6, 0xC6, + 0xC6, 0xBD, 0xC6, 0xBD, 0xBD, 0xBD, 0xBD, 0xC6, + 0xC5, 0xBA, 0xC7, 0xE6, 0xF2, 0xD4, 0x49, 0x4B, + 0x3E, 0x4D, 0x52, 0x3E, 0x52, 0x63, 0x64, 0x56, + 0x48, 0x54, 0x4D, 0x61, 0xCC, 0xCC, 0x60, 0x60, + 0x47, 0x4D, 0x5C, 0x53, 0x58, 0xCF, 0xD1, 0xCF, + 0xD0, 0x59, 0x45, 0xFC, 0xFC, 0xFC, 0xEF, 0xF9, + 0xFC, 0x21, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, + 0x23, 0x22, 0x23, 0x2A, 0x21, 0x23, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, + 0x23, 0x22, 0x23, 0x22, 0x23, 0x4F, 0xE4, 0xB9, + 0xAF, 0x80, 0x80, 0x8E, 0x8E, 0x8E, 0x8E, 0x8F, + 0x80, 0xB4, 0xB9, 0xE4, 0x7F, 0xDE, 0x61, 0x52, + 0x54, 0x48, 0x3F, 0x43, 0x4D, 0x56, 0x59, 0x4B, + 0x3E, 0x58, 0x53, 0x61, 0xD3, 0xD4, 0xCF, 0xCD, + 0x4C, 0x58, 0x5F, 0x53, 0x5E, 0xD3, 0xD0, 0xCE, + 0xCE, 0x52, 0x3F, 0xFC, 0xFC, 0xFC, 0xF7, 0x65, + 0xFA, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, + 0x23, 0x22, 0x21, 0x2A, 0x23, 0x23, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, + 0x23, 0x22, 0x23, 0x22, 0x21, 0xB1, 0xE4, 0xE6, + 0x7C, 0xB1, 0x7C, 0xB1, 0xB2, 0xB2, 0xB3, 0x3D, + 0xB3, 0x3C, 0xE5, 0xB3, 0xB0, 0xF1, 0xD0, 0x58, + 0x5D, 0x4D, 0x40, 0x41, 0x48, 0x51, 0x4C, 0x3F, + 0x3F, 0x4D, 0x5A, 0x5A, 0xD5, 0xD9, 0xD7, 0xD4, + 0x57, 0x5E, 0x61, 0x4C, 0x63, 0xD4, 0xCF, 0xCE, + 0xCB, 0x4D, 0x4A, 0xFC, 0xFC, 0xFC, 0xFC, 0xF0, + 0xFB, 0x22, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, + 0x23, 0x22, 0x23, 0x2A, 0x21, 0x23, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, + 0x22, 0x23, 0x22, 0x23, 0x23, 0xB1, 0x81, 0x7D, + 0x39, 0x35, 0x35, 0x36, 0x36, 0x36, 0x36, 0x36, + 0x36, 0x36, 0x7C, 0xB2, 0xB0, 0xDF, 0xD2, 0x57, + 0x60, 0x59, 0x5B, 0x59, 0x52, 0x4C, 0x4A, 0x40, + 0x42, 0x4A, 0x53, 0x4D, 0xD2, 0xDE, 0xDE, 0xD9, + 0x5E, 0x5E, 0x60, 0x4A, 0xCD, 0xD1, 0xCF, 0xCE, + 0x63, 0x49, 0x5C, 0xFB, 0xE8, 0x89, 0x9F, 0xFC, + 0xD6, 0x21, 0x21, 0x23, 0x22, 0x22, 0x23, 0x22, + 0x23, 0x22, 0x21, 0x2A, 0x22, 0x23, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, + 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x7F, 0xB9, + 0x71, 0x6C, 0x38, 0x38, 0x33, 0x33, 0x33, 0x38, + 0x38, 0x71, 0xAD, 0xE4, 0xD3, 0xDA, 0xCC, 0x52, + 0x63, 0x60, 0xCE, 0xD4, 0xCF, 0x60, 0x4C, 0x40, + 0x3F, 0x45, 0x4B, 0x5A, 0xCB, 0xD8, 0xDE, 0xDC, + 0x5E, 0x5E, 0x5F, 0x4C, 0xD2, 0xD2, 0xCF, 0xCF, + 0x61, 0x45, 0x5E, 0xA7, 0x9D, 0x95, 0x8B, 0x99, + 0xFC, 0x41, 0x21, 0x23, 0x23, 0x22, 0x23, 0x22, + 0x23, 0x22, 0x23, 0x2A, 0x23, 0x23, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x77, 0x77, 0xF6, + 0xFC, 0x7D, 0x7D, 0x7E, 0x7E, 0x7E, 0x7E, 0x7D, + 0x7D, 0xFC, 0x47, 0x64, 0xD0, 0xD0, 0x5D, 0x4B, + 0x62, 0xCC, 0xD1, 0xDE, 0xDE, 0xD4, 0x5E, 0x43, + 0x3F, 0x3E, 0x48, 0x53, 0x58, 0xDB, 0xD8, 0xDC, + 0x5E, 0x5E, 0x5E, 0x53, 0xD4, 0xD2, 0xD0, 0xD0, + 0x5E, 0x49, 0xA7, 0xA6, 0x89, 0x95, 0x8B, 0x9C, + 0x9C, 0xFB, 0xD4, 0x22, 0x22, 0x22, 0x22, 0x23, + 0x22, 0x23, 0x23, 0x2A, 0x22, 0x23, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, + 0x23, 0x22, 0x23, 0x23, 0x98, 0x8C, 0x8C, 0x88, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xF8, + 0xE9, 0x9C, 0x48, 0x5C, 0xD0, 0xCB, 0x48, 0x49, + 0x5B, 0xCB, 0xCD, 0xE0, 0xF1, 0xDD, 0xD0, 0x4A, + 0x41, 0x47, 0x45, 0x4C, 0x48, 0xD7, 0xDE, 0xDC, + 0x5E, 0x5E, 0x5A, 0x58, 0xD1, 0xD0, 0xD0, 0xD2, + 0x5C, 0x55, 0xA7, 0xA6, 0x87, 0x86, 0x89, 0x94, + 0x9C, 0xA9, 0xFC, 0xF4, 0x22, 0x23, 0x22, 0x23, + 0x22, 0x23, 0x22, 0x2A, 0x21, 0x23, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, + 0x22, 0x23, 0x22, 0x23, 0xA4, 0x89, 0x8C, 0xAA, + 0xFB, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xF7, + 0x85, 0x88, 0x8D, 0x59, 0x64, 0x63, 0x47, 0x3E, + 0x4C, 0x60, 0x61, 0xE0, 0xF0, 0xDF, 0xD9, 0x5D, + 0x2E, 0x3E, 0x3E, 0x47, 0x4D, 0xCD, 0xDE, 0xDC, + 0x5D, 0x5C, 0x51, 0x5D, 0xD1, 0xD2, 0xD2, 0xD4, + 0x5A, 0xBE, 0xA7, 0x98, 0x8A, 0x8A, 0xA0, 0x8B, + 0x86, 0x86, 0xF7, 0xFC, 0xF7, 0x26, 0x23, 0x23, + 0x22, 0x22, 0x22, 0x22, 0x21, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, + 0x22, 0x21, 0x21, 0x21, 0xA1, 0x98, 0x9F, 0xBF, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xA7, + 0x8C, 0x86, 0x8D, 0x59, 0x5E, 0x5D, 0x3F, 0x3E, + 0x47, 0x53, 0x63, 0xD9, 0xF0, 0xF1, 0xDE, 0xD0, + 0x43, 0x3E, 0x47, 0x45, 0x4A, 0x5B, 0xDC, 0xDA, + 0x5D, 0x59, 0x49, 0x5F, 0xD1, 0xD2, 0xD3, 0xB9, + 0xA5, 0xA7, 0x98, 0x9B, 0x96, 0x9D, 0x89, 0x89, + 0x8B, 0x9C, 0x9D, 0xFC, 0xFC, 0xFC, 0x26, 0x22, + 0x23, 0x23, 0x22, 0x22, 0x21, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, + 0x22, 0x22, 0x29, 0x2D, 0x99, 0x99, 0xA2, 0xAA, + 0xC4, 0xFB, 0xFC, 0xFC, 0xFC, 0xF6, 0xBF, 0xA2, + 0x9C, 0x9C, 0x8E, 0xDC, 0xCD, 0x51, 0x41, 0x3E, + 0x45, 0x49, 0x58, 0xCD, 0xE0, 0xE0, 0xD8, 0xDA, + 0x4C, 0x4A, 0x45, 0x45, 0x48, 0x47, 0xDA, 0xDA, + 0x5C, 0x58, 0x44, 0x69, 0xA9, 0x98, 0xA4, 0xA6, + 0xA1, 0xA4, 0x99, 0x9E, 0x9D, 0x8B, 0x8A, 0x97, + 0x87, 0x9A, 0x8A, 0xC2, 0xFC, 0xFC, 0xFC, 0x4D, + 0x21, 0x21, 0x23, 0x22, 0x21, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x23, 0x22, + 0x21, 0x22, 0x2D, 0x34, 0xA4, 0xA2, 0xA2, 0xA9, + 0xBF, 0xC0, 0xC3, 0xC1, 0xC0, 0xBE, 0xA6, 0x9D, + 0x99, 0x87, 0xA2, 0xF1, 0xDC, 0x64, 0x42, 0x45, + 0x47, 0x3E, 0x49, 0x4C, 0xDD, 0xDF, 0xD8, 0xDB, + 0x5E, 0x4C, 0x48, 0x45, 0x45, 0x41, 0xD1, 0xD6, + 0x5A, 0x55, 0x3F, 0xA7, 0xA1, 0x98, 0x9F, 0x99, + 0x9F, 0x9D, 0x9A, 0x95, 0x8B, 0x97, 0x89, 0x8A, + 0x88, 0x94, 0x9C, 0x8C, 0xFC, 0xFC, 0xFC, 0xFC, + 0xF4, 0x21, 0x23, 0x22, 0x21, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x22, 0x23, + 0x23, 0x23, 0x2C, 0x2C, 0xA8, 0xA2, 0xA4, 0xA4, + 0xA9, 0xAA, 0xAA, 0xAA, 0xA9, 0xA6, 0x98, 0x9C, + 0x8B, 0x88, 0x98, 0x8D, 0xD8, 0xD6, 0x4E, 0x47, + 0x47, 0x49, 0x47, 0x3F, 0xDA, 0xDD, 0xDE, 0xDD, + 0xCC, 0x4A, 0x4B, 0x3E, 0x45, 0x43, 0x61, 0xD4, + 0x56, 0x51, 0x44, 0xA4, 0x9B, 0x8B, 0x9C, 0x9A, + 0xA0, 0xA2, 0x98, 0x98, 0x8B, 0x8B, 0x98, 0x98, + 0x84, 0x8B, 0x94, 0x8A, 0xA4, 0xFC, 0xFC, 0xFC, + 0xFC, 0xF2, 0x21, 0x22, 0x21, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x23, 0x22, 0x23, 0x23, 0x23, 0x23, + 0x23, 0x22, 0x2C, 0x2D, 0xC0, 0xA4, 0xA2, 0xA4, + 0xA4, 0xA6, 0xA6, 0xA6, 0xA4, 0xA2, 0x9F, 0x89, + 0x8B, 0x9C, 0x9C, 0x8B, 0x68, 0xDB, 0x5F, 0x4B, + 0x3E, 0x49, 0x4B, 0x3E, 0xCC, 0xDA, 0xDC, 0xDD, + 0xD3, 0x49, 0x52, 0x48, 0x45, 0x45, 0x53, 0xD0, + 0x51, 0x4A, 0x44, 0xA4, 0x9B, 0x8B, 0x9C, 0xA0, + 0x9B, 0x86, 0x89, 0x98, 0x89, 0x8A, 0x96, 0x8A, + 0x9C, 0x89, 0x89, 0x9C, 0x8C, 0xF6, 0xFC, 0xFC, + 0xFC, 0xFC, 0x21, 0x22, 0x21, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x22, 0x23, 0x22, 0x21, 0x22, 0x23, + 0x22, 0x21, 0x2B, 0x34, 0xC0, 0xA8, 0xA4, 0xA2, + 0xA2, 0x98, 0xA1, 0xA0, 0x98, 0x9F, 0x95, 0x8A, + 0x94, 0xA1, 0x8A, 0x84, 0x9B, 0x68, 0xCC, 0x49, + 0x4A, 0x47, 0x4C, 0x4B, 0x51, 0xD3, 0xDA, 0xDC, + 0xD5, 0x56, 0x56, 0x4A, 0x3E, 0x45, 0x48, 0x63, + 0x4A, 0x47, 0x3E, 0xA7, 0x98, 0x9D, 0x9E, 0x8B, + 0x95, 0x9B, 0x89, 0x86, 0x9B, 0x8B, 0x89, 0x84, + 0x9A, 0xA1, 0x95, 0x9A, 0x8C, 0xA4, 0xFC, 0xFC, + 0xFC, 0xFA, 0x23, 0x22, 0x21, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x22, 0x23, 0x22, 0x21, 0x22, 0x23, + 0x21, 0x23, 0x2C, 0xF6, 0xBF, 0xA9, 0xA2, 0x99, + 0x9D, 0x9D, 0x9D, 0x9D, 0x9D, 0x9B, 0x87, 0x8B, + 0x9C, 0x86, 0x9C, 0x8A, 0x87, 0x87, 0x89, 0x51, + 0x54, 0x47, 0x4B, 0x50, 0x4B, 0xCF, 0xD6, 0xDC, + 0xD5, 0x60, 0x54, 0x52, 0x48, 0x45, 0x40, 0x5A, + 0x45, 0x43, 0x47, 0xA7, 0x98, 0x9B, 0x95, 0x95, + 0x9A, 0x87, 0x98, 0x98, 0x8A, 0x86, 0x87, 0x9E, + 0x9B, 0x95, 0x9D, 0x9D, 0x99, 0x85, 0xA6, 0xFA, + 0xF2, 0x21, 0x23, 0x22, 0x21, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x22, 0x23, 0x22, 0x21, 0x22, 0x22, + 0x21, 0x24, 0xFB, 0xF7, 0xBF, 0xA6, 0xA2, 0x99, + 0x97, 0x89, 0x86, 0x89, 0x9C, 0x96, 0x9E, 0x94, + 0x89, 0x99, 0x98, 0x89, 0x9E, 0x9B, 0x89, 0x8B, + 0x58, 0x4B, 0x4A, 0x52, 0x48, 0xCC, 0xD3, 0xDA, + 0xD3, 0x65, 0x4C, 0x58, 0x49, 0x3E, 0x2E, 0x4D, + 0x40, 0x41, 0x45, 0xA9, 0xA1, 0x9B, 0x9E, 0x9C, + 0x95, 0x8A, 0x94, 0x89, 0x96, 0x87, 0x9C, 0x9A, + 0x84, 0x9D, 0x9C, 0x9E, 0x9A, 0x9C, 0x9D, 0xBB, + 0x23, 0x23, 0x22, 0x22, 0x21, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x22, 0x23, 0x22, 0x21, 0x23, 0x23, + 0x24, 0xFC, 0xFC, 0xF6, 0xBF, 0xA6, 0x9F, 0x99, + 0x89, 0x95, 0x87, 0x94, 0x9D, 0x9E, 0x97, 0x9E, + 0x95, 0x9B, 0x89, 0x95, 0x95, 0x9B, 0x89, 0x87, + 0x5D, 0x56, 0x3E, 0x51, 0x3E, 0x60, 0xCF, 0xD3, + 0xD2, 0xCD, 0x5C, 0x49, 0x4B, 0x3E, 0x2C, 0x48, + 0x3E, 0x43, 0x3E, 0xA9, 0xA1, 0x9B, 0x97, 0x94, + 0x95, 0x9A, 0x9C, 0x87, 0x87, 0x9B, 0x9C, 0x95, + 0x9D, 0x89, 0x9A, 0x89, 0x9E, 0x9E, 0x8C, 0xA6, + 0x20, 0x23, 0x23, 0x22, 0x23, 0x22, 0x23, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x21, 0x21, 0x20, 0x40, + 0xFC, 0xFC, 0xFC, 0xEC, 0xBE, 0xA4, 0x9F, 0x99, + 0x95, 0x9F, 0xA0, 0x88, 0x9D, 0x8B, 0x97, 0x95, + 0x87, 0x95, 0x96, 0x95, 0x97, 0x94, 0x94, 0x98, + 0xD3, 0x4C, 0x47, 0x4D, 0x42, 0x4C, 0x60, 0xCC, + 0xCE, 0xD0, 0x65, 0x4B, 0x47, 0x44, 0x2B, 0x45, + 0x4B, 0x47, 0x49, 0xA7, 0xA1, 0x9A, 0x97, 0x89, + 0x95, 0x97, 0x97, 0x9E, 0x89, 0x95, 0x89, 0x9C, + 0x87, 0x95, 0x97, 0x99, 0x95, 0x99, 0x9F, 0xA4, + 0xC4, 0x21, 0x21, 0x23, 0x21, 0x23, 0x23, 0x23, + 0x23, 0x23, 0x23, 0x23, 0x21, 0x20, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xEA, 0xAA, 0xA6, 0xA2, 0x99, + 0x8B, 0x9A, 0x95, 0x9E, 0x9E, 0x9A, 0x94, 0x87, + 0x94, 0x94, 0x89, 0x94, 0x9B, 0x9B, 0xA7, 0xDC, + 0xDB, 0x65, 0x2E, 0x3E, 0x43, 0x44, 0x49, 0x58, + 0x63, 0xD3, 0xD3, 0x5E, 0x42, 0x42, 0x2D, 0x40, + 0x54, 0x4C, 0x4A, 0xA7, 0xA0, 0x99, 0x9B, 0x94, + 0xA0, 0x8A, 0x9B, 0x9D, 0x87, 0x95, 0x94, 0x8B, + 0x8A, 0x98, 0x9C, 0x8A, 0x9B, 0x99, 0xA2, 0xA6, + 0xBF, 0xEC, 0x2A, 0x20, 0x21, 0x23, 0x21, 0x20, + 0x20, 0x20, 0x20, 0x4C, 0xF9, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xEB, 0xAA, 0xA4, 0x9F, 0x9C, + 0x8B, 0x9B, 0x88, 0x84, 0x9E, 0x9D, 0x96, 0x94, + 0x94, 0x9A, 0x9B, 0x9B, 0xA4, 0xD5, 0xCD, 0xDE, + 0xF1, 0xDA, 0x4C, 0x2D, 0x41, 0x2B, 0x42, 0x4C, + 0x5E, 0xD4, 0xD7, 0xCD, 0x49, 0x2E, 0x2E, 0x41, + 0x5E, 0x57, 0xA7, 0xA6, 0xA7, 0xA4, 0xA2, 0x98, + 0x9D, 0x9C, 0xA1, 0x99, 0x9D, 0x88, 0x8B, 0x9C, + 0x8A, 0x9C, 0x9C, 0x94, 0x9C, 0x89, 0xA0, 0xA6, + 0xAA, 0xEB, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFB, 0xE9, 0xAA, 0xA6, 0xA2, 0x8B, + 0x8B, 0x8A, 0x86, 0x9B, 0x9C, 0x98, 0xA0, 0x9B, + 0x9B, 0x84, 0xA7, 0xB4, 0x61, 0xD1, 0xD2, 0xE0, + 0xF1, 0xDC, 0x61, 0x2D, 0x2E, 0x3F, 0x56, 0x62, + 0x5D, 0xD4, 0xD9, 0xD3, 0x54, 0x41, 0x41, 0x44, + 0xCB, 0x60, 0x52, 0xA9, 0xA9, 0xA9, 0xA7, 0xA6, + 0xA6, 0xA4, 0xA4, 0xA2, 0xA2, 0x9D, 0x95, 0x89, + 0x9C, 0x8A, 0x9E, 0x9C, 0x8A, 0x9E, 0xA0, 0xA8, + 0xC0, 0xE9, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xE9, 0xAA, 0xA6, 0xA0, 0x99, + 0x9C, 0x8B, 0x9A, 0x84, 0x9B, 0x9B, 0x98, 0x98, + 0xA9, 0xB9, 0x49, 0x57, 0xCB, 0xD4, 0xD3, 0xF1, + 0xD8, 0xDA, 0xCE, 0x3F, 0x41, 0x4B, 0x5D, 0xCB, + 0x5E, 0xD6, 0xDB, 0xD6, 0x5D, 0x43, 0x3F, 0x49, + 0xD1, 0xCC, 0x4F, 0xDD, 0xC3, 0xBB, 0xBF, 0xAA, + 0xAA, 0xA9, 0xAA, 0xA8, 0xA8, 0xA6, 0xA6, 0xA2, + 0x9C, 0x9F, 0x9B, 0x9A, 0x9D, 0xA2, 0xA8, 0xAA, + 0xC1, 0xEA, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xEA, 0xC0, 0xAA, 0xA6, 0xA2, + 0xA2, 0x99, 0xA0, 0xA0, 0xA4, 0xA7, 0xA9, 0xC0, + 0x67, 0x49, 0x54, 0x60, 0xD0, 0xD4, 0xCC, 0xDF, + 0xD9, 0xD5, 0xD2, 0x3E, 0x47, 0x56, 0x60, 0xCD, + 0x5D, 0xD9, 0xD9, 0xD6, 0x61, 0x3F, 0x47, 0x52, + 0xD6, 0xD3, 0x62, 0x4D, 0x40, 0x4A, 0x57, 0xCA, + 0xC3, 0xC1, 0xC1, 0xC0, 0xBF, 0xBF, 0xAA, 0xAA, + 0xA6, 0xA4, 0xA4, 0xA4, 0xA6, 0xA8, 0xBE, 0xC1, + 0xC9, 0xEB, 0xFB, 0xFB, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, + 0xFC, 0xFC, 0xFC, 0xEB, 0xC3, 0xC0, 0xAA, 0xA8, + 0xA6, 0xA6, 0xA6, 0xA9, 0xAA, 0xC0, 0xE8, 0xD0, + 0xD2, 0x4C, 0x5E, 0x64, 0xD0, 0xD1, 0x5F, 0xD9, + 0xD5, 0xD1, 0xD0, 0x48, 0x52, 0x5C, 0x64, 0xCD, + 0x5C, 0xDC, 0xD7, 0xD5, 0x62, 0x3F, 0x4C, 0x53, + 0xDA, 0xD7, 0xCE, 0x56, 0x40, 0x4B, 0x52, 0x56, + 0xCE, 0xDF, 0x6A, 0xEB, 0xE9, 0xC9, 0xC3, 0xC0, + 0xC0, 0xBF, 0xBE, 0xAA, 0xBF, 0xC0, 0xC3, 0xC9, + 0xEA, 0xF6, 0xEE, 0x58, 0x57, 0x5E, 0xD6, 0xD0, + 0xD2, 0x61, 0xCB, 0xD6, 0xD6, 0xD4, 0xDF, 0xF3, + 0xF2, 0xDD, 0xD7, 0xEB, 0xC9, 0xC1, 0xC0, 0xBF, + 0xAA, 0xAA, 0xAA, 0xBE, 0xC3, 0xF0, 0xD2, 0xD2, + 0xD2, 0x51, 0x62, 0xCC, 0xD0, 0xCC, 0x61, 0xD3, + 0xCF, 0xCE, 0xD2, 0x48, 0x5A, 0x61, 0xCC, 0xCE, + 0x5F, 0xD9, 0xD5, 0xD1, 0x63, 0x44, 0x56, 0x56, + 0xDC, 0xD9, 0xD4, 0x5E, 0x42, 0x4A, 0x4C, 0x57, + 0x5D, 0xD8, 0xE0, 0xD8, 0xDC, 0xCB, 0x66, 0xEC, + 0xE8, 0xC3, 0xC3, 0xC3, 0xC3, 0xC9, 0xE8, 0xEA, + 0xF6, 0x50, 0x3E, 0x58, 0x57, 0x5A, 0xD6, 0xD4, + 0xCC, 0x4B, 0x53, 0x5C, 0x64, 0xD1, 0xDF, 0xF3, + 0xF1, 0xDE, 0xD9, 0xF6, 0xEB, 0xC9, 0xC1, 0xC1, + 0xC0, 0xC0, 0xC1, 0xC9, 0xF0, 0xD6, 0xCD, 0xD6, + 0xD3, 0x53, 0xCB, 0xCF, 0xCD, 0x5F, 0x5F, 0xCE, + 0xCF, 0xCD, 0xD0, 0x47, 0x5F, 0xCB, 0xCE, 0xCD, + 0x63, 0xD6, 0xD3, 0xD1, 0x63, 0x3F, 0x58, 0x58, + 0xDB, 0xDC, 0xDA, 0x65, 0x3E, 0x49, 0x49, 0x4D, + 0x49, 0xDC, 0xDF, 0xE0, 0xDE, 0xD5, 0x47, 0x47, + 0x46, 0x6B, 0xEB, 0xEA, 0xE9, 0xEA, 0xEB, 0xF6, + 0xD0, 0x57, 0x57, 0x47, 0x47, 0x5B, 0xD4, 0xD4, + 0xCD, 0x44, 0x3E, 0x4B, 0x50, 0x4B, 0x51, 0xD5, + 0xDB, 0xD8, 0xDE, 0x4B, 0xF6, 0xF6, 0xEA, 0xE9, + 0xE8, 0xEA, 0xEB, 0x67, 0x5E, 0xCC, 0xD6, 0xDC, + 0xD5, 0x58, 0xCE, 0xCE, 0x62, 0x50, 0xCC, 0xD3, + 0xD2, 0xCD, 0xCD, 0x4B, 0x64, 0xCE, 0xCE, 0x64, + 0xCC, 0xD3, 0xD2, 0xD2, 0x61, 0x47, 0x5D, 0x5C, + 0xDD, 0xDD, 0xD9, 0xD1, 0x4C, 0x47, 0x49, 0x4A, + 0x4B, 0xD1, 0xD8, 0xE0, 0xDF, 0xDD, 0x5D, 0x4A, + 0x48, 0x52, 0x51, 0x3F, 0xF6, 0xEC, 0xE0, 0xE0, + 0xD3, 0x5E, 0x5F, 0x50, 0x4B, 0x50, 0xCB, 0xCE, + 0x64, 0x45, 0x4C, 0x57, 0x57, 0x58, 0x52, 0xD6, + 0xD3, 0xDE, 0xDF, 0xD1, 0x3E, 0x4B, 0xF6, 0xF6, + 0xEC, 0x66, 0x53, 0x43, 0x56, 0xD1, 0xD9, 0xDE, + 0xD4, 0x5E, 0xCE, 0xCC, 0x5B, 0x2C, 0xD4, 0xD5, + 0xD2, 0xD0, 0x63, 0x5D, 0xCD, 0xD0, 0xCD, 0x5E, + 0xD0, 0xCF, 0xCE, 0xD2, 0x5E, 0x50, 0x60, 0x5D, + 0xDE, 0xDD, 0xDC, 0xD7, 0x5D, 0x45, 0x47, 0x3E, + 0x4B, 0x5E, 0xDE, 0xDF, 0xE0, 0xD8, 0xCF, 0x3E, + 0x45, 0x51, 0x58, 0x42, 0xCB, 0xDA, 0xDE, 0xD8, + 0xD2, 0x61, 0xCC, 0xCF, 0xD6, 0xDA, 0xDA, 0xD5, + 0xD0, 0x50, 0x44, 0x57, 0x57, 0x58, 0x45, 0xD1, + 0xD1, 0xD7, 0xDF, 0xDF, 0xD7, 0xCF, 0x64, 0x60, + 0xCE, 0xCE, 0xCE, 0x63, 0xCF, 0xDA, 0xDE, 0xD9, + 0xCF, 0x63, 0xCD, 0x63, 0x4D, 0x4B, 0xD6, 0xD5, + 0xCE, 0xD3, 0x60, 0xCB, 0xD0, 0xD0, 0x65, 0x47, + 0xD0, 0xCC, 0xCC, 0xD1, 0x59, 0x5D, 0x63, 0x5E, + 0xDD, 0xDD, 0xDE, 0xDC, 0xCB, 0x40, 0x48, 0x45, + 0x3E, 0x3E, 0xD9, 0xDF, 0xE0, 0xDF, 0xDA, 0x51, + 0x4C, 0x48, 0x56, 0x4C, 0x5B, 0xD2, 0xDA, 0xDB, + 0xCB, 0x5F, 0xD0, 0xCC, 0xDC, 0xF0, 0xF3, 0xE0, + 0xDD, 0xCC, 0x41, 0x50, 0x57, 0x57, 0x4B, 0x5D, + 0xD3, 0xD1, 0xDE, 0xDF, 0xDE, 0xD7, 0xD0, 0xD0, + 0xD5, 0xD6, 0xD6, 0xCE, 0xD7, 0xDC, 0xDA, 0xD5, + 0x60, 0x63, 0x64, 0x5E, 0x47, 0x61, 0xD5, 0xD2, + 0xCF, 0xD0, 0x59, 0xCD, 0xD1, 0xCF, 0x61, 0x4D, + 0xCC, 0xCE, 0xCD, 0xD0, 0x52, 0x61, 0x64, 0x60, + 0xDA, 0xDE, 0xDE, 0xDD, 0xD1, 0x4B, 0x4A, 0x45, + 0x3E, 0x41, 0xCD, 0xDE, 0xE0, 0xF1, 0xDE, 0x63, + 0x4A, 0x4A, 0x4A, 0x4B, 0x50, 0xCB, 0xD4, 0xD7, + 0x5E, 0x54, 0x62, 0xD3, 0xD4, 0xF0, 0xF3, 0xF3, + 0xF2, 0xDE, 0x61, 0x40, 0x49, 0x56, 0x4D, 0x3E, + 0x4B, 0xCE, 0xD9, 0xD8, 0xD9, 0xD5, 0xCF, 0xD2, + 0xD6, 0xD6, 0xD1, 0xD1, 0xD7, 0xD5, 0xCF, 0xD0, + 0x54, 0x64, 0x63, 0x56, 0x2C, 0xCB, 0xD1, 0xCC, + 0xD3, 0xCD, 0x54, 0xCF, 0xD1, 0xCE, 0x5E, 0x5C, + 0xCE, 0xCE, 0xCE, 0xCB, 0x4B, 0x63, 0xCC, 0x61, + 0xD4, 0xDC, 0xDE, 0xDE, 0xDA, 0x5D, 0x45, 0x45, + 0x48, 0x3F, 0x52, 0xD9, 0xD8, 0xDF, 0xDF, 0xD2, + 0x52, 0x4B, 0x3E, 0x2E, 0x47, 0x60, 0xCF, 0xD3, + 0x59, 0x48, 0x50, 0x5E, 0xCC, 0xDE, 0xF2, 0xF2, + 0xF3, 0xF3, 0xDD, 0x5D, 0x3E, 0x48, 0x47, 0x47, + 0x58, 0xD1, 0xDA, 0xDA, 0xD5, 0xD1, 0xCD, 0xD2, + 0xD3, 0xCF, 0xD3, 0xD1, 0xCD, 0xD3, 0xD2, 0x5E, + 0x52, 0x64, 0x60, 0x4B, 0x45, 0x61, 0xCD, 0xD3, + 0xD3, 0x64, 0x61, 0xD0, 0xD0, 0x64, 0x45, 0x63, + 0xD0, 0xCE, 0xD0, 0x60, 0x56, 0xCB, 0xCC, 0x62, + 0xCE, 0xDA, 0xDE, 0xD8, 0xDD, 0xCC, 0x45, 0x49, + 0x3E, 0x47, 0x42, 0xD1, 0xDC, 0xD8, 0xD8, 0xD3, + 0x5D, 0x4C, 0x49, 0x3F, 0x47, 0x59, 0xCD, 0xCF, + 0x59, 0x2E, 0x48, 0x47, 0x52, 0x63, 0xF0, 0xF2, + 0xF3, 0xF3, 0xF2, 0xDA, 0x52, 0x4B, 0x52, 0x58, + 0x5E, 0x63, 0xD0, 0xD0, 0xD0, 0xCF, 0xCE, 0xCE, + 0xCF, 0x65, 0x61, 0xD6, 0xD6, 0xD6, 0xCB, 0x4B, + 0x61, 0x62, 0x5D, 0x43, 0x4B, 0x61, 0xD0, 0xD4, + 0xD1, 0x61, 0xCE, 0xD2, 0xCD, 0x5E, 0x4A, 0xCE, + 0xD0, 0xCC, 0xD0, 0x59, 0x61, 0xCC, 0xCC, 0x62, + 0xD1, 0xD5, 0xDE, 0xD8, 0xDD, 0xCF, 0x4B, 0x4A, + 0x45, 0x3E, 0x2D, 0xCB, 0xDC, 0xDE, 0xD8, 0xD5, + 0x60, 0x54, 0x51, 0x4C, 0x4D, 0x5C, 0xCC, 0xCE, + 0x5A, 0x2C, 0x50, 0x53, 0x3E, 0x59, 0xD8, 0xF3, + 0xF2, 0xF3, 0xF3, 0xE0, 0x5E, 0x4A, 0x4C, 0x53, + 0x5E, 0x63, 0xCC, 0xCC, 0xCC, 0xCD, 0xCF, 0xD3, + 0x62, 0x53, 0xD6, 0xD6, 0xD6, 0xD6, 0x5B, 0x48, + 0x64, 0x63, 0x59, 0x44, 0x57, 0x63, 0xD2, 0xD3, + 0xD0, 0x5E, 0xD0, 0xD1, 0xCB, 0x58, 0x4C, 0xCF, + 0xCF, 0xCE, 0xCE, 0x57, 0x63, 0xCC, 0xCD, 0x57, +}; + +unsigned char linux_logo_bw[] __initdata = { + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x00, 0x3F, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, + 0xFE, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFE, 0x3F, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFE, 0x7F, 0xFF, 0xC7, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xC3, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFF, + 0xFB, 0xE3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFD, 0xFF, 0xFF, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF9, 0xFF, 0xFF, 0xF1, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, 0xFF, 0xF1, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFF, + 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF9, 0xFF, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF9, 0xCF, 0xC3, 0xF8, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x87, 0x81, 0xF9, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xA7, + 0x99, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF9, 0xF3, 0xBC, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF9, 0xE3, 0xBC, 0xF9, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xB0, 0x3C, 0xF9, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xB0, + 0x19, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF9, 0xC0, 0x03, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF9, 0x80, 0x01, 0xF8, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x80, 0x01, 0xF8, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0x80, + 0x01, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xF9, 0xC0, 0x21, 0xD8, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF9, 0xB1, 0x80, 0xEC, 0xC0, 0x1F, + 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x90, 0x00, 0xE4, + 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xF1, 0x8C, + 0xC0, 0x7C, 0x04, 0x81, 0xFF, 0xFF, 0xFF, 0xFF, + 0xE3, 0x80, 0x00, 0x7C, 0x40, 0x11, 0xFF, 0xFF, + 0xFF, 0xFF, 0xE3, 0x80, 0x00, 0x7F, 0xD2, 0x29, + 0xFF, 0xFF, 0xFF, 0xFF, 0x87, 0x00, 0x00, 0x3F, + 0x80, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, 0x0E, 0x00, + 0x00, 0x3F, 0x80, 0x19, 0xFF, 0xFF, 0xFF, 0xFF, + 0x1E, 0x00, 0x00, 0x1F, 0x80, 0x19, 0xFF, 0xFF, + 0xFF, 0xFE, 0x1C, 0x00, 0x00, 0x1E, 0x80, 0x19, + 0xFF, 0xFF, 0xFF, 0xFE, 0x3C, 0x00, 0x00, 0x1E, + 0x80, 0x11, 0xFF, 0xFF, 0xFF, 0xFC, 0x7C, 0x00, + 0x00, 0x0F, 0x80, 0x11, 0xFF, 0xFF, 0xFF, 0xFC, + 0xF8, 0x00, 0x00, 0x0E, 0x80, 0x11, 0xFF, 0xFF, + 0xFF, 0xFC, 0xF8, 0x00, 0x00, 0x06, 0x00, 0x11, + 0xFF, 0xFF, 0xFF, 0xF8, 0xF8, 0x00, 0x00, 0x06, + 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xF9, 0xF0, 0x00, + 0x00, 0x02, 0x00, 0x09, 0xFF, 0xFF, 0xFF, 0xF1, + 0xF0, 0x00, 0x00, 0x02, 0x80, 0x10, 0xFF, 0xFF, + 0xFF, 0xF1, 0xE0, 0x00, 0x00, 0x00, 0x97, 0x10, + 0xFF, 0xFF, 0xFF, 0xE3, 0xE0, 0x00, 0x00, 0x00, + 0xDF, 0xF0, 0xFF, 0xFF, 0xFF, 0xE3, 0xC0, 0x00, + 0x00, 0x00, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0xC7, + 0xC0, 0x00, 0x00, 0x01, 0xFF, 0xF8, 0xFF, 0xFF, + 0xFF, 0xC7, 0x80, 0x00, 0x00, 0x01, 0xFF, 0xF8, + 0xFF, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x00, 0x01, + 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0x8F, 0x80, 0x00, + 0x00, 0x01, 0xFF, 0xF8, 0xFF, 0xFF, 0xFF, 0x9F, + 0x80, 0x00, 0x00, 0x01, 0xFF, 0xF8, 0xFF, 0xFF, + 0xFF, 0x9F, 0x80, 0x00, 0x00, 0x01, 0x80, 0x18, + 0xFF, 0xFF, 0xFF, 0x9E, 0x80, 0x00, 0x00, 0x03, + 0xA8, 0x11, 0xFF, 0xFF, 0xFF, 0x9F, 0x80, 0x00, + 0x00, 0x02, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0x99, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x09, 0xFF, 0xFF, + 0xFF, 0x00, 0x80, 0x00, 0x00, 0x01, 0xC0, 0x01, + 0xFF, 0xFF, 0xFE, 0x20, 0x60, 0x00, 0x00, 0x00, + 0xFF, 0xC3, 0xFF, 0xFF, 0xF8, 0x00, 0x30, 0x00, + 0x00, 0x00, 0xFF, 0x0F, 0xFF, 0xFF, 0xC0, 0x40, + 0x38, 0x00, 0x00, 0x00, 0xFE, 0x47, 0xFF, 0xFF, + 0x81, 0x00, 0x1C, 0x00, 0x00, 0x00, 0xFC, 0x23, + 0xFF, 0xFF, 0x90, 0x00, 0x1E, 0x00, 0x00, 0x00, + 0x78, 0x11, 0xFF, 0xFF, 0x80, 0x00, 0x0F, 0x80, + 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, + 0x07, 0xC0, 0x00, 0x00, 0x00, 0x08, 0xFF, 0xFF, + 0xC0, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x04, + 0x7F, 0xFF, 0x80, 0x00, 0x03, 0xC0, 0x00, 0x10, + 0x00, 0x00, 0x1F, 0xFF, 0x80, 0x00, 0x01, 0x80, + 0x00, 0x30, 0x00, 0x00, 0x0F, 0xFF, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x00, 0x01, 0x4F, 0xFF, + 0x80, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, + 0x0F, 0xFF, 0xC0, 0x00, 0x00, 0x80, 0x03, 0xF0, + 0x00, 0x00, 0x8F, 0xFF, 0x80, 0x00, 0x00, 0x40, + 0x0F, 0xF0, 0x00, 0x04, 0x1F, 0xFF, 0x80, 0x00, + 0x00, 0x7F, 0xFF, 0xF0, 0x00, 0x10, 0x1F, 0xFF, + 0xC0, 0x00, 0x00, 0x7F, 0xFF, 0xF0, 0x00, 0x40, + 0xFF, 0xFF, 0x98, 0x00, 0x00, 0xFF, 0xFF, 0xF0, + 0x00, 0x83, 0xFF, 0xFF, 0x81, 0xE0, 0x01, 0xFF, + 0xFF, 0xF8, 0x02, 0x07, 0xFF, 0xFF, 0x80, 0x3F, + 0x07, 0xE0, 0x00, 0x1C, 0x0C, 0x1F, 0xFF, 0xFF, + 0xF8, 0x03, 0xFF, 0x80, 0x00, 0x1F, 0x78, 0x1F, + 0xFF, 0xFF, 0xFF, 0x80, 0x7F, 0x00, 0x07, 0x0F, + 0xF0, 0x7F, 0xFF, 0xFF, 0xFF, 0xFE, 0x0C, 0x07, + 0xFF, 0x83, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x1F, 0xFF, 0xC0, 0x03, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x07, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +}; + +unsigned char linux_logo16_red[] __initdata = { + 0x00, 0x90, 0xb0, 0x9c, 0xf7, 0x35, 0x83, 0xa5, + 0x65, 0x8f, 0x98, 0xc9, 0xdb, 0xe1, 0xe7, 0xf8 +}; + +unsigned char linux_logo16_green[] __initdata = { + 0x00, 0x90, 0xb0, 0x9c, 0xf7, 0x2e, 0x83, 0xa5, + 0x65, 0x6e, 0x98, 0x89, 0xbf, 0xac, 0xda, 0xf8 +}; + +unsigned char linux_logo16_blue[] __initdata = { + 0x00, 0x90, 0xaf, 0x9c, 0xf7, 0x2b, 0x82, 0xa5, + 0x65, 0x41, 0x97, 0x1e, 0x60, 0x29, 0xa5, 0xf8 +}; + +unsigned char linux_logo16[] __initdata = { + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa1, 0x11, 0x11, + 0x61, 0x16, 0x66, 0x66, 0x11, 0x11, 0x11, 0x11, + 0x11, 0x11, 0x1a, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0xa8, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x87, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x77, 0x73, 0x33, 0x33, 0x3a, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xa3, 0x33, 0x33, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x77, 0x77, 0x77, 0x77, + 0x77, 0x27, 0x77, 0x77, 0x77, 0x33, 0x3a, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xa3, 0x33, 0x33, 0x30, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x55, 0x50, 0x08, 0x33, 0x77, 0x77, + 0x77, 0x72, 0x72, 0x27, 0x77, 0x77, 0x33, 0x33, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xa3, 0x33, 0x33, 0x77, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x58, 0x85, 0x00, 0x11, 0x11, 0xaa, + 0xa3, 0x37, 0x77, 0x72, 0x22, 0x22, 0x77, 0x73, + 0x33, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa3, + 0x33, 0x37, 0x77, 0x33, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x56, 0x85, 0x00, 0x06, 0x66, 0x11, + 0x11, 0x1a, 0xa3, 0x37, 0x77, 0x72, 0x22, 0x77, + 0x73, 0x33, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x33, + 0x33, 0x33, 0x33, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x55, 0x00, 0x00, 0x06, 0x66, 0x66, + 0x66, 0x66, 0x11, 0x1a, 0xa3, 0x77, 0x72, 0x22, + 0x77, 0x73, 0x3a, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0x33, + 0x33, 0x33, 0x33, 0xa0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, + 0x66, 0x66, 0x66, 0x66, 0x11, 0xa3, 0x77, 0x22, + 0x22, 0x77, 0x33, 0x33, 0xaa, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0x33, 0x33, + 0x33, 0x3a, 0xa1, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x33, + 0xaa, 0x11, 0x16, 0x66, 0x66, 0x61, 0x1a, 0x37, + 0x22, 0x22, 0x77, 0x33, 0x3a, 0xaa, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0xa3, 0x33, 0x33, 0x33, + 0x3a, 0xa1, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x02, 0x22, + 0x22, 0x77, 0x3a, 0x11, 0x66, 0x66, 0x66, 0x1a, + 0x37, 0x22, 0x22, 0x77, 0x33, 0x3a, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0x33, 0x33, 0x3a, + 0xa1, 0x11, 0x11, 0x10, 0x00, 0x00, 0x50, 0x00, + 0x00, 0x05, 0x80, 0x50, 0x00, 0x00, 0x07, 0x72, + 0x22, 0x22, 0x22, 0x73, 0xa1, 0x66, 0x66, 0x61, + 0x1a, 0x77, 0x22, 0x27, 0x73, 0x33, 0xaa, 0xaa, + 0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0x33, 0x3a, 0xaa, + 0x11, 0x11, 0x1a, 0xa0, 0x08, 0x71, 0x05, 0x00, + 0x00, 0x12, 0x22, 0x50, 0x00, 0x00, 0x07, 0x77, + 0x77, 0x72, 0x22, 0x22, 0x27, 0x31, 0x16, 0x66, + 0x61, 0x13, 0x77, 0x22, 0x77, 0x33, 0x3a, 0xaa, + 0xaa, 0xaa, 0xaa, 0xa3, 0x33, 0x33, 0xaa, 0xa1, + 0x11, 0x1a, 0x33, 0x70, 0x07, 0x2e, 0x70, 0x00, + 0x01, 0x44, 0x42, 0x60, 0x00, 0x00, 0x02, 0x22, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x27, 0x31, 0x66, + 0x66, 0x61, 0xa3, 0x72, 0x22, 0x77, 0x33, 0xaa, + 0xaa, 0xaa, 0xa3, 0x33, 0x33, 0xaa, 0xaa, 0x11, + 0x1a, 0x33, 0x77, 0x30, 0x04, 0x82, 0x40, 0x00, + 0x54, 0x48, 0x54, 0x40, 0x00, 0x00, 0x01, 0xaa, + 0x32, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x31, + 0x66, 0x66, 0x11, 0x37, 0x22, 0x27, 0x73, 0x3a, + 0xaa, 0xaa, 0xa3, 0x33, 0x3a, 0xaa, 0xaa, 0xaa, + 0xa3, 0x77, 0xaa, 0x10, 0x50, 0x08, 0x46, 0x05, + 0x54, 0x80, 0x50, 0x42, 0x00, 0x00, 0x08, 0x66, + 0x66, 0x1a, 0x32, 0x22, 0x22, 0x22, 0x22, 0x27, + 0x31, 0x66, 0x66, 0x13, 0x72, 0x22, 0x77, 0x33, + 0xaa, 0xaa, 0xaa, 0x33, 0xaa, 0xa1, 0xaa, 0xa3, + 0x37, 0xa1, 0x1a, 0x30, 0x50, 0x06, 0x26, 0x00, + 0x54, 0x00, 0x00, 0x44, 0x00, 0x00, 0x08, 0xe2, + 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x22, 0x22, + 0x27, 0xa6, 0x66, 0x61, 0xa7, 0x72, 0x27, 0x73, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x33, + 0x31, 0x11, 0x37, 0x70, 0x02, 0x00, 0xab, 0xbb, + 0xb6, 0x00, 0x00, 0xf4, 0x00, 0x00, 0xee, 0xee, + 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x22, + 0x22, 0x23, 0x16, 0x66, 0x1a, 0x37, 0x22, 0x77, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xa3, 0x3a, + 0x11, 0xa7, 0x33, 0x10, 0x04, 0x09, 0xbd, 0xdd, + 0xbd, 0xd0, 0x04, 0x45, 0x00, 0x0e, 0xee, 0xee, + 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0x22, + 0x22, 0x22, 0x71, 0x66, 0x66, 0x13, 0x72, 0x27, + 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x33, 0x11, + 0xa3, 0x73, 0xa1, 0x60, 0x08, 0xbd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdb, 0x90, 0x00, 0x02, 0xec, 0xee, + 0xee, 0xee, 0xee, 0xee, 0xee, 0xee, 0xce, 0x22, + 0x22, 0x22, 0x27, 0xa6, 0x66, 0x61, 0x37, 0x27, + 0x1a, 0xaa, 0xaa, 0xaa, 0xaa, 0xa3, 0xa1, 0x1a, + 0x33, 0xa1, 0x16, 0x60, 0x0b, 0xbd, 0xdd, 0xdd, + 0xcd, 0xdd, 0xdd, 0xd9, 0x00, 0x00, 0xec, 0xcc, + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xce, 0xa2, + 0x22, 0x22, 0x22, 0x7a, 0x66, 0x66, 0x13, 0x77, + 0x1a, 0xaa, 0xaa, 0xaa, 0xaa, 0x3a, 0x11, 0x33, + 0xaa, 0x11, 0x66, 0x60, 0x9b, 0xdd, 0xdd, 0xdd, + 0xcd, 0xdd, 0xdb, 0xb9, 0x00, 0x00, 0xec, 0xcc, + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xee, 0x61, + 0x72, 0x22, 0x22, 0x22, 0xa1, 0x66, 0x61, 0x37, + 0x1a, 0xaa, 0xaa, 0xaa, 0xa3, 0xa1, 0x13, 0x3a, + 0x11, 0x11, 0x11, 0x10, 0x5b, 0xdd, 0xdd, 0xdc, + 0xdd, 0xdd, 0xbd, 0xd9, 0x00, 0x00, 0xec, 0xcc, + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xee, 0x86, + 0x17, 0x22, 0x22, 0x22, 0x23, 0x16, 0x66, 0xaa, + 0xaa, 0xa3, 0x3a, 0xaa, 0xaa, 0x1a, 0x3a, 0xa1, + 0x11, 0x11, 0x1a, 0x70, 0x05, 0xbd, 0xdd, 0xdd, + 0xdb, 0x5b, 0xdd, 0xb0, 0x00, 0x60, 0x2e, 0xcc, + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xe6, 0x88, + 0x66, 0x32, 0x22, 0x22, 0x22, 0x36, 0x66, 0x11, + 0x33, 0x33, 0x3a, 0xaa, 0x11, 0xaa, 0xaa, 0xa1, + 0x11, 0x1a, 0x3a, 0x60, 0x02, 0x99, 0xbb, 0xb9, + 0x9b, 0xbb, 0xbc, 0x22, 0x00, 0x86, 0x5e, 0xcc, + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xe1, 0x68, + 0x86, 0x63, 0x22, 0x22, 0x22, 0x2a, 0x66, 0x66, + 0x33, 0x33, 0xaa, 0xaa, 0x1a, 0xaa, 0xaa, 0x11, + 0x1a, 0xa7, 0x68, 0x80, 0x02, 0x2b, 0xbd, 0xbb, + 0xbb, 0xb9, 0x22, 0x22, 0x00, 0x06, 0x6e, 0xcc, + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xc7, 0xa6, + 0x88, 0x86, 0x32, 0x22, 0x22, 0x27, 0xa6, 0x66, + 0x33, 0x3a, 0xaa, 0xa1, 0xaa, 0xaa, 0xa1, 0x11, + 0xa3, 0xa6, 0x88, 0x80, 0x02, 0x22, 0x9b, 0xbb, + 0xbb, 0x22, 0x24, 0xf4, 0x60, 0x00, 0x0c, 0xcc, + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xc2, 0x21, + 0x68, 0x88, 0x63, 0x22, 0x22, 0x22, 0x71, 0x66, + 0x33, 0x3a, 0x11, 0x11, 0xaa, 0xaa, 0x11, 0xaa, + 0x71, 0x88, 0x88, 0x00, 0x02, 0xe2, 0x26, 0x99, + 0x22, 0x22, 0x4f, 0xf4, 0x40, 0x00, 0x0c, 0xcc, + 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x22, 0x22, + 0x16, 0x88, 0x86, 0xa2, 0x22, 0x22, 0x27, 0x11, + 0x33, 0xa1, 0x11, 0x11, 0xaa, 0x31, 0x1a, 0xa3, + 0x68, 0x88, 0x81, 0x00, 0x54, 0x42, 0x22, 0x22, + 0x22, 0x44, 0xff, 0xff, 0x48, 0x00, 0x00, 0x99, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x22, 0x22, + 0x21, 0x88, 0x88, 0x6a, 0x22, 0x22, 0x22, 0x31, + 0x3a, 0xa1, 0x11, 0x1a, 0xa3, 0x11, 0x33, 0x36, + 0x88, 0x86, 0x30, 0x00, 0x4f, 0x44, 0x22, 0x22, + 0x24, 0xff, 0xff, 0xff, 0x44, 0x00, 0x00, 0x99, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x95, 0x22, 0x72, + 0x22, 0x18, 0x88, 0x86, 0x32, 0x22, 0x22, 0x27, + 0xaa, 0x11, 0x11, 0x1a, 0x31, 0x13, 0x33, 0x68, + 0x88, 0x6a, 0x00, 0x02, 0x4f, 0x4f, 0x42, 0x24, + 0x4f, 0xff, 0xff, 0xff, 0xf4, 0x50, 0x00, 0x99, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x22, 0x73, + 0x72, 0x26, 0x88, 0x88, 0x63, 0x22, 0x22, 0x22, + 0x11, 0x11, 0x11, 0xa3, 0xa1, 0x73, 0xa6, 0x88, + 0x81, 0xa5, 0x00, 0x04, 0x4f, 0x4f, 0x44, 0x4f, + 0xff, 0xff, 0xff, 0xff, 0xf4, 0x40, 0x00, 0x99, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x12, 0x27, + 0xaa, 0x22, 0x68, 0x55, 0x86, 0x72, 0x22, 0x22, + 0x11, 0x11, 0x1a, 0x33, 0x13, 0x3a, 0x18, 0x88, + 0x1a, 0x10, 0x00, 0x44, 0x4f, 0x4f, 0xff, 0x4f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x99, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x61, 0x22, + 0x3a, 0xa2, 0x26, 0x85, 0x58, 0x67, 0x22, 0x22, + 0x61, 0x61, 0x1a, 0x7a, 0x37, 0x31, 0x88, 0x81, + 0x11, 0x00, 0x05, 0xe4, 0x44, 0xff, 0xff, 0xff, + 0x4f, 0xf4, 0x44, 0xff, 0xff, 0xf5, 0x00, 0x99, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x88, 0x12, + 0x2a, 0xaa, 0x72, 0x68, 0x55, 0x81, 0x22, 0x22, + 0x66, 0x61, 0xa3, 0x33, 0x73, 0x16, 0x88, 0x11, + 0x10, 0x00, 0x08, 0x74, 0x44, 0x4f, 0x44, 0x44, + 0xf4, 0xf4, 0x44, 0x44, 0xe2, 0x44, 0x00, 0x99, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x88, 0x81, + 0x22, 0xaa, 0xa7, 0x26, 0x85, 0x88, 0x12, 0x22, + 0x66, 0x61, 0x37, 0xa7, 0x3a, 0x66, 0x66, 0x11, + 0x80, 0x00, 0x0a, 0x72, 0x44, 0x4f, 0x44, 0x4f, + 0xff, 0x44, 0x44, 0x22, 0x22, 0x24, 0x00, 0x99, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0x85, 0x88, + 0x12, 0x2a, 0xaa, 0x22, 0x68, 0x58, 0x63, 0x22, + 0x66, 0x1a, 0x73, 0x77, 0x31, 0x66, 0x61, 0x11, + 0x00, 0x00, 0x07, 0x44, 0xff, 0x4f, 0xf4, 0x4f, + 0xff, 0x4f, 0x44, 0xf4, 0x42, 0x22, 0x40, 0x9b, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xb9, 0x85, 0x55, + 0x81, 0x27, 0xaa, 0xa2, 0x78, 0x88, 0x86, 0x72, + 0x66, 0x13, 0x77, 0x73, 0x11, 0x66, 0x61, 0x76, + 0x00, 0x50, 0x84, 0xf4, 0xff, 0x4f, 0xf4, 0xff, + 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x42, 0x40, 0x9b, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xb9, 0x68, 0x55, + 0x58, 0x12, 0x3a, 0xaa, 0x23, 0x88, 0x88, 0xa7, + 0x66, 0xa7, 0x77, 0x7a, 0x16, 0x66, 0x1a, 0x15, + 0x05, 0x00, 0x4f, 0xf4, 0xff, 0x4f, 0xf4, 0xff, + 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x44, 0x24, 0x9b, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0xb9, 0x26, 0x55, + 0x55, 0x81, 0x23, 0xaa, 0x32, 0x18, 0x88, 0x6a, + 0x61, 0x37, 0x77, 0x31, 0x66, 0x66, 0x17, 0x60, + 0x05, 0x08, 0x4f, 0xf4, 0xff, 0x4f, 0xf4, 0xff, + 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x4e, 0x99, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x99, 0xa2, 0x65, + 0x55, 0x58, 0xa2, 0x7a, 0xa2, 0x26, 0x88, 0x61, + 0x61, 0x32, 0x27, 0xa1, 0x66, 0x61, 0x31, 0x60, + 0x00, 0x04, 0x4f, 0xf4, 0xff, 0x44, 0x44, 0xff, + 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x44, 0xf4, 0x99, + 0xbb, 0xbb, 0xbb, 0xbb, 0xbb, 0x9b, 0xaa, 0x26, + 0x55, 0x55, 0x87, 0x27, 0x33, 0x27, 0x68, 0x61, + 0x1a, 0x72, 0x27, 0xa6, 0x66, 0x6a, 0x71, 0x00, + 0x80, 0x84, 0xff, 0xf4, 0xff, 0x44, 0x44, 0xff, + 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x44, 0xf4, 0x99, + 0x9b, 0x9b, 0x99, 0xb9, 0xb9, 0x99, 0xaa, 0xa2, + 0x85, 0x55, 0x56, 0x22, 0x27, 0x22, 0x36, 0x66, + 0x13, 0x22, 0x23, 0x16, 0x86, 0x63, 0x73, 0x00, + 0x00, 0x44, 0xf4, 0xf4, 0xff, 0x44, 0x44, 0xff, + 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x4f, 0x99, + 0x9b, 0x99, 0x99, 0x99, 0xb9, 0x99, 0xaa, 0xaa, + 0x28, 0x55, 0x58, 0x12, 0x22, 0x22, 0x21, 0x11, + 0xa3, 0x27, 0x7a, 0x66, 0x86, 0x17, 0x75, 0x05, + 0x05, 0xff, 0xf4, 0xf4, 0xff, 0x44, 0x44, 0xff, + 0xff, 0x4f, 0x44, 0x4f, 0x4f, 0x44, 0x4f, 0x99, + 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x3a, 0xaa, + 0xa2, 0x85, 0x58, 0x67, 0x72, 0x22, 0x27, 0xa1, + 0x37, 0x27, 0x7a, 0x68, 0x86, 0xa2, 0x70, 0x00, + 0x02, 0xff, 0xf4, 0xf4, 0xff, 0x44, 0x44, 0x4f, + 0xff, 0x4f, 0x44, 0xf4, 0xf4, 0xf4, 0xf4, 0x99, + 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x23, 0xaa, + 0xa7, 0x78, 0x88, 0x81, 0x77, 0x22, 0x27, 0x3a, + 0x72, 0x73, 0x71, 0x68, 0x66, 0x32, 0x50, 0x00, + 0x04, 0x4f, 0xf4, 0xf4, 0xff, 0x44, 0x44, 0x4f, + 0xff, 0x4f, 0x44, 0xf4, 0xf4, 0xf4, 0x44, 0x95, + 0x99, 0x99, 0x99, 0x99, 0x99, 0x55, 0x12, 0x3a, + 0xaa, 0x21, 0x88, 0x81, 0x77, 0x27, 0x73, 0x73, + 0x72, 0x33, 0x36, 0x86, 0x61, 0x72, 0x00, 0x00, + 0x04, 0x44, 0xf4, 0xf4, 0xf4, 0x44, 0x44, 0x4f, + 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x44, 0x55, + 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x8a, 0x27, + 0xaa, 0x77, 0x68, 0x61, 0x23, 0x71, 0x11, 0x3a, + 0x27, 0xa3, 0x36, 0x86, 0x61, 0x20, 0x00, 0x00, + 0x04, 0xf4, 0xf4, 0xf4, 0xf4, 0x44, 0x44, 0x4f, + 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x41, 0x59, + 0x99, 0x99, 0x99, 0x99, 0x99, 0x95, 0x58, 0x77, + 0x27, 0x32, 0x36, 0x63, 0x23, 0x71, 0x66, 0x11, + 0x27, 0x13, 0xa6, 0x86, 0x6a, 0x20, 0x00, 0x50, + 0x04, 0x4f, 0x4f, 0x4f, 0x4f, 0x44, 0x44, 0x4f, + 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x41, 0x99, + 0x9b, 0xbb, 0xbb, 0xbb, 0xb9, 0x99, 0x68, 0x13, + 0x32, 0x22, 0x73, 0xa7, 0x2a, 0x31, 0x88, 0x66, + 0x7a, 0x13, 0x18, 0x66, 0x63, 0x20, 0x00, 0x06, + 0x0f, 0x4f, 0x4f, 0x4f, 0x4f, 0x44, 0x44, 0x4f, + 0xff, 0x4f, 0x44, 0xff, 0x4f, 0x4f, 0x49, 0x95, + 0xa9, 0xa9, 0x99, 0x97, 0x92, 0x99, 0x65, 0x6a, + 0x17, 0x22, 0x23, 0x72, 0x27, 0xaa, 0x88, 0x88, + 0xa1, 0x17, 0x68, 0x66, 0x67, 0x70, 0x00, 0x05, + 0x0f, 0x4f, 0x4f, 0x4f, 0x4f, 0x44, 0x44, 0x4f, + 0xff, 0x4f, 0x44, 0xff, 0xf4, 0xf4, 0x49, 0x9c, + 0x2e, 0xee, 0xee, 0xee, 0xee, 0xa9, 0x65, 0x8a, + 0x1a, 0xaa, 0x37, 0x72, 0x27, 0x37, 0x88, 0x88, + 0x11, 0x17, 0x68, 0x66, 0x67, 0x10, 0x9d, 0xd0, + 0x84, 0x44, 0xff, 0x4f, 0x4f, 0x44, 0xf4, 0x4f, + 0xff, 0x4f, 0x44, 0xff, 0xf4, 0xf4, 0x4f, 0x69, + 0xcc, 0xee, 0xee, 0xee, 0xec, 0x99, 0x88, 0x63, + 0x61, 0x68, 0x61, 0x72, 0x22, 0x7a, 0x68, 0x88, + 0x11, 0x17, 0x88, 0x66, 0x12, 0x1b, 0xdd, 0xdd, + 0x02, 0x44, 0x4f, 0x4f, 0x4f, 0x44, 0x44, 0x4f, + 0xff, 0x4f, 0x44, 0xff, 0xff, 0x4f, 0x4c, 0xc5, + 0x0c, 0xc1, 0x11, 0x1c, 0xc0, 0x26, 0x66, 0x17, + 0x66, 0x88, 0x88, 0x12, 0x22, 0x23, 0xa8, 0x88, + 0x11, 0x13, 0x88, 0x66, 0x17, 0xbb, 0xdd, 0xdd, + 0xd0, 0x8f, 0xff, 0xf4, 0xf4, 0x44, 0xf4, 0x4f, + 0xff, 0x4f, 0x44, 0xf4, 0x4f, 0x44, 0xdd, 0xdd, + 0x00, 0x00, 0x00, 0x05, 0x9d, 0x21, 0x66, 0x27, + 0xa6, 0x65, 0x58, 0x67, 0x22, 0x27, 0x28, 0x88, + 0x11, 0xaa, 0x86, 0x68, 0x1a, 0xbb, 0xdd, 0xdd, + 0xdb, 0x05, 0xf4, 0xf4, 0xf4, 0xf4, 0x44, 0x4f, + 0xff, 0x4f, 0x44, 0xf4, 0xf4, 0xf4, 0xdd, 0xdb, + 0x00, 0x00, 0x00, 0x00, 0xdd, 0xda, 0x66, 0x22, + 0x71, 0x15, 0x55, 0x81, 0x22, 0x22, 0x76, 0x88, + 0x11, 0x31, 0x88, 0x88, 0xab, 0xbd, 0xdd, 0xdd, + 0xdd, 0x00, 0x04, 0x44, 0xff, 0xff, 0x4f, 0x4f, + 0xff, 0x4f, 0x44, 0xf4, 0xf4, 0x44, 0xdd, 0xdb, + 0x00, 0x00, 0x00, 0x0b, 0xdd, 0xda, 0x11, 0x22, + 0x23, 0x68, 0x55, 0x86, 0x22, 0x22, 0x7a, 0x88, + 0x1a, 0x71, 0x88, 0x89, 0xbb, 0xdd, 0xdd, 0xdd, + 0xdd, 0xd0, 0x00, 0x4f, 0x44, 0xff, 0x4f, 0x4f, + 0xff, 0x4f, 0x44, 0xf4, 0xff, 0xe2, 0xdd, 0xdb, + 0x90, 0x00, 0x05, 0xbd, 0xdd, 0xb8, 0x63, 0x22, + 0x27, 0xa6, 0x55, 0x88, 0x77, 0x22, 0x22, 0x88, + 0x1a, 0x28, 0xbd, 0xdb, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdb, 0x00, 0x07, 0x44, 0x4f, 0x4f, 0x4f, + 0xff, 0x4f, 0x44, 0x4f, 0x4f, 0x22, 0xdd, 0xdb, + 0xbb, 0x9b, 0xbb, 0xbd, 0xdd, 0xd5, 0x86, 0x22, + 0x22, 0x77, 0x85, 0x88, 0x17, 0x22, 0x22, 0x88, + 0xaa, 0x2b, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0x00, 0x00, 0x54, 0x4f, 0x4f, 0x4f, + 0xff, 0x4f, 0x44, 0xf4, 0x44, 0x22, 0xbd, 0xdd, + 0xbb, 0xbb, 0xbb, 0xdd, 0xdd, 0xdd, 0x88, 0x72, + 0x27, 0x22, 0x88, 0x88, 0x67, 0x72, 0x22, 0x18, + 0x33, 0x2d, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xd0, 0x00, 0x05, 0x4f, 0x4f, 0x4f, + 0xff, 0x4f, 0x44, 0x44, 0x4f, 0x22, 0xbd, 0xdd, + 0xdb, 0xbb, 0xdd, 0xdd, 0xdd, 0xdd, 0x88, 0x17, + 0x27, 0x72, 0x68, 0x88, 0x87, 0x32, 0x22, 0x36, + 0x37, 0x2d, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xd5, 0x00, 0x00, 0x4f, 0x4f, 0x4f, + 0xff, 0xf4, 0xf4, 0xf4, 0xf4, 0x22, 0xbb, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xd8, 0x67, + 0x72, 0x77, 0x38, 0x88, 0x83, 0x37, 0x22, 0x26, + 0x72, 0x2b, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0x00, 0x00, 0x4f, 0x4f, 0x4f, + 0xff, 0xf4, 0xf4, 0xf4, 0x44, 0x25, 0xbb, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xd3, + 0x32, 0x73, 0x76, 0x88, 0x81, 0x33, 0x22, 0x2a, + 0x22, 0x2b, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xb0, 0x54, 0x4f, 0x4f, 0x4f, + 0xff, 0xf4, 0xf4, 0xff, 0x44, 0x00, 0xbb, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xa7, 0x73, 0x26, 0x88, 0x86, 0x7a, 0x72, 0x27, + 0x22, 0x2b, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdb, 0x44, 0xff, 0x4f, 0x4f, + 0xff, 0xf4, 0xf4, 0x44, 0x40, 0x05, 0xbb, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0x13, 0x23, 0x21, 0x68, 0x86, 0x17, 0x72, 0x22, + 0x22, 0x2b, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdb, 0x44, 0x4f, 0x4f, 0x4f, + 0xff, 0xff, 0x44, 0x42, 0x00, 0x05, 0xbd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0x87, 0x27, 0x27, 0x16, 0x66, 0x67, 0x22, 0x22, + 0x72, 0x7b, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0x94, 0x44, 0x44, 0x44, + 0x44, 0x44, 0x44, 0x00, 0x00, 0x05, 0xbb, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xb8, + 0x86, 0x22, 0x22, 0x7a, 0x68, 0x81, 0x22, 0x22, + 0x37, 0x7b, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdb, 0xb5, 0x44, 0x44, 0x44, + 0x44, 0x47, 0x00, 0x00, 0x00, 0x05, 0xbd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xd8, 0x68, + 0x58, 0x72, 0x22, 0x27, 0x18, 0x86, 0x72, 0x22, + 0x1a, 0xbb, 0xbd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdb, 0xb5, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0xbb, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xb9, 0x18, 0x85, + 0x58, 0x12, 0x22, 0x36, 0x18, 0x88, 0x32, 0x22, + 0x61, 0x3b, 0xbb, 0xbb, 0xbd, 0xdd, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdb, 0xb9, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0xbb, 0xdd, + 0xdd, 0xdd, 0xdd, 0xdd, 0xb9, 0x7a, 0x68, 0x85, + 0x88, 0x62, 0x27, 0x16, 0x18, 0x88, 0x12, 0x27, + 0x86, 0x18, 0x9b, 0xbb, 0xbb, 0xbb, 0xbb, 0xbd, + 0xdd, 0xdd, 0xdd, 0xbb, 0xb5, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xbb, 0xbd, + 0xdd, 0xdd, 0xdb, 0xbb, 0x87, 0x31, 0x68, 0x65, + 0x88, 0x82, 0x23, 0x16, 0x18, 0x88, 0x12, 0x23, + 0x88, 0x67, 0x27, 0xa8, 0x9b, 0xbb, 0xbb, 0xbb, + 0xbd, 0xdd, 0xbb, 0xbb, 0x95, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x9b, 0xbb, + 0xbb, 0xbb, 0xbb, 0x96, 0x87, 0x16, 0x68, 0x18, + 0x88, 0x62, 0x31, 0x66, 0x18, 0x88, 0x62, 0x73, + 0x88, 0x63, 0x27, 0x33, 0x65, 0x55, 0x99, 0x9b, + 0xbb, 0xbb, 0xbb, 0x99, 0x55, 0x0a, 0xa1, 0x86, + 0x81, 0x68, 0x88, 0x55, 0x58, 0x85, 0x9b, 0xbb, + 0xbb, 0xbb, 0x95, 0x88, 0x83, 0x66, 0x66, 0x18, + 0x66, 0x82, 0xa1, 0x66, 0x18, 0x88, 0x62, 0x33, + 0x88, 0x81, 0x27, 0x7a, 0x18, 0x58, 0x86, 0x85, + 0x99, 0x99, 0x99, 0x95, 0x53, 0x2a, 0xaa, 0x88, + 0x67, 0x31, 0x68, 0x55, 0x58, 0x85, 0x59, 0xbb, + 0xbb, 0xb9, 0x58, 0x68, 0x83, 0x66, 0x61, 0x16, + 0x66, 0x62, 0x16, 0x66, 0x68, 0x88, 0x62, 0xaa, + 0x88, 0x86, 0x27, 0x77, 0x78, 0x55, 0x88, 0x22, + 0x25, 0x55, 0x95, 0x55, 0x6a, 0xa2, 0x2a, 0x88, + 0x62, 0x27, 0x37, 0x38, 0x88, 0x87, 0x55, 0x59, + 0x95, 0x58, 0x16, 0x88, 0x8a, 0x66, 0x63, 0x68, + 0x86, 0x67, 0x66, 0x66, 0x68, 0x88, 0x12, 0x11, + 0x88, 0x88, 0x72, 0x77, 0x78, 0x85, 0x58, 0x17, + 0x23, 0x32, 0x55, 0x55, 0x81, 0x13, 0x73, 0x66, + 0x62, 0x7a, 0xaa, 0x38, 0x88, 0x58, 0x27, 0x55, + 0x58, 0x32, 0x38, 0x88, 0x81, 0x66, 0xa2, 0x88, + 0x86, 0x61, 0x66, 0x61, 0x66, 0x68, 0x13, 0x11, + 0x88, 0x88, 0x12, 0x22, 0x71, 0x85, 0x58, 0x62, + 0x23, 0xa2, 0x68, 0x88, 0x81, 0x66, 0x88, 0x88, + 0x63, 0x2a, 0xaa, 0x28, 0x88, 0x55, 0x86, 0x61, + 0x66, 0x66, 0x68, 0x88, 0x66, 0x66, 0x77, 0x88, + 0x68, 0x16, 0x66, 0x62, 0x66, 0x68, 0xa1, 0x61, + 0x88, 0x88, 0x62, 0x22, 0x22, 0x85, 0x55, 0x83, + 0x72, 0x37, 0xa8, 0x88, 0x61, 0x66, 0x85, 0x55, + 0x86, 0x23, 0xaa, 0x71, 0x88, 0x85, 0x88, 0x66, + 0x88, 0x86, 0x88, 0x88, 0x16, 0x61, 0x21, 0x88, + 0x66, 0xa6, 0x86, 0x17, 0x66, 0x66, 0x31, 0x61, + 0x88, 0x88, 0x87, 0x72, 0x22, 0x68, 0x55, 0x86, + 0x77, 0x77, 0x36, 0x88, 0x13, 0x68, 0x85, 0x55, + 0x58, 0x12, 0x73, 0x72, 0x76, 0x88, 0x88, 0x68, + 0x88, 0x88, 0x88, 0x66, 0x36, 0x63, 0x26, 0x86, + 0x86, 0x36, 0x86, 0x11, 0x66, 0x66, 0x76, 0x61, + 0x88, 0x88, 0x81, 0x22, 0x22, 0x38, 0x85, 0x58, + 0x37, 0x22, 0x21, 0x68, 0xa2, 0x31, 0x68, 0x55, + 0x55, 0x81, 0x22, 0x22, 0xa8, 0x88, 0x88, 0x68, + 0x86, 0x88, 0x68, 0x81, 0x36, 0x17, 0x21, 0x68, + 0x86, 0x16, 0x66, 0x26, 0x66, 0x61, 0x36, 0x66, + 0x68, 0x88, 0x86, 0x27, 0x22, 0x28, 0x88, 0x88, + 0x17, 0x72, 0x2a, 0x66, 0xa2, 0x22, 0x36, 0x55, + 0x55, 0x58, 0x37, 0x3a, 0x16, 0x66, 0x66, 0x66, + 0x66, 0x18, 0x88, 0x67, 0x16, 0x12, 0x71, 0x68, + 0x81, 0x68, 0x61, 0x76, 0x66, 0x6a, 0x16, 0x66, + 0x88, 0x88, 0x86, 0x77, 0x22, 0x26, 0x88, 0x88, + 0x13, 0x37, 0x71, 0x66, 0xa2, 0x33, 0x2a, 0x85, + 0x55, 0x55, 0x17, 0x73, 0x16, 0x66, 0x66, 0x68, + 0x63, 0x88, 0x88, 0xa2, 0x66, 0xa2, 0xa6, 0x88, + 0x61, 0x68, 0x6a, 0x76, 0x66, 0x6a, 0x66, 0x6a +}; #else diff --git a/include/asm-m68k/pgtable.h b/include/asm-m68k/pgtable.h index d49f985bf..1dbc17608 100644 --- a/include/asm-m68k/pgtable.h +++ b/include/asm-m68k/pgtable.h @@ -16,6 +16,9 @@ /* For virtual address to physical address conversion */ extern unsigned long mm_vtop(unsigned long addr) __attribute__ ((const)); extern unsigned long mm_ptov(unsigned long addr) __attribute__ ((const)); + +#include<asm/virtconvert.h> + #define VTOP(addr) (mm_vtop((unsigned long)(addr))) #define PTOV(addr) (mm_ptov((unsigned long)(addr))) @@ -126,7 +129,7 @@ extern inline void flush_page_to_ram (unsigned long address) "cpushp %%dc,(%0)\n\t" "cinvp %%ic,(%0)\n\t" ".chip 68k" - : : "a" (VTOP(address))); + : : "a" (virt_to_phys((void *)address))); } else { unsigned long _tmp; @@ -151,7 +154,7 @@ extern inline void flush_icache_range (unsigned long address, "cpushp %%dc,(%0)\n\t" "cinvp %%ic,(%0)\n\t" ".chip 68k" - : : "a" (VTOP(address))); + : : "a" (virt_to_phys((void *)address))); address += PAGE_SIZE; } } @@ -423,9 +426,9 @@ extern pte_t * __bad_pagetable(void); * and a page entry and page directory to the page they refer to. */ #define mk_pte(page, pgprot) \ -({ pte_t __pte; pte_val(__pte) = VTOP(page) + pgprot_val(pgprot); __pte; }) +({ pte_t __pte; pte_val(__pte) = virt_to_phys((void *)page) + pgprot_val(pgprot); __pte; }) #define mk_pte_phys(physpage, pgprot) \ -({ pte_t __pte; pte_val(__pte) = VTOP(physpage) + pgprot_val(pgprot); __pte; }) +({ pte_t __pte; pte_val(__pte) = virt_to_phys((void *)physpage) + pgprot_val(pgprot); __pte; }) extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) { pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; } @@ -434,7 +437,7 @@ extern inline void pmd_set(pmd_t * pmdp, pte_t * ptep) { int i; - ptep = (pte_t *) VTOP(ptep); + ptep = (pte_t *) virt_to_phys(ptep); for (i = 0; i < 16; i++, ptep += PTRS_PER_PTE/16) pmdp->pmd[i] = _PAGE_TABLE | _PAGE_ACCESSED | (unsigned long)ptep; } @@ -444,23 +447,23 @@ extern inline void pmd_set_et(pmd_t * pmdp, pte_t * ptep) { int i; - ptep = (pte_t *) VTOP(ptep); + ptep = (pte_t *) virt_to_phys(ptep); for (i = 0; i < 16; i++, ptep += PTRS_PER_PTE/16) pmdp->pmd[i] = _PAGE_PRESENT | _PAGE_ACCESSED | (unsigned long)ptep; } extern inline void pgd_set(pgd_t * pgdp, pmd_t * pmdp) -{ pgd_val(*pgdp) = _PAGE_TABLE | _PAGE_ACCESSED | VTOP(pmdp); } +{ pgd_val(*pgdp) = _PAGE_TABLE | _PAGE_ACCESSED | virt_to_phys(pmdp); } extern inline unsigned long pte_page(pte_t pte) -{ return PTOV(pte_val(pte) & PAGE_MASK); } +{ return (unsigned long)phys_to_virt((unsigned long)(pte_val(pte) & PAGE_MASK)); } extern inline unsigned long pmd_page2(pmd_t *pmd) -{ return PTOV(pmd_val(*pmd) & _TABLE_MASK); } +{ return (unsigned long)phys_to_virt((unsigned long)(pmd_val(*pmd) & _TABLE_MASK)); } #define pmd_page(pmd) pmd_page2(&(pmd)) extern inline unsigned long pgd_page(pgd_t pgd) -{ return PTOV(pgd_val(pgd) & _TABLE_MASK); } +{ return (unsigned long)phys_to_virt((unsigned long)(pgd_val(pgd) & _TABLE_MASK)); } extern inline int pte_none(pte_t pte) { return !pte_val(pte); } extern inline int pte_present(pte_t pte) { return pte_val(pte) & (_PAGE_PRESENT | _PAGE_FAKE_SUPER); } @@ -517,7 +520,7 @@ extern inline pte_t pte_mkcache(pte_t pte) { pte_val(pte) = (pte_val(pte) & _CAC extern inline void SET_PAGE_DIR(struct task_struct * tsk, pgd_t * pgdir) { tsk->tss.crp[0] = 0x80000000 | _PAGE_TABLE; - tsk->tss.crp[1] = VTOP(pgdir); + tsk->tss.crp[1] = virt_to_phys(pgdir); if (tsk == current) { if (CPU_IS_040_OR_060) __asm__ __volatile__ (".chip 68040\n\t" @@ -632,7 +635,7 @@ extern __inline__ pte_t *get_pte_fast(void) ret = pte_quicklist; if (ret) { pte_quicklist = (unsigned long *)*ret; - ret[0] = ret[1]; + ret[0] = 0; quicklists.pgtable_cache_sz -= 8; } return (pte_t *)ret; @@ -658,7 +661,7 @@ extern __inline__ pmd_t *get_pmd_fast(void) ret = pmd_quicklist; if (ret) { pmd_quicklist = (unsigned long *)*ret; - ret[0] = ret[1]; + ret[0] = 0; quicklists.pgtable_cache_sz--; } return (pmd_t *)ret; @@ -799,7 +802,18 @@ extern inline void set_pgdir(unsigned long address, pgd_t entry) * Check if the addr/len goes up to the end of a physical * memory chunk. Used for DMA functions. */ +#ifdef CONFIG_SINGLE_MEMORY_CHUNK +/* + * It makes no sense to consider whether we cross a memory boundary if + * we support just one physical chunk of memory. + */ +extern inline int mm_end_of_chunk (unsigned long addr, int len) +{ + return 0; +} +#else int mm_end_of_chunk (unsigned long addr, int len); +#endif /* * Map some physical address range into the kernel address space. diff --git a/include/asm-m68k/setup.h b/include/asm-m68k/setup.h index a3084e04d..bf3314c2a 100644 --- a/include/asm-m68k/setup.h +++ b/include/asm-m68k/setup.h @@ -43,7 +43,7 @@ #ifdef __KERNEL__ #ifndef __ASSEMBLY__ -extern u_long m68k_machtype; +extern unsigned long m68k_machtype; #endif /* !__ASSEMBLY__ */ #if !defined(CONFIG_AMIGA) @@ -186,9 +186,9 @@ extern u_long m68k_machtype; #ifdef __KERNEL__ #ifndef __ASSEMBLY__ -extern u_long m68k_cputype; -extern u_long m68k_fputype; -extern u_long m68k_mmutype; /* Not really used yet */ +extern unsigned long m68k_cputype; +extern unsigned long m68k_fputype; +extern unsigned long m68k_mmutype; /* Not really used yet */ /* * m68k_is040or060 is != 0 for a '040 or higher; @@ -260,29 +260,23 @@ extern int m68k_is040or060; #define CPU_TYPE (m68k_cputype) -#endif /* __KERNEL__ */ - - /* * Miscellaneous */ -#define NUM_MEMINFO (4) -#define CL_SIZE (256) +#define NUM_MEMINFO 4 +#define CL_SIZE 256 #ifndef __ASSEMBLY__ +extern int m68k_num_memory; /* # of memory blocks found */ +extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */ struct mem_info { unsigned long addr; /* physical address of memory chunk */ unsigned long size; /* length of memory chunk (in bytes) */ }; +#endif -#ifdef __KERNEL__ -extern int m68k_num_memory; /* # of memory blocks found */ -extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */ #endif /* __KERNEL__ */ -#endif /* !__ASSEMBLY__ */ - - #endif /* _M68K_SETUP_H */ diff --git a/include/asm-m68k/siginfo.h b/include/asm-m68k/siginfo.h index f6799d2b1..4061e6f72 100644 --- a/include/asm-m68k/siginfo.h +++ b/include/asm-m68k/siginfo.h @@ -87,6 +87,7 @@ typedef struct siginfo { #define SI_TIMER -2 /* sent by timer expiration */ #define SI_MESGQ -3 /* sent by real time mesq state change */ #define SI_ASYNCIO -4 /* sent by AIO completion */ +#define SI_SIGIO -5 /* sent by queued SIGIO */ #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) diff --git a/include/asm-m68k/softirq.h b/include/asm-m68k/softirq.h index 0798b0d7d..89c786665 100644 --- a/include/asm-m68k/softirq.h +++ b/include/asm-m68k/softirq.h @@ -61,6 +61,6 @@ extern inline void end_bh_atomic(void) /* These are for the irq's testing the lock */ #define softirq_trylock(cpu) (local_bh_count[cpu] ? 0 : (local_bh_count[cpu]=1)) #define softirq_endlock(cpu) (local_bh_count[cpu] = 0) -#define synchronize_bh() do { } while (0) +#define synchronize_bh() barrier() #endif diff --git a/include/asm-m68k/spinlock.h b/include/asm-m68k/spinlock.h index 83a04ac7f..6c049a124 100644 --- a/include/asm-m68k/spinlock.h +++ b/include/asm-m68k/spinlock.h @@ -5,8 +5,16 @@ * We don't do SMP on the m68k .... at least not yet. */ -typedef struct { int dummy; } spinlock_t; +/* + * Gcc-2.7.x has a nasty bug with empty initializers. + */ +#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) +typedef struct { } spinlock_t; +#define SPIN_LOCK_UNLOCKED { } +#else +typedef struct { int gcc_is_buggy; } spinlock_t; #define SPIN_LOCK_UNLOCKED { 0 } +#endif #define spin_lock_init(lock) do { } while(0) #define spin_lock(lock) do { } while(0) @@ -31,8 +39,8 @@ typedef struct { int dummy; } spinlock_t; * irq-safe write-lock, but readers can get non-irqsafe * read-locks. */ -typedef struct { int dummy; } rwlock_t; -#define RW_LOCK_UNLOCKED { 0 } +typedef struct { } rwlock_t; +#define RW_LOCK_UNLOCKED { } #define read_lock(lock) do { } while(0) #define read_unlock(lock) do { } while(0) diff --git a/include/asm-m68k/uaccess.h b/include/asm-m68k/uaccess.h index 64b8be7bd..a477bce01 100644 --- a/include/asm-m68k/uaccess.h +++ b/include/asm-m68k/uaccess.h @@ -157,12 +157,24 @@ __generic_copy_from_user(void *to, const void *from, unsigned long n) "6:\n" ".section .fixup,\"ax\"\n" " .even\n" - "7: lsll #2,%2\n" + "7: movel %2,%%d0\n" + "71:clrl (%0)+\n" + " subql #1,%%d0\n" + " jne 71b\n" + " lsll #2,%2\n" " addl %4,%2\n" + " btst #1,%4\n" + " jne 81f\n" + " btst #0,%4\n" + " jne 91f\n" " jra 6b\n" "8: addql #2,%2\n" + "81:clrw (%0)+\n" + " btst #0,%4\n" + " jne 91f\n" " jra 6b\n" "9: addql #1,%2\n" + "91:clrb (%0)+\n" " jra 6b\n" ".previous\n" ".section __ex_table,\"a\"\n" @@ -233,7 +245,11 @@ __generic_copy_to_user(void *to, const void *from, unsigned long n) " jne 10b\n" \ ".section .fixup,\"ax\"\n" \ " .even\n" \ - "11: lsll #2,%2\n" \ + "11: movel %2,%%d0\n" \ + "13: clrl (%0)+\n" \ + " subql #1,%%d0\n" \ + " jne 13b\n" \ + " lsll #2,%2\n" \ fixup "\n" \ " jra 12f\n" \ ".previous\n" \ @@ -261,6 +277,7 @@ __constant_copy_from_user(void *to, const void *from, unsigned long n) ".section .fixup,\"ax\"\n" " .even\n" "3: addql #1,%2\n" + " clrb (%0)+\n" " jra 2b\n" ".previous\n" ".section __ex_table,\"a\"\n" @@ -279,6 +296,7 @@ __constant_copy_from_user(void *to, const void *from, unsigned long n) ".section .fixup,\"ax\"\n" " .even\n" "3: addql #2,%2\n" + " clrw (%0)+\n" " jra 2b\n" ".previous\n" ".section __ex_table,\"a\"\n" @@ -299,7 +317,9 @@ __constant_copy_from_user(void *to, const void *from, unsigned long n) ".section .fixup,\"ax\"\n" " .even\n" "4: addql #2,%2\n" + " clrw (%0)+\n" "5: addql #1,%2\n" + " clrb (%0)+\n" " jra 3b\n" ".previous\n" ".section __ex_table,\"a\"\n" @@ -319,6 +339,7 @@ __constant_copy_from_user(void *to, const void *from, unsigned long n) ".section .fixup,\"ax\"\n" " .even\n" "3: addql #4,%2\n" + " clrl (%0)+\n" " jra 2b\n" ".previous\n" ".section __ex_table,\"a\"\n" @@ -339,7 +360,9 @@ __constant_copy_from_user(void *to, const void *from, unsigned long n) ".section .fixup,\"ax\"\n" " .even\n" "4: addql #4,%2\n" + " clrl (%0)+\n" "5: addql #4,%2\n" + " clrl (%0)+\n" " jra 3b\n" ".previous\n" ".section __ex_table,\"a\"\n" @@ -363,8 +386,11 @@ __constant_copy_from_user(void *to, const void *from, unsigned long n) ".section .fixup,\"ax\"\n" " .even\n" "5: addql #4,%2\n" + " clrl (%0)+\n" "6: addql #4,%2\n" + " clrl (%0)+\n" "7: addql #4,%2\n" + " clrl (%0)+\n" " jra 4b\n" ".previous\n" ".section __ex_table,\"a\"\n" @@ -391,9 +417,13 @@ __constant_copy_from_user(void *to, const void *from, unsigned long n) ".section .fixup,\"ax\"\n" " .even\n" "6: addql #4,%2\n" + " clrl (%0)+\n" "7: addql #4,%2\n" + " clrl (%0)+\n" "8: addql #4,%2\n" + " clrl (%0)+\n" "9: addql #4,%2\n" + " clrl (%0)+\n" " jra 5b\n" ".previous\n" ".section __ex_table,\"a\"\n" @@ -415,7 +445,8 @@ __constant_copy_from_user(void *to, const void *from, unsigned long n) case 1: __copy_from_user_big(to, from, n, /* fixup */ - "1: addql #1,%2", + "1: addql #1,%2\n" + " clrb (%0)+", /* copy */ "2: movesb (%1)+,%%d0\n" " moveb %%d0,(%0)+\n" @@ -426,7 +457,8 @@ __constant_copy_from_user(void *to, const void *from, unsigned long n) case 2: __copy_from_user_big(to, from, n, /* fixup */ - "1: addql #2,%2", + "1: addql #2,%2\n" + " clrw (%0)+", /* copy */ "2: movesw (%1)+,%%d0\n" " movew %%d0,(%0)+\n" @@ -438,7 +470,9 @@ __constant_copy_from_user(void *to, const void *from, unsigned long n) __copy_from_user_big(to, from, n, /* fixup */ "1: addql #2,%2\n" - "2: addql #1,%2", + " clrw (%0)+\n" + "2: addql #1,%2\n" + " clrb (%0)+", /* copy */ "3: movesw (%1)+,%%d0\n" " movew %%d0,(%0)+\n" diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h index 4ed5d9f34..2bfda1a3c 100644 --- a/include/asm-m68k/unistd.h +++ b/include/asm-m68k/unistd.h @@ -27,7 +27,7 @@ #define __NR_lseek 19 #define __NR_getpid 20 #define __NR_mount 21 -#define __NR_oldumount 22 +#define __NR_umount 22 #define __NR_setuid 23 #define __NR_getuid 24 #define __NR_stime 25 @@ -57,7 +57,7 @@ #define __NR_geteuid 49 #define __NR_getegid 50 #define __NR_acct 51 -#define __NR_umount 52 +#define __NR_umount2 52 #define __NR_lock 53 #define __NR_ioctl 54 #define __NR_fcntl 55 @@ -315,6 +315,8 @@ static inline _syscall1(int,setup,int,magic) static inline _syscall0(int,sync) static inline _syscall0(pid_t,setsid) static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) +static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) +static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) static inline _syscall1(int,dup,int,fd) static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) static inline _syscall3(int,open,const char *,file,int,flag,int,mode) diff --git a/include/asm-m68k/virtconvert.h b/include/asm-m68k/virtconvert.h new file mode 100644 index 000000000..1e942b9e5 --- /dev/null +++ b/include/asm-m68k/virtconvert.h @@ -0,0 +1,76 @@ +#ifndef __VIRT_CONVERT__ +#define __VIRT_CONVERT__ + +/* + * Macros used for converting between virtual and physical mappings. + */ + +#ifdef __KERNEL__ + +#include <linux/config.h> +#include <asm/setup.h> + +#ifdef CONFIG_AMIGA +#include <asm/amigahw.h> +#endif + +/* + * Change virtual addresses to physical addresses and vv. + */ +extern unsigned long mm_vtop(unsigned long addr) __attribute__ ((const)); +extern unsigned long mm_vtop_fallback (unsigned long); +extern unsigned long mm_ptov(unsigned long addr) __attribute__ ((const)); + +#ifdef CONFIG_SINGLE_MEMORY_CHUNK +extern inline unsigned long virt_to_phys(volatile void * address) +{ + unsigned long voff = (unsigned long) address; + + if (voff < m68k_memory[0].size) + return m68k_memory[0].addr + voff; + else + return mm_vtop_fallback(voff); +} + +extern inline void * phys_to_virt(unsigned long paddr) +{ + unsigned long base = m68k_memory[0].addr; + + if ((paddr >= base) && (paddr < (base + m68k_memory[0].size))) + return (void *)(paddr - base); +#ifdef CONFIG_AMIGA + /* + * if on an amiga and address is in first 16M, move it + * to the ZTWO_VADDR range + */ + if (MACH_IS_AMIGA && paddr < 16*1024*1024) + return (void *)ZTWO_VADDR(paddr); +#endif + return (void *)paddr; +} +#else +extern inline unsigned long virt_to_phys(volatile void * address) +{ + return mm_vtop((unsigned long)address); +} + +extern inline void * phys_to_virt(unsigned long address) +{ + return (void *) mm_ptov(address); +} +#endif + +/* + * IO bus memory addresses are 1:1 with the physical address, + * except on the PCI bus of the Hades. + */ +#ifdef CONFIG_HADES +#define virt_to_bus(a) (virt_to_phys(a) + (MACH_IS_HADES ? 0x80000000 : 0)) +#define bus_to_virt(a) (phys_to_virt((a) - (MACH_IS_HADES ? 0x80000000 : 0))) +#else +#define virt_to_bus virt_to_phys +#define bus_to_virt phys_to_virt +#endif + +#endif +#endif diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h index d87c61165..6ca4bd70e 100644 --- a/include/asm-mips/checksum.h +++ b/include/asm-mips/checksum.h @@ -1,4 +1,4 @@ -/* $Id: checksum.h,v 1.4 1998/05/07 03:02:49 ralf Exp $ +/* $Id: checksum.h,v 1.5 1998/07/10 01:14:54 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -36,6 +36,10 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len, unsigned int sum, int *errp); +#define HAVE_CSUM_COPY_USER +unsigned int csum_and_copy_to_user (const char *src, char *dst, + int len, int sum, int *err_ptr); + /* * the same as csum_partial, but copies from user space (but on MIPS * we have just one address space, so this is identical to the above) diff --git a/include/asm-mips/fcntl.h b/include/asm-mips/fcntl.h index 3606b252a..f67501e17 100644 --- a/include/asm-mips/fcntl.h +++ b/include/asm-mips/fcntl.h @@ -1,3 +1,11 @@ +/* $Id: fcntl.h,v 1.3 1998/08/29 20:41:02 ralf Exp $ + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1995, 1996, 1997, 1998 by Ralf Baechle + */ #ifndef __ASM_MIPS_FCNTL_H #define __ASM_MIPS_FCNTL_H @@ -15,6 +23,8 @@ #define O_EXCL 0x0400 /* not fcntl */ #define O_NOCTTY 0x0800 /* not fcntl */ #define FASYNC 0x1000 /* fcntl, for BSD compatibility */ +#define O_LARGEFILE 0x2000 /* allow large file opens - currently ignored */ +#define O_DIRECT 0x8000 /* direct disk access hint - currently ignored */ #define O_NDELAY O_NONBLOCK @@ -29,6 +39,8 @@ #define F_SETOWN 24 /* for sockets. */ #define F_GETOWN 23 /* for sockets. */ +#define F_SETSIG 10 /* for sockets. */ +#define F_GETSIG 11 /* for sockets. */ /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ diff --git a/include/asm-mips/hardirq.h b/include/asm-mips/hardirq.h index f651556c0..1c282b6e6 100644 --- a/include/asm-mips/hardirq.h +++ b/include/asm-mips/hardirq.h @@ -1,4 +1,4 @@ -/* $Id: hardirq.h,v 1.4 1998/08/20 11:26:19 ralf Exp $ +/* $Id: hardirq.h,v 1.3 1998/08/25 09:21:56 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -28,7 +28,7 @@ extern unsigned int local_irq_count[NR_CPUS]; #define hardirq_enter(cpu) (local_irq_count[cpu]++) #define hardirq_exit(cpu) (local_irq_count[cpu]--) -#define synchronize_irq() do { } while (0) +#define synchronize_irq() barrier(); #else diff --git a/include/asm-mips/jazz.h b/include/asm-mips/jazz.h index 186929f36..1484dab0e 100644 --- a/include/asm-mips/jazz.h +++ b/include/asm-mips/jazz.h @@ -1,4 +1,4 @@ -/* $Id: jazz.h,v 1.7 1998/08/25 09:21:56 ralf Exp $ +/* $Id: jazz.h,v 1.8 1998/08/26 22:12:32 tsbogend Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -199,6 +199,9 @@ typedef struct { /* * JAZZ Interrupt Level definitions + * + * This is somewhat broken. For reasons which nobody can remember anymore + * we remap the Jazz interrupts to the usual ISA style interrupt numbers. */ #define JAZZ_TIMER_IRQ 0 #define JAZZ_KEYBOARD_IRQ 1 diff --git a/include/asm-mips/keyboard.h b/include/asm-mips/keyboard.h index 6923af793..d6cc1fbfc 100644 --- a/include/asm-mips/keyboard.h +++ b/include/asm-mips/keyboard.h @@ -5,7 +5,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * $Id: keyboard.h,v 1.9 1998/08/25 09:21:57 ralf Exp $ + * $Id: keyboard.h,v 1.10 1998/08/26 22:12:32 tsbogend Exp $ */ #ifndef __ASM_MIPS_KEYBOARD_H #define __ASM_MIPS_KEYBOARD_H @@ -51,9 +51,6 @@ void (*keyboard_setup)(void); #ifdef CONFIG_MIPS_JAZZ -/* Not true for Jazz machines, we cheat a bit for 'em. */ -#define KEYBOARD_IRQ 1 - extern int jazz_ps2_request_irq(void); extern void jazz_ps2_free_irq(void); @@ -66,22 +63,15 @@ extern void jazz_ps2_free_irq(void); #define DISABLE_KBD_DURING_INTERRUPTS 1 -#define KEYBOARD_IRQ 20 - /* * Machine specific bits for the PS/2 driver. * Aux device and keyboard share the interrupt on the Indy. */ - #define ps2_request_irq() 0 #define ps2_free_irq(void) do { } while(0); #endif /* CONFIG_SGI */ -#ifdef CONFIG_COBALT_MICRO_SERVER -#define KEYBOARD_IRQ 1 -#endif - #if defined(CONFIG_ACER_PICA_61) || defined(CONFIG_SNI_RM200_PCI) #define CONF_KEYBOARD_USES_IO_PORTS #endif @@ -93,8 +83,6 @@ extern void jazz_ps2_free_irq(void); */ #include <asm/io.h> -#define KEYBOARD_IRQ 1 - /* * Machine specific bits for the PS/2 driver */ diff --git a/include/asm-mips/linux_logo.h b/include/asm-mips/linux_logo.h index a8bea9930..cf54ec3cf 100644 --- a/include/asm-mips/linux_logo.h +++ b/include/asm-mips/linux_logo.h @@ -1,4 +1,5 @@ -/* $Id: linux_logo.h,v 1.1 1998/08/25 09:21:57 ralf Exp $ +/* $Id: linux_logo.h,v 1.2 1998/08/28 23:23:12 tsbogend Exp $ + * * include/asm-mips/linux_logo.h: This is a linux logo * to be displayed on boot. * diff --git a/include/asm-mips/sgihpc.h b/include/asm-mips/sgihpc.h index fb2063163..34ac62cc2 100644 --- a/include/asm-mips/sgihpc.h +++ b/include/asm-mips/sgihpc.h @@ -1,4 +1,4 @@ -/* $Id: sgihpc.h,v 1.2 1998/06/30 00:23:11 ralf Exp $ +/* $Id: sgihpc.h,v 1.3 1998/07/10 01:14:56 ralf Exp $ * * sgihpc.h: Various HPC I/O controller defines. The HPC is basically * the approximate functional equivalent of the Sun SYSIO @@ -326,6 +326,8 @@ extern struct hpc3_miscregs *hpc3mregs; /* We need software copies of these because they are write only. */ extern unsigned long sgi_hpc_write1, sgi_hpc_write2; +#define SGI_KEYBOARD_IRQ 20 + struct hpc_keyb { #ifdef __MIPSEB__ unsigned char _unused0[3]; diff --git a/include/asm-mips/siginfo.h b/include/asm-mips/siginfo.h index 2cf7fd22e..eca5b65dd 100644 --- a/include/asm-mips/siginfo.h +++ b/include/asm-mips/siginfo.h @@ -1,3 +1,11 @@ +/* $Id: siginfo.h,v 1.4 1998/08/28 16:23:06 ralf Exp $ + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1998 by Ralf Baechle + */ #ifndef __ASM_MIPS_SIGINFO_H #define __ASM_MIPS_SIGINFO_H @@ -84,9 +92,10 @@ typedef struct siginfo { #define SI_USER 0 /* sent by kill, sigsend, raise */ #define SI_KERNEL 0x80 /* sent by the kernel from somewhere */ #define SI_QUEUE -1 /* sent by sigqueue */ -#define SI_TIMER -2 /* sent by timer expiration */ -#define SI_MESGQ -3 /* sent by real time mesq state change */ -#define SI_ASYNCIO -4 /* sent by AIO completion */ +#define SI_ASYNCIO -2 /* sent by AIO completion */ +#define SI_TIMER -3 /* sent by timer expiration */ +#define SI_MESGQ -4 /* sent by real time mesq state change */ +#define SI_SIGIO -5 /* sent by queued SIGIO */ #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) diff --git a/include/asm-mips/sni.h b/include/asm-mips/sni.h index 9ed5919d2..16a4ace09 100644 --- a/include/asm-mips/sni.h +++ b/include/asm-mips/sni.h @@ -1,11 +1,12 @@ -/* +/* $Id: sni.h,v 1.2 1998/09/16 22:52:43 ralf Exp $ + * * SNI specific definitions * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 1997 by Ralf Baechle + * Copyright (C) 1997, 1998 by Ralf Baechle */ #ifndef __ASM_MIPS_SNI_H #define __ASM_MIPS_SNI_H @@ -88,4 +89,9 @@ */ #define PCIMT_EISA_BASE 0xb0000000 +/* + * The keyboard interrupt is an ISA interrupt + */ +#define SNI_KEYBOARD_IRQ 1 + #endif /* __ASM_MIPS_SNI_H */ diff --git a/include/asm-mips/softirq.h b/include/asm-mips/softirq.h index aea9e9528..fa72d0d78 100644 --- a/include/asm-mips/softirq.h +++ b/include/asm-mips/softirq.h @@ -1,13 +1,10 @@ -/* - * include/asm-mips/softirq.h +/* $Id: softirq.h,v 1.3 1998/03/22 23:27:19 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 1997, 1998 by Ralf Baechle - * - * $Id: softirq.h,v 1.4 1998/03/21 11:45:46 ralf Exp $ */ #ifndef __ASM_MIPS_SOFTIRQ_H #define __ASM_MIPS_SOFTIRQ_H @@ -86,6 +83,6 @@ extern inline void end_bh_atomic(void) /* These are for the irq's testing the lock */ #define softirq_trylock(cpu) (local_bh_count[cpu] ? 0 : (local_bh_count[cpu] = 1)) #define softirq_endlock(cpu) (local_bh_count[cpu] = 0) -#define synchronize_bh() do { } while (0) +#define synchronize_bh() barrier() #endif /* __ASM_MIPS_SOFTIRQ_H */ diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 28079fe00..1907a49ac 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h @@ -1,4 +1,4 @@ -/* $Id: unistd.h,v 1.18 1998/08/20 16:34:48 ralf Exp $ +/* $Id: unistd.h,v 1.11 1998/08/25 09:22:03 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -1008,7 +1008,7 @@ #define __NR_lseek (__NR_Linux + 19) #define __NR_getpid (__NR_Linux + 20) #define __NR_mount (__NR_Linux + 21) -#define __NR_oldumount (__NR_Linux + 22) +#define __NR_umount (__NR_Linux + 22) #define __NR_setuid (__NR_Linux + 23) #define __NR_getuid (__NR_Linux + 24) #define __NR_stime (__NR_Linux + 25) @@ -1038,7 +1038,7 @@ #define __NR_geteuid (__NR_Linux + 49) #define __NR_getegid (__NR_Linux + 50) #define __NR_acct (__NR_Linux + 51) -#define __NR_umount (__NR_Linux + 52) +#define __NR_umount2 (__NR_Linux + 52) #define __NR_lock (__NR_Linux + 53) #define __NR_ioctl (__NR_Linux + 54) #define __NR_fcntl (__NR_Linux + 55) @@ -1136,7 +1136,7 @@ #define __NR_cacheflush (__NR_Linux + 147) #define __NR_cachectl (__NR_Linux + 148) #define __NR_sysmips (__NR_Linux + 149) -#define __NR_setup (__NR_Linux + 150) /* used only by init, to get system going */ +#define __NR_unused150 (__NR_Linux + 150) #define __NR_getsid (__NR_Linux + 151) #define __NR_fdatasync (__NR_Linux + 152) #define __NR__sysctl (__NR_Linux + 153) @@ -1421,7 +1421,6 @@ return -1; \ #define __NR__exit __NR_exit static inline _syscall0(int,idle) static inline _syscall0(int,pause) -static inline _syscall1(int,setup,int,magic) static inline _syscall0(int,sync) static inline _syscall0(pid_t,setsid) static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) diff --git a/include/asm-ppc/fcntl.h b/include/asm-ppc/fcntl.h index 61d0fa703..773e6a252 100644 --- a/include/asm-ppc/fcntl.h +++ b/include/asm-ppc/fcntl.h @@ -28,6 +28,8 @@ #define F_SETOWN 8 /* for sockets. */ #define F_GETOWN 9 /* for sockets. */ +#define F_SETSIG 10 /* for sockets. */ +#define F_GETSIG 11 /* for sockets. */ /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ diff --git a/include/asm-ppc/ide.h b/include/asm-ppc/ide.h index e7aad0504..52576cf15 100644 --- a/include/asm-ppc/ide.h +++ b/include/asm-ppc/ide.h @@ -95,8 +95,6 @@ static __inline__ int ide_default_irq(ide_ioreg_t base) static __inline__ ide_ioreg_t ide_default_io_base(int index) { if (_machine == _MACH_Pmac) { - if (!pmac_ide_ports_known) - pmac_ide_probe(); return pmac_ide_regbase[index]; } if (_machine == _MACH_mbx) return index; diff --git a/include/asm-ppc/siginfo.h b/include/asm-ppc/siginfo.h index 0ead0b84e..c3a46ceff 100644 --- a/include/asm-ppc/siginfo.h +++ b/include/asm-ppc/siginfo.h @@ -87,6 +87,7 @@ typedef struct siginfo { #define SI_TIMER -2 /* sent by timer expiration */ #define SI_MESGQ -3 /* sent by real time mesq state change */ #define SI_ASYNCIO -4 /* sent by AIO completion */ +#define SI_SIGIO -5 /* sent by queued SIGIO */ #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) diff --git a/include/asm-ppc/uaccess.h b/include/asm-ppc/uaccess.h index df3d3d591..65ca165b7 100644 --- a/include/asm-ppc/uaccess.h +++ b/include/asm-ppc/uaccess.h @@ -211,9 +211,12 @@ extern int __copy_tofrom_user(void *to, const void *from, unsigned long size); extern inline unsigned long copy_from_user(void *to, const void *from, unsigned long n) { - if (access_ok(VERIFY_READ, from, n)) - return __copy_tofrom_user(to, from, n); - return n? -EFAULT: 0; + unsigned long res = n; + if (access_ok(VERIFY_READ, from, n)) { + res = __copy_tofrom_user(to, from, n); + if (res) memset((char *)to + n - res, 0, res); + } + return res; } extern inline unsigned long @@ -221,7 +224,7 @@ copy_to_user(void *to, const void *from, unsigned long n) { if (access_ok(VERIFY_WRITE, to, n)) return __copy_tofrom_user(to, from, n); - return n? -EFAULT: 0; + return n; } #define __copy_from_user(to, from, size) \ diff --git a/include/asm-sparc/fcntl.h b/include/asm-sparc/fcntl.h index 5e4a68af6..775a800d4 100644 --- a/include/asm-sparc/fcntl.h +++ b/include/asm-sparc/fcntl.h @@ -28,6 +28,8 @@ #define F_GETLK 7 #define F_SETLK 8 #define F_SETLKW 9 +#define F_SETSIG 10 /* for sockets. */ +#define F_GETSIG 11 /* for sockets. */ /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ diff --git a/include/asm-sparc/siginfo.h b/include/asm-sparc/siginfo.h index 0509aa1b3..0a666b4e2 100644 --- a/include/asm-sparc/siginfo.h +++ b/include/asm-sparc/siginfo.h @@ -91,6 +91,7 @@ typedef struct siginfo { #define SI_TIMER -2 /* sent by timer expiration */ #define SI_MESGQ -3 /* sent by real time mesq state change */ #define SI_ASYNCIO -4 /* sent by AIO completion */ +#define SI_SIGIO -5 /* sent by queued SIGIO */ #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) diff --git a/include/asm-sparc/uaccess.h b/include/asm-sparc/uaccess.h index 638e234a0..3f4a58601 100644 --- a/include/asm-sparc/uaccess.h +++ b/include/asm-sparc/uaccess.h @@ -318,11 +318,14 @@ if (__copy_to_user(to,from,n)) \ }) #define copy_from_user(to,from,n) ({ \ +void *__copy_to = (void *) (to); \ void *__copy_from = (void *) (from); \ __kernel_size_t __copy_size = (__kernel_size_t) (n); \ __kernel_size_t __copy_res; \ if(__copy_size && __access_ok((unsigned long)__copy_from, __copy_size)) { \ -__copy_res = __copy_user((void *) (to), __copy_from, __copy_size); \ +__copy_res = __copy_user(__copy_to, __copy_from, __copy_size); \ +if(__copy_res) \ +memset((char *)__copy_to + __copy_size - __copy_res, 0, __copy_res); \ } else __copy_res = __copy_size; \ __copy_res; }) diff --git a/include/asm-sparc64/fcntl.h b/include/asm-sparc64/fcntl.h index 33044df82..1db734bed 100644 --- a/include/asm-sparc64/fcntl.h +++ b/include/asm-sparc64/fcntl.h @@ -28,6 +28,8 @@ #define F_GETLK 7 #define F_SETLK 8 #define F_SETLKW 9 +#define F_SETSIG 10 /* for sockets. */ +#define F_GETSIG 11 /* for sockets. */ /* for F_[GET|SET]FL */ #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ diff --git a/include/asm-sparc64/siginfo.h b/include/asm-sparc64/siginfo.h index ff2534c66..b3ccd57a9 100644 --- a/include/asm-sparc64/siginfo.h +++ b/include/asm-sparc64/siginfo.h @@ -150,6 +150,7 @@ typedef struct siginfo32 { #define SI_TIMER -2 /* sent by timer expiration */ #define SI_MESGQ -3 /* sent by real time mesq state change */ #define SI_ASYNCIO -4 /* sent by AIO completion */ +#define SI_SIGIO -5 /* sent by queued SIGIO */ #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) diff --git a/include/linux/adfs_fs_fs.h b/include/linux/adfs_fs_fs.h deleted file mode 100644 index 7fff6be19..000000000 --- a/include/linux/adfs_fs_fs.h +++ /dev/null @@ -1,177 +0,0 @@ -#ifndef _ADFS_FS_H -#define _ADFS_FS_H - -#include <linux/types.h> -/* - * Structures of data on the disk - */ - -/* - * Disc Record at disc address 0xc00 - */ -struct adfs_discrecord { - unsigned char log2secsize; - unsigned char secspertrack; - unsigned char heads; - unsigned char density; - unsigned char idlen; - unsigned char log2bpmb; - unsigned char skew; - unsigned char bootoption; - unsigned char lowsector; - unsigned char nzones; - unsigned short zone_spare; - unsigned long root; - unsigned long disc_size; - unsigned short disc_id; - unsigned char disc_name[10]; - unsigned long disc_type; - unsigned long disc_size_high; - unsigned char log2sharesize:4; - unsigned char unused:4; - unsigned char big_flag:1; -}; - -#define ADFS_DISCRECORD (0xc00) -#define ADFS_DR_OFFSET (0x1c0) -#define ADFS_DR_SIZE 60 -#define ADFS_SUPER_MAGIC 0xadf5 -#define ADFS_FREE_FRAG 0 -#define ADFS_BAD_FRAG 1 -#define ADFS_ROOT_FRAG 2 - -/* - * Directory header - */ -struct adfs_dirheader { - unsigned char startmasseq; - unsigned char startname[4]; -}; - -#define ADFS_NEWDIR_SIZE 2048 -#define ADFS_OLDDIR_SIZE 1024 -#define ADFS_NUM_DIR_ENTRIES 77 - -/* - * Directory entries - */ -struct adfs_direntry { - char dirobname[10]; -#define ADFS_NAME_LEN 10 - __u8 dirload[4]; - __u8 direxec[4]; - __u8 dirlen[4]; - __u8 dirinddiscadd[3]; - __u8 newdiratts; -#define ADFS_NDA_OWNER_READ (1 << 0) -#define ADFS_NDA_OWNER_WRITE (1 << 1) -#define ADFS_NDA_LOCKED (1 << 2) -#define ADFS_NDA_DIRECTORY (1 << 3) -#define ADFS_NDA_EXECUTE (1 << 4) -#define ADFS_NDA_PUBLIC_READ (1 << 5) -#define ADFS_NDA_PUBLIC_WRITE (1 << 6) -}; - -#define ADFS_MAX_NAME_LEN 255 -struct adfs_idir_entry { - __u32 inode_no; /* Address */ - __u32 file_id; /* file id */ - __u32 name_len; /* name length */ - __u32 size; /* size */ - __u32 mtime; /* modification time */ - __u32 filetype; /* RiscOS file type */ - __u8 mode; /* internal mode */ - char name[ADFS_MAX_NAME_LEN]; /* file name */ -}; - -/* - * Directory tail - */ -union adfs_dirtail { - struct { - unsigned char dirlastmask; - char dirname[10]; - unsigned char dirparent[3]; - char dirtitle[19]; - unsigned char reserved[14]; - unsigned char endmasseq; - unsigned char endname[4]; - unsigned char dircheckbyte; - } old; - struct { - unsigned char dirlastmask; - unsigned char reserved[2]; - unsigned char dirparent[3]; - char dirtitle[19]; - char dirname[10]; - unsigned char endmasseq; - unsigned char endname[4]; - unsigned char dircheckbyte; - } new; -}; - -#ifdef __KERNEL__ -/* - * Calculate the boot block checksum on an ADFS drive. Note that this will - * appear to be correct if the sector contains all zeros, so also check that - * the disk size is non-zero!!! - */ -extern inline int adfs_checkbblk (unsigned char *ptr) -{ - unsigned int result = 0; - unsigned char *p = ptr + 511; - - do { - result = (result & 0xff) + (result >> 8); - result = result + *--p; - } while (p != ptr); - - return (result & 0xff) != ptr[511]; -} - -/* dir.c */ -extern unsigned int adfs_val (unsigned char *p, int len); -extern int adfs_dir_read_parent (struct inode *inode, struct buffer_head **bhp); -extern int adfs_dir_read (struct inode *inode, struct buffer_head **bhp); -extern int adfs_dir_check (struct inode *inode, struct buffer_head **bhp, - int buffers, union adfs_dirtail *dtp); -extern void adfs_dir_free (struct buffer_head **bhp, int buffers); -extern int adfs_dir_get (struct super_block *sb, struct buffer_head **bhp, - int buffers, int pos, unsigned long parent_object_id, - struct adfs_idir_entry *ide); -extern int adfs_dir_find_entry (struct super_block *sb, struct buffer_head **bhp, - int buffers, unsigned int index, - struct adfs_idir_entry *ide); - -/* inode.c */ -extern int adfs_inode_validate (struct inode *inode); -extern unsigned long adfs_inode_generate (unsigned long parent_id, int diridx); -extern unsigned long adfs_inode_objid (struct inode *inode); -extern unsigned int adfs_parent_bmap (struct inode *inode, int block); -extern int adfs_bmap (struct inode *inode, int block); -extern void adfs_read_inode (struct inode *inode); - -/* map.c */ -extern int adfs_map_lookup (struct super_block *sb, int frag_id, int offset); - -/* namei.c */ -extern int adfs_lookup (struct inode * dir, const char * name, int len, - struct inode ** result); - -/* super.c */ -extern int init_adfs_fs (void); -extern void adfs_error (struct super_block *, const char *, const char *, ...); - -/* - * Inodes and file operations - */ - -/* dir.c */ -extern struct inode_operations adfs_dir_inode_operations; - -/* file.c */ -extern struct inode_operations adfs_file_inode_operations; -#endif - -#endif - diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h index 5200dc1ad..8fae0f0ef 100644 --- a/include/linux/byteorder/generic.h +++ b/include/linux/byteorder/generic.h @@ -5,18 +5,18 @@ * linux/byteorder_generic.h * Generic Byte-reordering support * - * Francois-Rene Rideau <rideau@ens.fr> 19970707 + * Francois-Rene Rideau <fare@tunes.org> 19970707 * gathered all the good ideas from all asm-foo/byteorder.h into one file, * cleaned them up. * I hope it is compliant with non-GCC compilers. * I decided to put __BYTEORDER_HAS_U64__ in byteorder.h, * because I wasn't sure it would be ok to put it in types.h * Upgraded it to 2.1.43 - * Francois-Rene Rideau <rideau@ens.fr> 19971012 + * Francois-Rene Rideau <fare@tunes.org> 19971012 * Upgraded it to 2.1.57 * to please Linus T., replaced huge #ifdef's between little/big endian * by nestedly #include'd files. - * Francois-Rene Rideau <rideau@ens.fr> 19971205 + * Francois-Rene Rideau <fare@tunes.org> 19971205 * Made it to 2.1.71; now a facelift: * Put files under include/linux/byteorder/ * Split swab from generic support. @@ -31,6 +31,11 @@ * nybble swapping support... * = every architecture could add their byteswap macro in asm/byteorder.h * see how some architectures already do (i386, alpha, ppc, etc) + * = cpu_to_beXX and beXX_to_cpu might some day need to be well + * distinguished throughout the kernel. This is not the case currently, + * since little endian, big endian, and pdp endian machines needn't it. + * But this might be the case for, say, a port of Linux to 20/21 bit + * architectures (and F21 Linux addict around?). */ /* diff --git a/include/linux/byteorder/swab.h b/include/linux/byteorder/swab.h index 7c1f5c985..813df46c3 100644 --- a/include/linux/byteorder/swab.h +++ b/include/linux/byteorder/swab.h @@ -6,7 +6,7 @@ * Byte-swapping, independently from CPU endianness * swabXX[ps]?(foo) * - * Francois-Rene Rideau <rideau@ens.fr> 19971205 + * Francois-Rene Rideau <fare@tunes.org> 19971205 * separated swab functions from cpu_to_XX, * to clean up support for bizarre-endian architectures. * @@ -15,10 +15,13 @@ * */ +/* casts are necessary for constants, because we never know how for sure + * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way. + */ #define ___swab16(x) \ ((__u16)( \ - (((__u16)(x) & 0x00ffU) << 8) | \ - (((__u16)(x) & 0xff00U) >> 8) )) + (((__u16)(x) & (__u16)0x00ffU) << 8) | \ + (((__u16)(x) & (__u16)0xff00U) >> 8) )) #define ___swab32(x) \ ((__u32)( \ (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h index 22407afdf..782db2e8e 100644 --- a/include/linux/byteorder/swabb.h +++ b/include/linux/byteorder/swabb.h @@ -8,8 +8,8 @@ * * Support for obNUXIous pdp-endian and other bizarre architectures. * Will Linux ever run on such ancient beasts? if not, this file - * will be but a programming pearl. Still, it's a reminder that - * cpu_to_beXX and beXX_to_cpu should be well distinguished. + * will be but a programming pearl. Still, it's a reminder that we + * shouldn't be making too many assumptions when trying to be portable. * */ diff --git a/include/linux/coda.h b/include/linux/coda.h index 9cdf0d04b..564b3933b 100644 --- a/include/linux/coda.h +++ b/include/linux/coda.h @@ -72,6 +72,7 @@ struct timespec { #define C_O_WRITE 0x002 #define C_O_TRUNC 0x010 #define C_O_EXCL 0x100 +#define C_O_CREAT 0x200 /* these are to find mode bits in Venus */ #define C_M_READ 00400 @@ -80,6 +81,7 @@ struct timespec { /* for access Venus will use */ #define C_A_R_OK 4 /* Test for read permission. */ #define C_A_W_OK 2 /* Test for write permission. */ +#define C_A_C_OK 8 /* Test for writing upon create. */ #define C_A_X_OK 1 /* Test for execute permission. */ #define C_A_F_OK 0 /* Test for existence. */ @@ -148,8 +150,8 @@ static inline ino_t coda_f2i(struct ViceFid *fid) #ifndef _VUID_T_ #define _VUID_T_ -typedef unsigned int vuid_t; -typedef unsigned int vgid_t; +typedef u_int32_t vuid_t; +typedef u_int32_t vgid_t; #endif /*_VUID_T_ */ #ifndef _CODACRED_T_ diff --git a/include/linux/coda_fs_i.h b/include/linux/coda_fs_i.h index d312013d5..83980b26e 100644 --- a/include/linux/coda_fs_i.h +++ b/include/linux/coda_fs_i.h @@ -43,7 +43,7 @@ struct coda_inode_info { int coda_cnode_make(struct inode **, struct ViceFid *, struct super_block *); int coda_cnode_makectl(struct inode **inode, struct super_block *sb); struct inode *coda_fid_to_inode(ViceFid *fid, struct super_block *sb); - +void coda_replace_fid(struct inode *, ViceFid *, ViceFid *); #endif #endif diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h index e867226ec..98407f73b 100644 --- a/include/linux/coda_linux.h +++ b/include/linux/coda_linux.h @@ -51,7 +51,6 @@ int coda_fid_is_volroot(struct ViceFid *); int coda_fid_is_weird(struct ViceFid *fid); int coda_iscontrol(const char *name, size_t length); - void coda_load_creds(struct coda_cred *cred); int coda_mycred(struct coda_cred *); void coda_vattr_to_iattr(struct inode *, struct coda_vattr *); @@ -71,6 +70,11 @@ int coda_inode_grab(dev_t dev, ino_t ino, struct inode **ind); #define NB_SFS_SIZ 0x895440 +/* cache.c */ +void coda_purge_children(struct inode *); +void coda_purge_dentries(struct inode *); + + /* debugging masks */ #define D_SUPER 1 /* print results returned by Venus */ #define D_INODE 2 /* print entry and exit into procedure */ diff --git a/include/linux/cyclades.h b/include/linux/cyclades.h index 024104c31..e7c8a38f0 100644 --- a/include/linux/cyclades.h +++ b/include/linux/cyclades.h @@ -754,6 +754,13 @@ struct cyclades_port { #define CyTBPR (0x72*2) #define CyTCOR (0x76*2) +/* Custom Registers */ + +#define CyPLX_VER (0x3400) +#define PLX_9050 0x11 +#define PLX_9060 0x12 +#define PLX_9080 0x13 + /***************************************************************************/ #endif /* __KERNEL__ */ diff --git a/include/linux/file.h b/include/linux/file.h index fe7ca60c9..0884fad2f 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -5,7 +5,7 @@ #ifndef __LINUX_FILE_H #define __LINUX_FILE_H -extern int __fput(struct file *); +extern void __fput(struct file *); extern void insert_file_free(struct file *file); /* @@ -58,20 +58,18 @@ extern inline void remove_filp(struct file *file) *file->f_pprev = file->f_next; } -extern inline int fput(struct file *file) +extern inline void fput(struct file *file) { int count = file->f_count-1; - int error = 0; if (!count) { locks_remove_flock(file); - error = __fput(file); + __fput(file); file->f_count = 0; remove_filp(file); insert_file_free(file); } else file->f_count = count; - return error; } extern inline void put_filp(struct file *file) diff --git a/include/linux/fs.h b/include/linux/fs.h index 69fa35c3c..8a2b4478f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -39,16 +39,17 @@ struct poll_table_struct; #undef NR_OPEN #define NR_OPEN 1024 -#define NR_SUPER 64 #define BLOCK_SIZE_BITS 10 #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS) /* And dynamically-tunable limits and defaults: */ extern int max_inodes; extern int max_files, nr_files, nr_free_files; +extern int max_super_blocks, nr_super_blocks; #define NR_FILE 4096 /* this can well be larger on a larger system */ #define NR_RESERVED_FILES 10 /* reserved for root */ +#define NR_SUPER 256 #define MAY_EXEC 1 #define MAY_WRITE 2 @@ -271,6 +272,7 @@ static inline int buffer_protected(struct buffer_head * bh) #include <linux/smb_fs_i.h> #include <linux/hfs_fs_i.h> #include <linux/adfs_fs_i.h> +#include <linux/qnx4_fs_i.h> #include <linux/efs_fs_i.h> /* @@ -381,6 +383,7 @@ struct inode { struct smb_inode_info smbfs_i; struct hfs_inode_info hfs_i; struct adfs_inode_info adfs_i; + struct qnx4_inode_info qnx4_i; struct efs_inode_info efs_i; struct socket socket_i; void *generic_ip; @@ -402,6 +405,7 @@ static inline void mark_inode_dirty(struct inode *inode) struct fown_struct { int pid; /* pid or -pgrp where SIGIO should be sent */ uid_t uid, euid; /* uid/euid of process setting the owner */ + int signum; /* posix.1b rt signal to be delivered on IO */ }; struct file { @@ -511,13 +515,14 @@ extern inline int locks_verify_area(int read_write, struct inode *inode, struct fasync_struct { int magic; + int fa_fd; struct fasync_struct *fa_next; /* singly linked list */ struct file *fa_file; }; #define FASYNC_MAGIC 0x4601 -extern int fasync_helper(struct file *, int, struct fasync_struct **); +extern int fasync_helper(int, struct file *, int, struct fasync_struct **); #include <linux/minix_fs_sb.h> #include <linux/ext2_fs_sb.h> @@ -534,8 +539,13 @@ extern int fasync_helper(struct file *, int, struct fasync_struct **); #include <linux/smb_fs_sb.h> #include <linux/hfs_fs_sb.h> #include <linux/adfs_fs_sb.h> +#include <linux/qnx4_fs_sb.h> +extern struct list_head super_blocks; + +#define sb_entry(list) list_entry((list), struct super_block, s_list) struct super_block { + struct list_head s_list; /* Keep this first */ kdev_t s_dev; unsigned long s_blocksize; unsigned char s_blocksize_bits; @@ -572,6 +582,7 @@ struct super_block { struct smb_sb_info smbfs_sb; struct hfs_sb_info hfs_sb; struct adfs_sb_info adfs_sb; + struct qnx4_sb_info qnx4_sb; void *generic_sbp; } u; }; @@ -593,9 +604,10 @@ struct file_operations { int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); int (*mmap) (struct file *, struct vm_area_struct *); int (*open) (struct inode *, struct file *); + int (*flush) (struct file *); int (*release) (struct inode *, struct file *); int (*fsync) (struct file *, struct dentry *); - int (*fasync) (struct file *, int); + int (*fasync) (int, struct file *, int); int (*check_media_change) (kdev_t dev); int (*revalidate) (kdev_t dev); int (*lock) (struct file *, int, struct file_lock *); @@ -667,7 +679,6 @@ asmlinkage int sys_close(unsigned int); /* yes, it's really unsigned */ extern int do_truncate(struct dentry *, unsigned long); extern int get_unused_fd(void); extern void put_unused_fd(unsigned int); -extern int __fput(struct file *); extern int close_fp(struct file *, fl_owner_t id); extern char * getname(const char * filename); @@ -708,7 +719,6 @@ extern int fs_may_remount_ro(struct super_block *); extern int fs_may_mount(kdev_t dev); extern struct file *inuse_filps; -extern struct super_block super_blocks[NR_SUPER]; extern void refile_buffer(struct buffer_head * buf); extern void set_writetime(struct buffer_head * buf, int flag); diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 868f490cb..fe89b7e7a 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -53,7 +53,7 @@ struct partition { unsigned char end_cyl; /* end cylinder */ unsigned int start_sect; /* starting sector counting from 0 */ unsigned int nr_sects; /* nr of sectors in partition */ -}; +} __attribute__((packed)); struct hd_struct { long start_sect; diff --git a/include/linux/head.h b/include/linux/head.h deleted file mode 100644 index e4e99b31d..000000000 --- a/include/linux/head.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _LINUX_HEAD_H -#define _LINUX_HEAD_H - -struct desc_struct { - unsigned long a,b; -}; - -extern struct desc_struct idt_table[],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)) - -#define GDT_NUL 0 -#define GDT_CODE 1 -#define GDT_DATA 2 -#define GDT_TMP 3 - -#define LDT_NUL 0 -#define LDT_CODE 1 -#define LDT_DATA 2 - -#endif diff --git a/include/linux/if.h b/include/linux/if.h index 87b6692c8..a5fdf3aed 100644 --- a/include/linux/if.h +++ b/include/linux/if.h @@ -114,6 +114,7 @@ struct ifreq int ifru_mtu; struct ifmap ifru_map; char ifru_slave[IFNAMSIZ]; /* Just fits the size */ + char ifru_newname[IFNAMSIZ]; __kernel_caddr_t ifru_data; } ifr_ifru; }; @@ -133,6 +134,7 @@ struct ifreq #define ifr_ifindex ifr_ifru.ifru_ivalue /* interface index */ #define ifr_bandwidth ifr_ifru.ifru_ivalue /* link bandwidth */ #define ifr_qlen ifr_ifru.ifru_ivalue /* Queue length */ +#define ifr_newname ifr_ifru.ifru_newname /* New name */ /* * Structure used in SIOCGIFCONF request. diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h index 3bdeca342..ad5655cf1 100644 --- a/include/linux/if_packet.h +++ b/include/linux/if_packet.h @@ -25,9 +25,10 @@ struct sockaddr_ll #define PACKET_BROADCAST 1 /* To all */ #define PACKET_MULTICAST 2 /* To group */ #define PACKET_OTHERHOST 3 /* To someone else */ -#define PACKET_OUTGOING 4 /* Originated by us */ -#define PACKET_LOOPBACK 5 -#define PACKET_FASTROUTE 6 +#define PACKET_OUTGOING 4 /* Outgoing of any type */ +/* These ones are invisible by user level */ +#define PACKET_LOOPBACK 5 /* MC/BRD frame looped back */ +#define PACKET_FASTROUTE 6 /* Fastrouted frame */ /* Packet socket options */ diff --git a/include/linux/in6.h b/include/linux/in6.h index 37f0e066d..b63918419 100644 --- a/include/linux/in6.h +++ b/include/linux/in6.h @@ -35,8 +35,15 @@ struct in6_addr __u16 u6_addr16[8]; __u32 u6_addr32[4]; #if (~0UL) > 0xffffffff +#ifndef __RELAX_IN6_ADDR_ALIGNMENT + /* Alas, protocols do not respect 64bit alignmnet. + rsvp/pim/... are broken. However, it is good + idea to force correct alignment always, when + it is possible. + */ __u64 u6_addr64[2]; #endif +#endif } in6_u; #define s6_addr in6_u.u6_addr8 #define s6_addr16 in6_u.u6_addr16 @@ -101,19 +108,34 @@ struct ipv6_mreq { #define IPPROTO_DSTOPTS 60 /* IPv6 destination options */ /* + * IPv6 TLV options. + */ +#define IPV6_TLV_PAD0 0 +#define IPV6_TLV_PADN 1 +#define IPV6_TLV_ROUTERALERT 20 +#define IPV6_TLV_JUMBO 194 + +/* * IPV6 socket options */ #define IPV6_ADDRFORM 1 #define IPV6_PKTINFO 2 -#define IPV6_RXHOPOPTS 3 /* obsolete name */ -#define IPV6_RXDSTOPTS 4 /* obsolete name */ -#define IPV6_HOPOPTS IPV6_RXHOPOPTS /* new name */ -#define IPV6_DSTOPTS IPV6_RXDSTOPTS /* new name */ -#define IPV6_RXSRCRT 5 +#define IPV6_HOPOPTS 3 +#define IPV6_DSTOPTS 4 +#define IPV6_RTHDR 5 #define IPV6_PKTOPTIONS 6 #define IPV6_CHECKSUM 7 #define IPV6_HOPLIMIT 8 +#define IPV6_NEXTHOP 9 +#define IPV6_AUTHHDR 10 + +#if 0 +/* Aliases for obsolete names */ +#define IPV6_RXHOPOPTS IPV6_HOPOPTS +#define IPV6_RXDSTOPTS IPV6_DSTOPTS +#define IPV6_RXSRCRT IPV6_RTHDR +#endif /* * Alternative names diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 391352418..84564bae7 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -4,6 +4,9 @@ #include <linux/in6.h> #include <asm/byteorder.h> +/* The latest drafts declared increase in minimal mtu up to 1280. */ + +#define IPV6_MIN_MTU 1280 /* * Advanced API @@ -58,8 +61,6 @@ struct ipv6_opt_hdr { #define ipv6_optlen(p) (((p)->hdrlen+1) << 3) #endif - - /* * routing header type 0 (used in cmsghdr struct) */ @@ -72,10 +73,11 @@ struct rt0_hdr { #define rt0_type rt_hdr.type; }; -#ifdef __KERNEL__ - /* * IPv6 fixed header + * + * BEWARE, it is incorrect. The first 4 bits of flow_lbl + * are glued to priority now, forming "class". */ struct ipv6hdr { @@ -87,7 +89,7 @@ struct ipv6hdr { priority:4; #else #error "Please fix <asm/byteorder.h>" -#endif +#endif __u8 flow_lbl[3]; __u16 payload_len; @@ -98,28 +100,24 @@ struct ipv6hdr { struct in6_addr daddr; }; -/* - * The length of this struct cannot be greater than the length of - * the proto_priv field in a sk_buff which is currently - * defined to be 16 bytes. - * Pointers take upto 8 bytes (sizeof(void *) is 8 on the alpha). - */ -struct ipv6_options -{ - /* length of extension headers */ - - __u16 opt_flen; /* after fragment hdr */ - __u16 opt_nflen; /* before fragment hdr */ +#ifdef __KERNEL__ - /* - * protocol options - * usually carried in IPv6 extension headers - */ +/* + This structure contains results of exthdrs parsing + as offsets from skb->nh. + */ - struct ipv6_rt_hdr *srcrt; /* Routing Header */ +struct inet6_skb_parm +{ + int iif; + __u16 ra; + __u16 hop; + __u16 auth; + __u16 dst0; + __u16 srcrt; + __u16 dst1; }; - #endif #endif diff --git a/include/linux/ipv6_route.h b/include/linux/ipv6_route.h index 7fc11c7ce..a4861d053 100644 --- a/include/linux/ipv6_route.h +++ b/include/linux/ipv6_route.h @@ -26,7 +26,6 @@ enum #define RTF_ALLONLINK 0x00020000 /* fallback, no routers on link */ #define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ -#define RTF_LINKRT 0x00100000 /* link specific - device match */ #define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */ #define RTF_EXPIRES 0x00400000 diff --git a/include/linux/iso_fs_sb.h b/include/linux/iso_fs_sb.h index 879f8faf3..7bb55a504 100644 --- a/include/linux/iso_fs_sb.h +++ b/include/linux/iso_fs_sb.h @@ -16,7 +16,6 @@ struct isofs_sb_info { unsigned char s_rock; unsigned char s_joliet_level; unsigned char s_utf8; - unsigned char s_name_check; /* r = relaxed, s = strict */ unsigned char s_cruft; /* Broken disks with high byte of length containing junk */ diff --git a/include/linux/kbd_ll.h b/include/linux/kbd_ll.h index d83f9ea8a..26a30c12a 100644 --- a/include/linux/kbd_ll.h +++ b/include/linux/kbd_ll.h @@ -9,4 +9,9 @@ extern struct pt_regs *kbd_pt_regs; void handle_scancode(unsigned char scancode); +/* + * Interface for to the host specific interupt setup code + */ +void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs); + #endif /* _KBD_LL_H */ diff --git a/include/linux/nbd.h b/include/linux/nbd.h index c2f2a4e08..0b3114431 100644 --- a/include/linux/nbd.h +++ b/include/linux/nbd.h @@ -12,6 +12,7 @@ #ifdef MAJOR_NR #include <linux/locks.h> +#include <asm/semaphore.h> #define LOCAL_END_REQUEST @@ -42,11 +43,13 @@ struct nbd_device { int harderror; /* Code of hard error */ #define NBD_READ_ONLY 0x0001 #define NBD_WRITE_NOCHK 0x0002 +#define NBD_INITIALISED 0x0004 struct socket * sock; struct file * file; /* If == NULL, device is not ready, yet */ int magic; /* FIXME: not if debugging is off */ struct request *head; /* Requests are added here... */ struct request *tail; + struct semaphore queue_lock; }; /* This now IS in some kind of include file... */ diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c42e43d9d..41f6405ee 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -232,8 +232,7 @@ struct device unsigned short flags; /* interface flags (a la BSD) */ unsigned short gflags; - unsigned short metric; /* routing metric (not used) */ - unsigned short mtu; /* interface MTU value */ + unsigned mtu; /* interface MTU value */ unsigned short type; /* interface hardware type */ unsigned short hard_header_len; /* hardware hdr length */ void *priv; /* pointer to private data */ diff --git a/include/linux/netlink.h b/include/linux/netlink.h index bd4f9dd9b..59075b070 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -16,8 +16,8 @@ struct sockaddr_nl { sa_family_t nl_family; /* AF_NETLINK */ unsigned short nl_pad; /* zero */ - __kernel_pid_t nl_pid; /* process pid */ - unsigned nl_groups; /* multicast groups mask */ + __u32 nl_pid; /* process pid */ + __u32 nl_groups; /* multicast groups mask */ }; struct nlmsghdr @@ -26,7 +26,7 @@ struct nlmsghdr __u16 nlmsg_type; /* Message content */ __u16 nlmsg_flags; /* Additional flags */ __u32 nlmsg_seq; /* Sequence number */ - __kernel_pid_t nlmsg_pid; /* Sending process PID */ + __u32 nlmsg_pid; /* Sending process PID */ }; /* Flags values */ @@ -64,7 +64,7 @@ struct nlmsghdr #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len))) -#define NLMSG_OK(nlh,len) ((nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ +#define NLMSG_OK(nlh,len) ((len) > 0 && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ (nlh)->nlmsg_len <= (len)) #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) @@ -86,10 +86,11 @@ struct nlmsgerr struct netlink_skb_parms { struct ucred creds; /* Skb credentials */ - pid_t pid; - unsigned groups; - pid_t dst_pid; - unsigned dst_groups; + __u32 pid; + __u32 groups; + __u32 dst_pid; + __u32 dst_groups; + kernel_cap_t eff_cap; }; #define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb)) @@ -102,10 +103,10 @@ extern int netlink_post(int unit, struct sk_buff *skb); extern int init_netlink(void); extern struct sock *netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len)); extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err); -extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, pid_t pid, int nonblock); -extern void netlink_broadcast(struct sock *ssk, struct sk_buff *skb, pid_t pid, - unsigned group, int allocation); -extern void netlink_set_err(struct sock *ssk, pid_t pid, unsigned group, int code); +extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock); +extern void netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid, + __u32 group, int allocation); +extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code); /* * skb should fit one page. This choice is good for headerless malloc. @@ -125,28 +126,8 @@ struct netlink_callback long args[4]; }; -#if 0 - -void* nlmsg_broadcast(struct sock*, unsigned long type, int len, unsigned groups); -struct skb_buff *nlmsg_alloc(unsigned long type, int len, - unsigned long seq, unsigned long pid, int allocation); -void __nlmsg_transmit(struct sock*, int allocation); - -extern __inline__ void nlmsg_release(struct sk_buff *skb) -{ - atomic_dec(skb->users); -} - -extern __inline__ void nlmsg_transmit(struct sk_buff *sk, int allocation) -{ - if (sk->write_queue.qlen) - __nlmsg_transmit(sk, allocation); -} - -#endif - extern __inline__ struct nlmsghdr * -__nlmsg_put(struct sk_buff *skb, pid_t pid, u32 seq, int type, int len) +__nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len) { struct nlmsghdr *nlh; int size = NLMSG_LENGTH(len); diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index d11d8e0c3..e33eaa418 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h @@ -110,9 +110,9 @@ void nfsd_fh_free(void); static __inline__ struct svc_fh * fh_copy(struct svc_fh *dst, struct svc_fh *src) { - if (src->fh_dverified) { + if (src->fh_dverified || src->fh_locked) { struct dentry *dentry = src->fh_dentry; - printk("fh_copy: copying %s/%s, already verified!\n", + printk(KERN_ERR "fh_copy: copying %s/%s, already verified!\n", dentry->d_parent->d_name.name, dentry->d_name.name); } @@ -133,18 +133,24 @@ fh_init(struct svc_fh *fhp) static inline void fh_lock(struct svc_fh *fhp) { - struct inode *inode = fhp->fh_dentry->d_inode; + struct dentry *dentry = fhp->fh_dentry; + struct inode *inode; /* dfprintk(FILEOP, "nfsd: fh_lock(%x/%ld) locked = %d\n", SVCFH_DEV(fhp), SVCFH_INO(fhp), fhp->fh_locked); */ + if (!fhp->fh_dverified) { + printk(KERN_ERR "fh_lock: fh not verified!\n"); + return; + } if (fhp->fh_locked) { printk(KERN_WARNING "fh_lock: %s/%s already locked!\n", - fhp->fh_dentry->d_parent->d_name.name, - fhp->fh_dentry->d_name.name); + dentry->d_parent->d_name.name, dentry->d_name.name); return; } + + inode = dentry->d_inode; down(&inode->i_sem); if (!fhp->fh_pre_mtime) fhp->fh_pre_mtime = inode->i_mtime; @@ -157,8 +163,13 @@ fh_lock(struct svc_fh *fhp) static inline void fh_unlock(struct svc_fh *fhp) { + if (!fhp->fh_dverified) + printk(KERN_ERR "fh_unlock: fh not verified!\n"); + if (fhp->fh_locked) { - struct inode *inode = fhp->fh_dentry->d_inode; + struct dentry *dentry = fhp->fh_dentry; + struct inode *inode = dentry->d_inode; + if (!fhp->fh_post_version) fhp->fh_post_version = inode->i_version; fhp->fh_locked = 0; diff --git a/include/linux/notifier.h b/include/linux/notifier.h index a9842306e..42faceaa0 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h @@ -98,6 +98,7 @@ extern __inline__ int notifier_call_chain(struct notifier_block **n, unsigned lo #define NETDEV_CHANGEMTU 0x0007 #define NETDEV_CHANGEADDR 0x0008 #define NETDEV_GOING_DOWN 0x0009 +#define NETDEV_CHANGENAME 0x000A #define SYS_DOWN 0x0001 /* Notify of system down */ #define SYS_RESTART SYS_DOWN diff --git a/include/linux/pci.h b/include/linux/pci.h index 9217511f7..f2231c90a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1,5 +1,5 @@ /* - * $Id: pci.h,v 1.80 1998/07/21 10:06:40 mj Exp $ + * $Id: pci.h,v 1.84 1998/08/17 23:06:43 cort Exp $ * * PCI defines and function prototypes * Copyright 1994, Drew Eckhardt @@ -381,7 +381,9 @@ #define PCI_DEVICE_ID_IBM_82351 0x0022 #define PCI_DEVICE_ID_IBM_SERVERAID 0x002e #define PCI_DEVICE_ID_IBM_TR_WAKE 0x003e +#define PCI_DEVICE_ID_IBM_MPIC 0x0046 #define PCI_DEVICE_ID_IBM_3780IDSP 0x007d +#define PCI_DEVICE_ID_IBM_MPIC_2 0xffff #define PCI_VENDOR_ID_WD 0x101c #define PCI_DEVICE_ID_WD_7197 0x3296 @@ -599,6 +601,9 @@ #define PCI_DEVICE_ID_DATABOOK_87144 0xb106 #define PCI_VENDOR_ID_PLX 0x10b5 +#define PCI_DEVICE_ID_PLX_9060 0x9060 +#define PCI_DEVICE_ID_PLX_9060ES 0x906E +#define PCI_DEVICE_ID_PLX_9060SD 0x906D #define PCI_DEVICE_ID_PLX_9080 0x9080 #define PCI_VENDOR_ID_MADGE 0x10b6 diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 8cde8f833..7d4badcd0 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -119,7 +119,7 @@ enum net_directory_inos { PROC_NET_AX25_BPQETHER, PROC_NET_IP_MASQ_APP, PROC_NET_RT6, - PROC_NET_RT6_TREE, + PROC_NET_SNMP6, PROC_NET_RT6_STATS, PROC_NET_NDISC, PROC_NET_STRIP_STATUS, diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h new file mode 100644 index 000000000..eb2b3dc08 --- /dev/null +++ b/include/linux/qnx4_fs.h @@ -0,0 +1,123 @@ +/* + * Name : qnx4_fs.h + * Author : Richard Frowijn + * Function : qnx4 global filesystem definitions + * Version : 1.0 + * Last modified : 23-03-1998 + * + * History : 23-03-1998 created + */ +#ifndef _LINUX_QNX4_FS_H +#define _LINUX_QNX4_FS_H + +#include <linux/qnxtypes.h> + +#define QNX4_ROOT_INO 1 + +#define _MAX_XTNTS_PER_XBLK 60 +/* for di_status */ +#define QNX4_FILE_USED 0x01 +#define QNX4_FILE_MODIFIED 0x02 +#define QNX4_FILE_BUSY 0x04 +#define QNX4_FILE_LINK 0x08 +#define QNX4_FILE_INODE 0x10 +#define QNX4_FILE_FSYSCLEAN 0x20 + +#define QNX4_I_MAP_SLOTS 8 +#define QNX4_Z_MAP_SLOTS 64 +#define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */ +#define QNX4_VALID_FS 0x0001 /* Clean fs. */ +#define QNX4_ERROR_FS 0x0002 /* fs has errors. */ +#define QNX4_BLOCK_SIZE 0x200 /* blocksize of 512 bytes */ +#define QNX4_DIR_ENTRY_SIZE 0x040 /* dir entry size */ +#define QNX4_XBLK_ENTRY_SIZE 0x200 /* xblk entry size */ +#define QNX4_INODES_PER_BLOCK 0x08 /* 512 / 64 */ + +/* for filenames */ +#define _SHORT_NAME_MAX 16 +#define QNX4_NAME_MAX 48 + +/* + * This is the original qnx4 inode layout on disk. + */ +struct qnx4_inode_entry { + char di_fname[16]; + off_t di_size; + _xtnt_t di_first_xtnt; + long di_xblk; + time_t di_ftime; + time_t di_mtime; + time_t di_atime; + time_t di_ctime; + _nxtnt_t di_num_xtnts; + mode_t di_mode; + muid_t di_uid; + mgid_t di_gid; + nlink_t di_nlink; + char di_zero[4]; + _ftype_t di_type; + unsigned char di_status; +}; + +struct qnx4_link_info { + char dl_fname[QNX4_NAME_MAX]; + long dl_inode_blk; + unsigned char dl_inode_ndx; + unsigned char dl_spare[10]; + unsigned char dl_status; +}; + +struct qnx4_xblk { + long xblk_next_xblk; + long xblk_prev_xblk; + unsigned char xblk_num_xtnts; + char xblk_spare[3]; + long xblk_num_blocks; + _xtnt_t xblk_xnts[_MAX_XTNTS_PER_XBLK]; + char xblk_signature[8]; + _xtnt_t xblk_first_xtnt; +}; + +struct qnx4_super_block { + struct qnx4_inode_entry RootDir; + struct qnx4_inode_entry Inode; + struct qnx4_inode_entry Boot; + struct qnx4_inode_entry AltBoot; +}; + +#ifdef __KERNEL__ + +#define QNX4_DEBUG 0 + +#if QNX4_DEBUG +#define QNX4DEBUG(X) printk X +#else +#define QNX4DEBUG(X) (void) 0 +#endif + +extern int qnx4_lookup(struct inode *dir, struct dentry *dentry); +extern unsigned long qnx4_count_free_inodes(struct super_block *sb); +extern unsigned long qnx4_count_free_blocks(struct super_block *sb); + +extern struct buffer_head *qnx4_getblk(struct inode *, int, int); +extern struct buffer_head *qnx4_bread(struct inode *, int, int); + +extern int init_qnx4_fs(void); +extern int qnx4_create(struct inode *dir, struct dentry *dentry, int mode); +extern struct inode_operations qnx4_file_inode_operations; +extern struct inode_operations qnx4_dir_inode_operations; +extern struct inode_operations qnx4_symlink_inode_operations; +extern int qnx4_is_free(struct super_block *sb, int block); +extern int qnx4_set_bitmap(struct super_block *sb, int block, int busy); +extern int qnx4_create(struct inode *inode, struct dentry *dentry, int mode); +extern void qnx4_truncate(struct inode *inode); +extern void qnx4_free_inode(struct inode *inode); +extern int qnx4_unlink(struct inode *dir, struct dentry *dentry); +extern int qnx4_rmdir(struct inode *dir, struct dentry *dentry); +extern int qnx4_sync_file(struct file *file, struct dentry *dentry); +extern int qnx4_sync_inode(struct inode *inode); +extern int qnx4_bmap(struct inode *inode, int block); + +#endif /* __KERNEL__ */ + +#endif diff --git a/include/linux/qnx4_fs_i.h b/include/linux/qnx4_fs_i.h new file mode 100644 index 000000000..83d53e529 --- /dev/null +++ b/include/linux/qnx4_fs_i.h @@ -0,0 +1,38 @@ +/* + * Name : qnx4_fs_i.h + * Author : Richard Frowijn + * Function : qnx4 inode definitions + * Version : 1.0 + * Last modified : 25-05-1998 + * + * History : 23-03-1998 created + * + */ +#ifndef _QNX4_FS_I +#define _QNX4_FS_I + +#include <linux/qnxtypes.h> + +/* + * qnx4 fs inode entry + */ +struct qnx4_inode_info { + char i_reserved[16]; /* 16 */ + off_t i_size; /* 4 */ + _xtnt_t i_first_xtnt; /* 8 */ + long i_xblk; /* 4 */ + time_t i_ftime; /* 4 */ + time_t i_mtime; /* 4 */ + time_t i_atime; /* 4 */ + time_t i_ctime; /* 4 */ + _nxtnt_t i_num_xtnts; /* 2 */ + mode_t i_mode; /* 2 */ + muid_t i_uid; /* 2 */ + mgid_t i_gid; /* 2 */ + nlink_t i_nlink; /* 2 */ + char i_zero[4]; /* 4 */ + _ftype_t i_type; /* 1 */ + unsigned char i_status; /* 1 */ +}; + +#endif diff --git a/include/linux/qnx4_fs_sb.h b/include/linux/qnx4_fs_sb.h new file mode 100644 index 000000000..9f28d3cb0 --- /dev/null +++ b/include/linux/qnx4_fs_sb.h @@ -0,0 +1,27 @@ +/* + * Name : qnx4_fs_sb.h + * Author : Richard Frowijn + * Function : qnx4 superblock definitions + * Version : 1.0 + * Last modified : 20-05-1998 + * + * History : 23-03-1998 created + * + */ +#ifndef _QNX4_FS_SB +#define _QNX4_FS_SB + +#include <linux/qnxtypes.h> + +/* + * qnx4 super-block data in memory + */ + +struct qnx4_sb_info { + struct buffer_head *sb_buf; /* superblock buffer */ + struct qnx4_super_block *sb; /* our superblock */ + unsigned int Version; /* may be useful */ + struct qnx4_inode_entry *BitMap; /* useful */ +}; + +#endif diff --git a/include/linux/qnxtypes.h b/include/linux/qnxtypes.h new file mode 100644 index 000000000..054da0d1d --- /dev/null +++ b/include/linux/qnxtypes.h @@ -0,0 +1,28 @@ +/* + * Name : qnxtypes.h + * Author : Richard Frowijn + * Function : standard qnx types + * Version : 1.0 + * Last modified : 22-03-1998 + * + * History : 22-03-1998 created + * + */ + +#ifndef _QNX4TYPES_H +#define _QNX4TYPES_H + +typedef unsigned short _nxtnt_t; +typedef unsigned char _ftype_t; + +typedef struct { + long xtnt_blk; + long xtnt_size; +} _xtnt_t; + +typedef unsigned short muid_t; +typedef unsigned short mgid_t; +typedef unsigned long qnx_off_t; +typedef unsigned short qnx_nlink_t; + +#endif diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 4c8adc508..be607392c 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h @@ -5,7 +5,6 @@ #include <linux/netlink.h> #define RTNL_DEBUG 1 -/* #define CONFIG_RTNL_OLD_IFINFO 1 */ /**** @@ -66,14 +65,14 @@ struct rtattr #define RTA_ALIGNTO 4 #define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) ) -#define RTA_OK(rta,len) ((rta)->rta_len >= sizeof(struct rtattr) && \ +#define RTA_OK(rta,len) ((len) > 0 && (rta)->rta_len >= sizeof(struct rtattr) && \ (rta)->rta_len <= (len)) #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), \ (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) #define RTA_LENGTH(len) (RTA_ALIGN(sizeof(struct rtattr)) + (len)) #define RTA_SPACE(len) RTA_ALIGN(RTA_LENGTH(len)) #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) -#define RTA_PAYLOAD(rta) ((rta)->rta_len - RTA_LENGTH(0)) +#define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0)) @@ -91,18 +90,9 @@ struct rtmsg unsigned char rtm_table; /* Routing table id */ unsigned char rtm_protocol; /* Routing protocol; see below */ -#ifdef CONFIG_RTNL_OLD_IFINFO - unsigned char rtm_nhs; /* Number of nexthops */ -#else unsigned char rtm_scope; /* See below */ -#endif unsigned char rtm_type; /* See below */ -#ifdef CONFIG_RTNL_OLD_IFINFO - unsigned short rtm_optlen; /* Byte length of rtm_opt */ - unsigned char rtm_scope; /* See below */ - unsigned char rtm_whatsit; /* Unused byte */ -#endif unsigned rtm_flags; }; @@ -176,9 +166,6 @@ enum rt_scope_t #define RTM_F_NOTIFY 0x100 /* Notify user of route change */ #define RTM_F_CLONED 0x200 /* This route is cloned */ #define RTM_F_EQUALIZE 0x400 /* Multipath equalizer: NI */ -#ifdef CONFIG_RTNL_OLD_IFINFO -#define RTM_F_NOPMTUDISC 0x800 /* Do not make PMTU discovery */ -#endif /* Reserved table identifiers */ @@ -206,17 +193,10 @@ enum rtattr_type_t RTA_GATEWAY, RTA_PRIORITY, RTA_PREFSRC, -#ifndef CONFIG_RTNL_OLD_IFINFO RTA_METRICS, RTA_MULTIPATH, RTA_PROTOINFO, RTA_FLOW, -#else - RTA_WINDOW, - RTA_RTT, - RTA_MTU, - RTA_IFNAME, -#endif RTA_CACHEINFO }; @@ -253,18 +233,12 @@ struct rtnexthop #define RTNH_ALIGNTO 4 #define RTNH_ALIGN(len) ( ((len)+RTNH_ALIGNTO-1) & ~(RTNH_ALIGNTO-1) ) #define RTNH_OK(rtnh,len) ((rtnh)->rtnh_len >= sizeof(struct rtnexthop) && \ - (rtnh)->rtnh_len <= (len)) + ((int)(rtnh)->rtnh_len) <= (len)) #define RTNH_NEXT(rtnh) ((struct rtnexthop*)(((char*)(rtnh)) + RTNH_ALIGN((rtnh)->rtnh_len))) #define RTNH_LENGTH(len) (RTNH_ALIGN(sizeof(struct rtnexthop)) + (len)) #define RTNH_SPACE(len) RTNH_ALIGN(RTNH_LENGTH(len)) #define RTNH_DATA(rtnh) ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0))) -#ifdef CONFIG_RTNL_OLD_IFINFO -#define RTM_RTNH(r) ((struct rtnexthop*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtmsg)) \ - + NLMSG_ALIGN((r)->rtm_optlen))) -#define RTM_NHLEN(nlh,r) ((nlh)->nlmsg_len - NLMSG_SPACE(sizeof(struct rtmsg)) - NLMSG_ALIGN((r)->rtm_optlen)) -#endif - /* RTM_CACHEINFO */ struct rta_cacheinfo @@ -424,35 +398,6 @@ struct rtgenmsg * on network protocol. */ -#ifdef CONFIG_RTNL_OLD_IFINFO -struct ifinfomsg -{ - unsigned char ifi_family; /* Dummy */ - unsigned char ifi_addrlen; /* Length of HW address */ - unsigned short ifi_pad__; - int ifi_index; /* Link index */ - int ifi_link; /* Physical device */ - char ifi_name[IFNAMSIZ]; - struct sockaddr ifi_address; /* HW address */ - struct sockaddr ifi_broadcast; /* HW broadcast */ - unsigned ifi_flags; /* IFF_* flags */ - int ifi_mtu; /* Link mtu */ - char ifi_qdiscname[IFNAMSIZ];/* Id of packet scheduler */ - int ifi_qdisc; /* Packet scheduler handle */ -}; - -enum -{ - IFLA_UNSPEC, - IFLA_ADDRESS, - IFLA_BROADCAST, - IFLA_IFNAME, - IFLA_QDISC, - IFLA_STATS -}; - -#else - struct ifinfomsg { unsigned char ifi_family; @@ -475,8 +420,6 @@ enum IFLA_STATS }; -#endif - #define IFLA_MAX IFLA_STATS @@ -588,7 +531,7 @@ struct rtnetlink_link extern struct rtnetlink_link * rtnetlink_links[NPROTO]; extern int rtnetlink_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb); -extern int rtnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, int echo); +extern int rtnetlink_send(struct sk_buff *skb, u32 pid, u32 group, int echo); extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data); diff --git a/include/linux/sched.h b/include/linux/sched.h index 7c9112136..e46e22263 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -64,7 +64,6 @@ extern unsigned long avenrun[]; /* Load averages */ extern int nr_running, nr_tasks; extern int last_pid; -#include <linux/head.h> #include <linux/fs.h> #include <linux/signal.h> #include <linux/time.h> diff --git a/include/linux/shm.h b/include/linux/shm.h index f890c7356..50a7b772c 100644 --- a/include/linux/shm.h +++ b/include/linux/shm.h @@ -64,6 +64,7 @@ asmlinkage int sys_shmget (key_t key, int size, int flag); asmlinkage int sys_shmat (int shmid, char *shmaddr, int shmflg, unsigned long *addr); asmlinkage int sys_shmdt (char *shmaddr); asmlinkage int sys_shmctl (int shmid, int cmd, struct shmid_ds *buf); +extern void shm_unuse(unsigned long entry, unsigned long page); #endif /* __KERNEL__ */ diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index ee6c79970..c242c0907 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -537,6 +537,19 @@ extern __inline__ struct sk_buff *dev_alloc_skb(unsigned int length) return skb; } +extern __inline__ struct sk_buff * +skb_cow(struct sk_buff *skb, unsigned int headroom) +{ + headroom = (headroom+15)&~15; + + if ((unsigned)skb_headroom(skb) < headroom || skb_cloned(skb)) { + struct sk_buff *skb2 = skb_realloc_headroom(skb, headroom); + kfree_skb(skb); + skb = skb2; + } + return skb; +} + extern struct sk_buff * skb_recv_datagram(struct sock *sk,unsigned flags,int noblock, int *err); extern unsigned int datagram_poll(struct file *file, struct socket *sock, struct poll_table_struct *wait); extern int skb_copy_datagram(struct sk_buff *from, int offset, char *to,int size); diff --git a/include/linux/smb_fs.h b/include/linux/smb_fs.h index 2e83cf446..35478fe4d 100644 --- a/include/linux/smb_fs.h +++ b/include/linux/smb_fs.h @@ -9,7 +9,6 @@ #ifndef _LINUX_SMB_FS_H #define _LINUX_SMB_FS_H -#include <linux/dirent.h> #include <linux/smb.h> /* diff --git a/include/linux/smb_mount.h b/include/linux/smb_mount.h index 0a8a10ee2..886d945d5 100644 --- a/include/linux/smb_mount.h +++ b/include/linux/smb_mount.h @@ -15,12 +15,11 @@ struct smb_mount_data { int version; - uid_t mounted_uid; /* Who may umount() this filesystem? */ - - uid_t uid; - gid_t gid; - mode_t file_mode; - mode_t dir_mode; + __kernel_uid_t mounted_uid; /* Who may umount() this filesystem? */ + __kernel_uid_t uid; + __kernel_gid_t gid; + __kernel_mode_t file_mode; + __kernel_mode_t dir_mode; }; #endif diff --git a/include/linux/socket.h b/include/linux/socket.h index e8f4202d5..511e92426 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -88,20 +88,27 @@ struct cmsghdr { /* * Get the next cmsg header + * + * PLEASE, do not touch this function. If you think, that it is + * incorrect, grep kernel sources and think about consequences + * before trying to improve it. + * + * Now it always returns valid, not truncated ancillary object + * HEADER. But caller still MUST check, that cmsg->cmsg_len is + * inside range, given by msg->msg_controllen before using + * ansillary object DATA. --ANK (980731) */ __KINLINE struct cmsghdr * __cmsg_nxthdr(void *__ctl, __kernel_size_t __size, struct cmsghdr *__cmsg) { - unsigned char * __ptr; + struct cmsghdr * __ptr; - if (__cmsg->cmsg_len < sizeof(struct cmsghdr)) - return NULL; - __ptr = ((unsigned char *) __cmsg) + CMSG_ALIGN(__cmsg->cmsg_len); - if (__ptr >= (unsigned char *) __ctl + __size) + __ptr = (struct cmsghdr*)(((unsigned char *) __cmsg) + CMSG_ALIGN(__cmsg->cmsg_len)); + if ((unsigned long)((char*)(__ptr+1) - (char *) __ctl) > __size) return NULL; - return (struct cmsghdr *) __ptr; + return __ptr; } __KINLINE struct cmsghdr * cmsg_nxthdr (struct msghdr *__msg, struct cmsghdr *__cmsg) diff --git a/include/linux/sockios.h b/include/linux/sockios.h index 4f41001aa..995e43e9a 100644 --- a/include/linux/sockios.h +++ b/include/linux/sockios.h @@ -45,6 +45,7 @@ #define SIOCSIFMEM 0x8920 /* set memory address (BSD) */ #define SIOCGIFMTU 0x8921 /* get MTU size */ #define SIOCSIFMTU 0x8922 /* set MTU size */ +#define SIOCSIFNAME 0x8923 /* set interface name */ #define SIOCSIFHWADDR 0x8924 /* set hardware address */ #define SIOCGIFENCAP 0x8925 /* get/set encapsulations */ #define SIOCSIFENCAP 0x8926 diff --git a/include/linux/sound.h b/include/linux/sound.h index 7dabc388c..bc9335801 100644 --- a/include/linux/sound.h +++ b/include/linux/sound.h @@ -6,8 +6,10 @@ extern int register_sound_special(struct file_operations *, int); extern int register_sound_mixer(struct file_operations *fops); extern int register_sound_midi(struct file_operations *fops); extern int register_sound_dsp(struct file_operations *fops); +extern int register_sound_synth(struct file_operations *fops); extern void unregister_sound_special(int unit); extern void unregister_sound_mixer(int unit); extern void unregister_sound_midi(int unit); extern void unregister_sound_dsp(int unit); +extern void unregister_sound_synth(int unit); diff --git a/include/linux/string.h b/include/linux/string.h index 214503c20..1b3fa4e51 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -26,6 +26,7 @@ extern __kernel_size_t strnlen(const char *,__kernel_size_t); extern __kernel_size_t strspn(const char *,const char *); extern int strcmp(const char *,const char *); extern int strncmp(const char *,const char *,__kernel_size_t); +extern int strnicmp(const char *, const char *, __kernel_size_t); extern void * memset(void *,int,__kernel_size_t); extern void * memcpy(void *,const void *,__kernel_size_t); diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 8553a05c5..98a250051 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h @@ -118,6 +118,9 @@ int rpc_do_call(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, int flags, rpc_action callback, void *clntdata); void rpc_restart_call(struct rpc_task *); +void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset); +void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset); + #define rpc_call(clnt, proc, argp, resp, flags) \ rpc_do_call(clnt, proc, argp, resp, flags, NULL, NULL) diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 697950b2e..f0f8e0384 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h @@ -146,6 +146,8 @@ void * rpc_allocate(unsigned int flags, unsigned int); void rpc_free(void *); int rpciod_up(void); void rpciod_down(void); +void rpciod_wake_up(void); +void rpciod_tcp_dispatcher(void); #ifdef RPC_DEBUG void rpc_show_tasks(void); #endif diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 0037b5738..df16576d7 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -36,7 +36,7 @@ * Note: on machines with low memory we should probably use a smaller * MAXREQS value: At 32 outstanding reqs with 8 megs of RAM, fragment * reassembly will frequently run out of memory. - * Come Linux 2.1, we'll handle fragments directly. + * Come Linux 2.3, we'll handle fragments directly. */ #define RPC_MAXCONG 16 #define RPC_MAXREQS (RPC_MAXCONG + 1) @@ -103,6 +103,12 @@ struct rpc_rqst { * For authentication (e.g. auth_des) */ u32 rq_creddata[2]; + + /* + * Partial send handling + */ + + u32 rq_bytes_sent; /* Bytes we have sent */ #ifdef RPC_PROFILE unsigned long rq_xtime; /* when transmitted */ @@ -166,6 +172,8 @@ struct rpc_xprt { */ struct rpc_iov snd_buf; /* send buffer */ struct rpc_task * snd_task; /* Task blocked in send */ + u32 snd_sent; /* Bytes we have sent */ + void (*old_data_ready)(struct sock *, int); void (*old_state_change)(struct sock *); diff --git a/include/linux/swap.h b/include/linux/swap.h index 3b4d2c983..0bcb6f6ed 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -7,6 +7,23 @@ #define MAX_SWAPFILES 8 +union swap_header { + struct + { + char reserved[PAGE_SIZE - 10]; + char magic[10]; + } magic; + struct + { + char bootbits[1024]; /* Space for disklabel etc. */ + unsigned int version; + unsigned int last_page; + unsigned int nr_badpages; + unsigned int padding[125]; + unsigned int badpages[1]; + } info; +}; + #ifdef __KERNEL__ #undef DEBUG_SWAP @@ -18,11 +35,14 @@ #define SWAP_CLUSTER_MAX 32 +#define SWAP_MAP_MAX 0x7fff +#define SWAP_MAP_BAD 0x8000 + struct swap_info_struct { unsigned int flags; kdev_t swap_device; struct dentry * swap_file; - unsigned char * swap_map; + unsigned short * swap_map; unsigned char * swap_lockmap; unsigned int lowest_bit; unsigned int highest_bit; @@ -55,6 +75,7 @@ extern int try_to_free_pages(unsigned int gfp_mask, int count); /* linux/mm/page_io.c */ extern void rw_swap_page(int, unsigned long, char *, int); extern void rw_swap_page_nocache(int, unsigned long, char *); +extern void swap_after_unlock_page (unsigned long entry); /* linux/mm/page_alloc.c */ extern void swap_in(struct task_struct *, struct vm_area_struct *, @@ -64,10 +85,15 @@ extern void swap_in(struct task_struct *, struct vm_area_struct *, /* linux/mm/swap_state.c */ extern void show_swap_cache_info(void); extern int add_to_swap_cache(struct page *, unsigned long); -extern void swap_duplicate(unsigned long); -extern void swap_after_unlock_page (unsigned long entry); +extern int swap_duplicate(unsigned long); +extern int swap_check_entry(unsigned long); extern struct page * read_swap_cache_async(unsigned long, unsigned long, int); #define read_swap_cache(entry, addr) read_swap_cache_async(entry, addr, 1); +/* + * Make these inline later once they are working properly. + */ +extern void delete_from_swap_cache(struct page *page); +extern void free_page_and_swap_cache(unsigned long addr); /* linux/mm/swapfile.c */ extern unsigned int nr_swapfiles; @@ -80,6 +106,8 @@ struct swap_list_t { int next; /* swapfile to be used next */ }; extern struct swap_list_t swap_list; +int sys_swapoff(const char *); +int sys_swapon(const char *, int); /* * vm_ops not present page codes for shared memory. @@ -128,14 +156,6 @@ static inline int is_page_shared(struct page *page) return (count > 1); } -/* - * Make these inline later once they are working properly. - */ -extern long find_in_swap_cache(struct page *page); -extern int delete_from_swap_cache(struct page *page); -extern void remove_from_swap_cache(struct page *page); -extern void free_page_and_swap_cache(unsigned long addr); - #endif /* __KERNEL__*/ #endif /* _LINUX_SWAP_H */ diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index ef9044aa1..c310573ee 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -2,6 +2,23 @@ * sysctl.h: General linux system control interface * * Begun 24 March 1995, Stephen Tweedie + * + **************************************************************** + **************************************************************** + ** + ** WARNING: + ** The values in this file are exported to user space via + ** the sysctl() binary interface. Do *NOT* change the + ** numbering of any existing values here, and do not change + ** any numbers within any one set of values. If you have + ** to redefine an existing interface, use a new number for it. + ** The kernel will then return ENOTDIR to any application using + ** the old binary interface. + ** + ** --sct + ** + **************************************************************** + **************************************************************** */ #include <linux/lists.h> @@ -33,32 +50,32 @@ struct __sysctl_args { enum { - CTL_KERN=1, /* General kernel info and control */ +/*1*/ CTL_KERN=1, /* General kernel info and control */ CTL_VM, /* VM management */ CTL_NET, /* Networking */ CTL_PROC, /* Process info */ CTL_FS, /* Filesystems */ CTL_DEBUG, /* Debugging */ - CTL_DEV, /* Devices */ +/*7*/ CTL_DEV, /* Devices */ }; /* CTL_KERN names: */ enum { - KERN_OSTYPE=1, /* string: system version */ +/*1*/ KERN_OSTYPE=1, /* string: system version */ KERN_OSRELEASE, /* string: system release */ KERN_OSREV, /* int: system revision */ KERN_VERSION, /* string: compile time info */ KERN_SECUREMASK, /* struct: maximum rights mask */ KERN_PROF, /* table: profiling information */ KERN_NODENAME, - KERN_DOMAINNAME, - KERN_SECURELVL, /* int: system security level */ +/*8*/ KERN_DOMAINNAME, +/*14*/ KERN_SECURELVL=14, /* int: system security level */ KERN_PANIC, /* int: panic timeout */ - KERN_REALROOTDEV, /* real root device to mount after initrd */ - KERN_JAVA_INTERPRETER, /* path to Java(tm) interpreter */ - KERN_JAVA_APPLETVIEWER, /* path to Java(tm) appletviewer */ +/*16*/ KERN_REALROOTDEV, /* real root device to mount after initrd */ +/*19*/ KERN_JAVA_INTERPRETER=19,/* path to Java(tm) interpreter */ +/*20*/ KERN_JAVA_APPLETVIEWER, /* path to Java(tm) appletviewer */ KERN_SPARC_REBOOT, /* reboot command on Sparc */ KERN_CTLALTDEL, /* int: allow ctl-alt-del to reboot */ KERN_PRINTK, /* sturct: control printk logging parameters */ @@ -67,14 +84,14 @@ enum KERN_PPC_ZEROPAGED, /* turn idle page zeroing on/off on PPC */ KERN_PPC_POWERSAVE_NAP, /* use nap mode for power saving */ KERN_MODPROBE, - KERN_SG_BIG_BUFF +/*29*/ KERN_SG_BIG_BUFF }; /* CTL_VM names: */ enum { - VM_SWAPCTL=1, /* struct: Set vm swapping control */ +/*1*/ VM_SWAPCTL=1, /* struct: Set vm swapping control */ VM_SWAPOUT, /* int: Background pageout interval */ VM_FREEPG, /* struct: Set free page thresholds */ VM_BDFLUSH, /* struct: Control buffer cache flushing */ @@ -82,14 +99,14 @@ enum VM_BUFFERMEM, /* struct: Set buffer memory thresholds */ VM_PAGECACHE, /* struct: Set cache memory thresholds */ VM_PAGERDAEMON, /* struct: Control kswapd behaviour */ - VM_PGT_CACHE /* struct: Set page table cache parameters */ +/*9*/ VM_PGT_CACHE /* struct: Set page table cache parameters */ }; /* CTL_NET names: */ enum { - NET_CORE=1, +/*1*/ NET_CORE=1, NET_ETHER, NET_802, NET_UNIX, @@ -98,19 +115,19 @@ enum NET_ATALK, NET_NETROM, NET_AX25, - NET_BRIDGE, - NET_IPV6, +/*10*/ NET_BRIDGE, NET_ROSE, + NET_IPV6, NET_X25, NET_TR, - NET_DECNET +/*15*/ NET_DECNET }; /* /proc/sys/net/core */ enum { - NET_CORE_WMEM_MAX=1, +/*1*/ NET_CORE_WMEM_MAX=1, NET_CORE_RMEM_MAX, NET_CORE_WMEM_DEFAULT, NET_CORE_RMEM_DEFAULT, @@ -119,7 +136,7 @@ enum NET_CORE_FASTROUTE, NET_CORE_MSG_COST, NET_CORE_MSG_BURST, - NET_CORE_OPTMEM_MAX, +/*10*/ NET_CORE_OPTMEM_MAX, }; /* /proc/sys/net/ethernet */ @@ -130,23 +147,23 @@ enum enum { - NET_UNIX_DESTROY_DELAY=1, - NET_UNIX_DELETE_DELAY, +/*1*/ NET_UNIX_DESTROY_DELAY=1, +/*2*/ NET_UNIX_DELETE_DELAY, }; /* /proc/sys/net/ipv4 */ enum { /* v2.0 compatibile variables */ - NET_IPV4_FORWARD = 8, +/*8*/ NET_IPV4_FORWARD = 8, NET_IPV4_DYNADDR = 9, - NET_IPV4_CONF = 16, +/*16*/ NET_IPV4_CONF = 16, NET_IPV4_NEIGH = 17, NET_IPV4_ROUTE = 18, NET_IPV4_FIB_HASH = 19, - NET_IPV4_TCP_HOE_RETRANSMITS=32, +/*32*/ NET_IPV4_TCP_HOE_RETRANSMITS=32, NET_IPV4_TCP_TIMESTAMPS, NET_IPV4_TCP_WINDOW_SCALING, NET_IPV4_TCP_SACK, @@ -154,7 +171,7 @@ enum NET_IPV4_DEFAULT_TTL, NET_IPV4_AUTOCONFIG, NET_IPV4_NO_PMTU_DISC, - NET_IPV4_TCP_SYN_RETRIES, +/*40*/ NET_IPV4_TCP_SYN_RETRIES, NET_IPV4_IPFRAG_HIGH_THRESH, NET_IPV4_IPFRAG_LOW_THRESH, NET_IPV4_IPFRAG_TIME, @@ -164,7 +181,7 @@ enum NET_IPV4_TCP_RETRIES1, NET_IPV4_TCP_RETRIES2, NET_IPV4_TCP_FIN_TIMEOUT, - NET_IPV4_IP_MASQ_DEBUG, +/*50*/ NET_IPV4_IP_MASQ_DEBUG, NET_TCP_SYNCOOKIES, NET_TCP_STDURG, NET_TCP_RFC1337, @@ -174,14 +191,14 @@ enum NET_IPV4_ICMP_ECHO_IGNORE_ALL, NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS, NET_IPV4_ICMP_SOURCEQUENCH_RATE, - NET_IPV4_ICMP_DESTUNREACH_RATE, +/*60*/ NET_IPV4_ICMP_DESTUNREACH_RATE, NET_IPV4_ICMP_TIMEEXCEED_RATE, NET_IPV4_ICMP_PARAMPROB_RATE, - NET_IPV4_ICMP_ECHOREPLY_RATE, +/*63*/ NET_IPV4_ICMP_ECHOREPLY_RATE, }; enum { - NET_IPV4_ROUTE_FLUSH = 1, +/*1*/ NET_IPV4_ROUTE_FLUSH = 1, NET_IPV4_ROUTE_MIN_DELAY, NET_IPV4_ROUTE_MAX_DELAY, NET_IPV4_ROUTE_GC_THRESH, @@ -190,24 +207,24 @@ enum { NET_IPV4_ROUTE_GC_TIMEOUT, NET_IPV4_ROUTE_GC_INTERVAL, NET_IPV4_ROUTE_REDIRECT_LOAD, - NET_IPV4_ROUTE_REDIRECT_NUMBER, +/*10*/ NET_IPV4_ROUTE_REDIRECT_NUMBER, NET_IPV4_ROUTE_REDIRECT_SILENCE, NET_IPV4_ROUTE_ERROR_COST, NET_IPV4_ROUTE_ERROR_BURST, - NET_IPV4_ROUTE_GC_ELASTICITY, +/*14*/ NET_IPV4_ROUTE_GC_ELASTICITY, }; enum { - NET_PROTO_CONF_ALL = -2, - NET_PROTO_CONF_DEFAULT = -3, +/*-2*/ NET_PROTO_CONF_ALL = -2, +/*-3*/ NET_PROTO_CONF_DEFAULT = -3, /* And device ifindices ... */ }; enum { - NET_IPV4_CONF_FORWARDING = 1, +/*1*/ NET_IPV4_CONF_FORWARDING = 1, NET_IPV4_CONF_MC_FORWARDING, NET_IPV4_CONF_PROXY_ARP, NET_IPV4_CONF_ACCEPT_REDIRECTS, @@ -216,29 +233,29 @@ enum NET_IPV4_CONF_SHARED_MEDIA, NET_IPV4_CONF_RP_FILTER, NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE, - NET_IPV4_CONF_BOOTP_RELAY, - NET_IPV4_CONF_LOG_MARTIANS, +/*10*/ NET_IPV4_CONF_BOOTP_RELAY, +/*11*/ NET_IPV4_CONF_LOG_MARTIANS, }; /* /proc/sys/net/ipv6 */ enum { - NET_IPV6_CONF = 16, +/*16*/ NET_IPV6_CONF = 16, NET_IPV6_NEIGH = 17, - NET_IPV6_ROUTE = 18, +/*18*/ NET_IPV6_ROUTE = 18, }; enum { - NET_IPV6_ROUTE_FLUSH = 1, +/*1*/ NET_IPV6_ROUTE_FLUSH = 1, NET_IPV6_ROUTE_GC_THRESH, NET_IPV6_ROUTE_MAX_SIZE, NET_IPV6_ROUTE_GC_MIN_INTERVAL, NET_IPV6_ROUTE_GC_TIMEOUT, NET_IPV6_ROUTE_GC_INTERVAL, - NET_IPV6_ROUTE_GC_ELASTICITY, +/*7*/ NET_IPV6_ROUTE_GC_ELASTICITY, }; enum { - NET_IPV6_FORWARDING = 1, +/*1*/ NET_IPV6_FORWARDING = 1, NET_IPV6_HOP_LIMIT, NET_IPV6_MTU, NET_IPV6_ACCEPT_RA, @@ -247,12 +264,12 @@ enum { NET_IPV6_DAD_TRANSMITS, NET_IPV6_RTR_SOLICITS, NET_IPV6_RTR_SOLICIT_INTERVAL, - NET_IPV6_RTR_SOLICIT_DELAY, +/*10*/ NET_IPV6_RTR_SOLICIT_DELAY, }; /* /proc/sys/net/<protocol>/neigh/<dev> */ enum { - NET_NEIGH_MCAST_SOLICIT=1, +/*1*/ NET_NEIGH_MCAST_SOLICIT=1, NET_NEIGH_UCAST_SOLICIT, NET_NEIGH_APP_SOLICIT, NET_NEIGH_RETRANS_TIME, @@ -261,13 +278,13 @@ enum { NET_NEIGH_GC_STALE_TIME, NET_NEIGH_UNRES_QLEN, NET_NEIGH_PROXY_QLEN, - NET_NEIGH_ANYCAST_DELAY, +/*10*/ NET_NEIGH_ANYCAST_DELAY, NET_NEIGH_PROXY_DELAY, NET_NEIGH_LOCKTIME, NET_NEIGH_GC_INTERVAL, NET_NEIGH_GC_THRESH1, NET_NEIGH_GC_THRESH2, - NET_NEIGH_GC_THRESH3 +/*16*/ NET_NEIGH_GC_THRESH3 }; /* /proc/sys/net/ipx */ @@ -275,16 +292,16 @@ enum { /* /proc/sys/net/appletalk */ enum { - NET_ATALK_AARP_EXPIRY_TIME = 1, +/*1*/ NET_ATALK_AARP_EXPIRY_TIME = 1, NET_ATALK_AARP_TICK_TIME, NET_ATALK_AARP_RETRANSMIT_LIMIT, - NET_ATALK_AARP_RESOLVE_TIME, +/*4*/ NET_ATALK_AARP_RESOLVE_TIME, }; /* /proc/sys/net/netrom */ enum { - NET_NETROM_DEFAULT_PATH_QUALITY = 1, +/*1*/ NET_NETROM_DEFAULT_PATH_QUALITY = 1, NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER, NET_NETROM_NETWORK_TTL_INITIALISER, NET_NETROM_TRANSPORT_TIMEOUT, @@ -293,13 +310,13 @@ enum { NET_NETROM_TRANSPORT_BUSY_DELAY, NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE, NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT, - NET_NETROM_ROUTING_CONTROL, - NET_NETROM_LINK_FAILS_COUNT +/*10*/ NET_NETROM_ROUTING_CONTROL, +/*11*/ NET_NETROM_LINK_FAILS_COUNT }; /* /proc/sys/net/ax25 */ enum { - NET_AX25_IP_DEFAULT_MODE = 1, +/*1*/ NET_AX25_IP_DEFAULT_MODE = 1, NET_AX25_DEFAULT_MODE, NET_AX25_BACKOFF_TYPE, NET_AX25_CONNECT_MODE, @@ -308,50 +325,50 @@ enum { NET_AX25_T1_TIMEOUT, NET_AX25_T2_TIMEOUT, NET_AX25_T3_TIMEOUT, - NET_AX25_IDLE_TIMEOUT, +/*10*/ NET_AX25_IDLE_TIMEOUT, NET_AX25_N2, NET_AX25_PACLEN, NET_AX25_PROTOCOL, - NET_AX25_DAMA_SLAVE_TIMEOUT +/*14*/ NET_AX25_DAMA_SLAVE_TIMEOUT }; /* /proc/sys/net/rose */ enum { - NET_ROSE_RESTART_REQUEST_TIMEOUT = 1, +/*1*/ NET_ROSE_RESTART_REQUEST_TIMEOUT = 1, NET_ROSE_CALL_REQUEST_TIMEOUT, NET_ROSE_RESET_REQUEST_TIMEOUT, NET_ROSE_CLEAR_REQUEST_TIMEOUT, - NET_ROSE_NO_ACTIVITY_TIMEOUT, NET_ROSE_ACK_HOLD_BACK_TIMEOUT, NET_ROSE_ROUTING_CONTROL, NET_ROSE_LINK_FAIL_TIMEOUT, NET_ROSE_MAX_VCS, - NET_ROSE_WINDOW_SIZE + NET_ROSE_WINDOW_SIZE, +/*10*/ NET_ROSE_NO_ACTIVITY_TIMEOUT, }; /* /proc/sys/net/x25 */ enum { - NET_X25_RESTART_REQUEST_TIMEOUT = 1, +/*1*/ NET_X25_RESTART_REQUEST_TIMEOUT = 1, NET_X25_CALL_REQUEST_TIMEOUT, NET_X25_RESET_REQUEST_TIMEOUT, NET_X25_CLEAR_REQUEST_TIMEOUT, - NET_X25_ACK_HOLD_BACK_TIMEOUT +/*5*/ NET_X25_ACK_HOLD_BACK_TIMEOUT }; /* /proc/sys/net/token-ring */ enum { - NET_TR_RIF_TIMEOUT=1 +/*1*/ NET_TR_RIF_TIMEOUT=1 }; /* /proc/sys/net/decnet */ enum { - NET_DECNET_DEF_T3_BROADCAST = 1, +/*1*/ NET_DECNET_DEF_T3_BROADCAST = 1, NET_DECNET_DEF_T3_POINTTOPOINT, NET_DECNET_DEF_T1, NET_DECNET_DEF_BCT1, NET_DECNET_CACHETIMEOUT, - NET_DECNET_DEBUG_LEVEL +/*6*/ NET_DECNET_DEBUG_LEVEL }; /* CTL_PROC names: */ @@ -359,7 +376,7 @@ enum { /* CTL_FS names: */ enum { - FS_NRINODE=1, /* int: current number of allocated inodes */ +/*1*/ FS_NRINODE=1, /* int: current number of allocated inodes */ FS_STATINODE, FS_MAXINODE, /* int: maximum number of inodes that can be allocated */ FS_NRDQUOT, /* int: current number of allocated dquots */ @@ -367,18 +384,21 @@ enum FS_NRFILE, /* int: current number of allocated filedescriptors */ FS_MAXFILE, /* int: maximum number of filedescriptors that can be allocated */ FS_DENTRY, + FS_NRSUPER, /* int: current number of allocated super_blocks */ +/*10*/ FS_MAXSUPER, /* int: maximum number of super_blocks that can be allocated */ }; /* CTL_DEBUG names: */ /* CTL_DEV names: */ enum { - DEV_CDROM = 1, +/*1*/ DEV_CDROM = 1, +/*2*/ DEV_HWMON, }; /* /proc/sys/dev/cdrom */ enum { - DEV_CDROM_INFO = 1, +/*1*/ DEV_CDROM_INFO = 1, }; #ifdef __KERNEL__ diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index 70740489c..1b8d98b22 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h @@ -6,7 +6,7 @@ * Laboratory for Computer Science Research Computing Facility * Rutgers, The State University of New Jersey * - * Clean swab support by Fare <rideau@ens.fr> + * Clean swab support by Fare <fare@tunes.org> * just hope no one is using NNUUXXI on __?64 structure elements * 64-bit clean thanks to Maciej W. Rozycki <macro@ds2.pg.gda.pl> * @@ -31,8 +31,8 @@ #define UFS_SBLOCK 8192 #define UFS_SBSIZE 8192 -#define SECTOR_SIZE 512 -#define SECTOR_BITS 9 +#define UFS_SECTOR_SIZE 512 +#define UFS_SECTOR_BITS 9 #define UFS_MAGIC 0x00011954 #define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */ @@ -68,8 +68,15 @@ /* From here to next blank line, s_flags for ufs_sb_info */ /* endianness */ #define UFS_BYTESEX 0x00000001 /* mask; leave room to 0xF */ +#if defined(__LITTLE_ENDIAN) || defined(__BIG_ENDIAN) +/* these are for sane architectures */ +#define UFS_NATIVE_ENDIAN 0x00000000 +#define UFS_SWABBED_ENDIAN 0x00000001 +#else +/* these are for pervert architectures */ #define UFS_LITTLE_ENDIAN 0x00000000 #define UFS_BIG_ENDIAN 0x00000001 +#endif /* directory entry encoding */ #define UFS_DE_MASK 0x00000010 /* mask for the following */ #define UFS_DE_OLD 0x00000000 diff --git a/include/linux/umsdos_fs.h b/include/linux/umsdos_fs.h index c9cfd16e6..7a170c115 100644 --- a/include/linux/umsdos_fs.h +++ b/include/linux/umsdos_fs.h @@ -1,6 +1,9 @@ #ifndef LINUX_UMSDOS_FS_H #define LINUX_UMSDOS_FS_H +/* #define UMSDOS_DEBUG 1 */ +#define UMSDOS_PARANOIA 1 + #define UMSDOS_VERSION 0 #define UMSDOS_RELEASE 4 @@ -15,6 +18,9 @@ #ifndef _LINUX_TYPES_H #include <linux/types.h> #endif +#ifndef _LINUX_LIMITS_H +#include <linux/limits.h> +#endif #ifndef _LINUX_DIRENT_H #include <linux/dirent.h> #endif @@ -23,6 +29,27 @@ #endif +#ifdef __KERNEL__ +/* #Specification: convention / PRINTK Printk and printk + * Here is the convention for the use of printk inside fs/umsdos + * + * printk carry important message (error or status). + * Printk is for debugging (it is a macro defined at the beginning of + * most source. + * PRINTK is a nulled Printk macro. + * + * This convention makes the source easier to read, and Printk easier + * to shut off. + */ +# define PRINTK(x) +# ifdef UMSDOS_DEBUG +# define Printk(x) printk x +# else +# define Printk(x) +# endif +#endif + + struct umsdos_fake_info { char fname[13]; int len; @@ -93,7 +120,7 @@ struct umsdos_info { #define UMSDOS_READDIR_EMD _IO(0x04,216) /* read the EMD file only. */ #define UMSDOS_GETVERSION _IO(0x04,217) /* Get the release number of UMSDOS */ #define UMSDOS_INIT_EMD _IO(0x04,218) /* Create the EMD file if not there */ -#define UMSDOS_DOS_SETUP _IO(0x04,219) /* Set the defaults of the MsDOS driver */ +#define UMSDOS_DOS_SETUP _IO(0x04,219) /* Set the defaults of the MS-DOS driver. */ #define UMSDOS_RENAME_DOS _IO(0x04,220) /* rename a file/directory in the DOS * directory only */ diff --git a/include/linux/umsdos_fs.p b/include/linux/umsdos_fs.p index 0a7475a1c..44a6eec2b 100644 --- a/include/linux/umsdos_fs.p +++ b/include/linux/umsdos_fs.p @@ -1,19 +1,22 @@ /* check.c 23/01/95 03.38.30 */ void check_page_tables (void); + /* dir.c 22/06/95 00.22.12 */ int compat_msdos_create(struct inode *dir, const char *name, int len, int mode, struct inode **inode); -int UMSDOS_dir_read ( struct file *filp, +int dummy_dir_read ( struct file *filp, char *buf, size_t size, loff_t *count); +void umsdos_lookup_patch_new(struct dentry *, struct umsdos_dirent *, off_t); void umsdos_lookup_patch (struct inode *dir, struct inode *inode, struct umsdos_dirent *entry, off_t emd_pos); +int umsdos_dentry_to_entry (struct dentry *, struct umsdos_dirent *); int umsdos_inode2entry (struct inode *dir, struct inode *inode, struct umsdos_dirent *entry); @@ -23,89 +26,74 @@ int umsdos_lookup_x ( struct inode *dir, struct dentry *dentry, int nopseudo); -int UMSDOS_lookup(struct inode *dir,struct dentry *dentry); - -int umsdos_hlink2inode (struct inode *hlink, struct inode **result); +int UMSDOS_lookup(struct inode *, struct dentry *); +struct dentry *umsdos_lookup_dentry(struct dentry *, char *, int); + +struct dentry *umsdos_solve_hlink (struct dentry *hlink); + /* emd.c 22/06/95 00.22.04 */ ssize_t umsdos_file_write_kmem_real (struct file *filp, const char *buf, - size_t count, - loff_t *offs); + size_t count); -ssize_t umsdos_file_read_kmem (struct inode *emd_dir, - struct file *filp, +ssize_t umsdos_file_read_kmem (struct file *filp, char *buf, - size_t count, - loff_t *offs); -ssize_t umsdos_file_write_kmem (struct inode *emd_dir, - struct file *filp, + size_t count); +ssize_t umsdos_file_write_kmem (struct file *filp, const char *buf, - size_t count, - loff_t *offs); -ssize_t umsdos_emd_dir_write (struct inode *emd_dir, - struct file *filp, + size_t count); +ssize_t umsdos_emd_dir_write (struct file *filp, char *buf, - size_t count, - loff_t *offs); -ssize_t umsdos_emd_dir_read (struct inode *emd_dir, - struct file *filp, + size_t count); +ssize_t umsdos_emd_dir_read (struct file *filp, char *buf, - size_t count, - loff_t *loffs); + size_t count); +struct dentry *umsdos_get_emd_dentry(struct dentry *); +int umsdos_have_emd(struct dentry *); +int umsdos_make_emd(struct dentry *); struct inode *umsdos_emd_dir_lookup (struct inode *dir, int creat); -int umsdos_emd_dir_readentry (struct inode *emd_dir, - struct file *filp, - struct umsdos_dirent *entry); -int umsdos_writeentry (struct inode *dir, - struct inode *emd_dir, - struct umsdos_info *info, - int free_entry); -int umsdos_newentry (struct inode *dir, struct umsdos_info *info); -int umsdos_newhidden (struct inode *dir, struct umsdos_info *info); -int umsdos_delentry (struct inode *dir, - struct umsdos_info *info, - int isdir); -int umsdos_isempty (struct inode *dir); -int umsdos_findentry (struct inode *dir, - struct umsdos_info *info, - int expect); +int umsdos_emd_dir_readentry (struct file *, struct umsdos_dirent *); +int umsdos_newentry (struct dentry *, struct umsdos_info *); +int umsdos_newhidden (struct dentry *, struct umsdos_info *); +int umsdos_delentry (struct dentry *, struct umsdos_info *, int); +int umsdos_findentry (struct dentry *, struct umsdos_info *, int); +int umsdos_isempty (struct dentry *); + /* file.c 25/01/95 02.25.38 */ + /* inode.c 12/06/95 09.49.40 */ inline struct dentry *geti_dentry (struct inode *inode); -inline void inc_count (struct inode *inode); +void checkd_inode (struct inode *inode); void check_inode (struct inode *inode); void check_dentry (struct dentry *dentry); +void check_dentry_path (struct dentry *dentry, const char *desc); void fill_new_filp (struct file *filp, struct dentry *dentry); -void kill_dentry (struct dentry *dentry); struct dentry *creat_dentry (const char *name, const int len, struct inode *inode, struct dentry *parent); -void UMSDOS_put_inode (struct inode *inode); -void UMSDOS_put_super (struct super_block *sb); -int UMSDOS_statfs (struct super_block *sb, - struct statfs *buf, - int bufsiz); -int compat_umsdos_real_lookup (struct inode *dir, +void UMSDOS_read_inode (struct inode *); +void UMSDOS_write_inode (struct inode *); +int UMSDOS_notify_change (struct dentry *, struct iattr *attr); +void UMSDOS_put_inode (struct inode *); +int UMSDOS_statfs (struct super_block *, struct statfs *, int); +struct super_block *UMSDOS_read_super (struct super_block *, void *, int); +void UMSDOS_put_super (struct super_block *); + +struct dentry *compat_umsdos_real_lookup (struct dentry *d_dir, const char *name, - int len, - struct inode **result); -int umsdos_real_lookup(struct inode *inode,struct dentry *dentry); + int len); +int umsdos_real_lookup(struct inode *, struct dentry *); +void umsdos_setup_dir(struct dentry *); void umsdos_setup_dir_inode (struct inode *inode); void umsdos_set_dirinfo (struct inode *inode, struct inode *dir, off_t f_pos); int umsdos_isinit (struct inode *inode); -void umsdos_patch_inode (struct inode *inode, - struct inode *dir, - off_t f_pos); +void umsdos_patch_dentry_inode (struct dentry *, off_t); +void umsdos_patch_inode (struct inode *, struct inode *, off_t); int umsdos_get_dirowner (struct inode *inode, struct inode **result); -void UMSDOS_read_inode (struct inode *inode); -void UMSDOS_write_inode (struct inode *inode); -int UMSDOS_notify_change (struct dentry *dentry, struct iattr *attr); -struct super_block *UMSDOS_read_super (struct super_block *s, - void *data, - int silent); + /* ioctl.c 22/06/95 00.22.08 */ int UMSDOS_ioctl_dir (struct inode *dir, struct file *filp, @@ -115,12 +103,16 @@ int UMSDOS_ioctl_dir (struct inode *dir, void umsdos_manglename (struct umsdos_info *info); int umsdos_evalrecsize (int len); int umsdos_parse (const char *name,int len, struct umsdos_info *info); + /* namei.c 25/01/95 02.25.38 */ void umsdos_lockcreate (struct inode *dir); void umsdos_startlookup (struct inode *dir); void umsdos_unlockcreate (struct inode *dir); void umsdos_endlookup (struct inode *dir); +int umsdos_readlink_x ( struct dentry *dentry, + char *buffer, + int bufsiz); int UMSDOS_symlink (struct inode *dir, struct dentry *dentry, const char *symname); @@ -144,6 +136,7 @@ int UMSDOS_rename (struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry); + /* rdir.c 22/03/95 03.31.42 */ int umsdos_rlookup_x (struct inode *dir, struct dentry *dentry, diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 701fb8870..e089d607e 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h @@ -47,6 +47,7 @@ extern void video_unregister_device(struct video_device *); #define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ #define VID_TYPE_SCALES 128 /* Scalable */ #define VID_TYPE_MONOCHROME 256 /* Monochrome only */ +#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ struct video_capability { @@ -72,6 +73,7 @@ struct video_channel __u16 type; #define VIDEO_TYPE_TV 1 #define VIDEO_TYPE_CAMERA 2 + __u16 norm; /* Norm set by channel */ }; struct video_tuner @@ -84,6 +86,7 @@ struct video_tuner #define VIDEO_TUNER_NTSC 2 #define VIDEO_TUNER_SECAM 4 #define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */ +#define VIDEO_TUNER_NORM 16 /* Tuner can set norm */ #define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */ __u16 mode; /* PAL/NTSC/SECAM/OTHER */ #define VIDEO_MODE_PAL 0 @@ -135,6 +138,8 @@ struct video_audio #define VIDEO_SOUND_LANG1 3 #define VIDEO_SOUND_LANG2 4 __u16 mode; + __u16 balance; /* Stereo balance */ + __u16 step; /* Step actual volume uses */ }; struct video_clip @@ -146,8 +151,8 @@ struct video_clip struct video_window { - __u32 x,y; - __u32 width,height; + __u32 x,y; /* Position of window */ + __u32 width,height; /* Its size */ __u32 chromakey; __u32 flags; struct video_clip *clips; /* Set only */ @@ -155,6 +160,16 @@ struct video_window #define VIDEO_WINDOW_INTERLACE 1 }; +struct video_capture +{ + __u32 x,y; /* Offsets into image */ + __u32 width, height; /* Area to capture */ + __u16 decimation; /* Decimation divder */ + __u16 flags; /* Flags for capture */ +#define VIDEO_CAPTURE_ODD 0 /* Temporal */ +#define VIDEO_CAPTURE_EVEN 1 +}; + struct video_buffer { void *base; @@ -165,9 +180,9 @@ struct video_buffer struct video_mmap { - unsigned int frame; /* Frame (0 or 1) for double buffer */ - int height,width; - unsigned int format; /* should be VIDEO_PALETTE_* */ + unsigned int frame; /* Frame (0 - n) for double buffer */ + int height,width; + unsigned int format; /* should be VIDEO_PALETTE_* */ }; struct video_key @@ -175,10 +190,33 @@ struct video_key __u8 key[8]; __u32 flags; }; + + +#define VIDEO_MAX_FRAME 32 + +struct video_mbuf +{ + int size; /* Total memory to map */ + int frames; /* Frames */ + int offsets[VIDEO_MAX_FRAME]; +}; + +#define VIDEO_NO_UNIT (-1) + + +struct video_unit +{ + int video; /* Video minor */ + int vbi; /* VBI minor */ + int radio; /* Radio minor */ + int audio; /* Audio minor */ + int teletext; /* Teletext minor */ +}; + #define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */ #define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */ -#define VIDIOCSCHAN _IOW('v',3,int) /* Set channel */ +#define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */ #define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */ #define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */ #define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */ @@ -193,9 +231,12 @@ struct video_key #define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */ #define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */ #define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */ -#define VIDIOCSYNC _IO('v',18) /* Sync with mmap grabbing */ +#define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */ #define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */ - +#define VIDIOCGMBUF _IOR('v', 20, struct video_mbuf) /* Memory map buffer info */ +#define VIDIOCGUNIT _IOR('v', 21, struct video_unit) /* Get attached units */ +#define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get frame buffer */ +#define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set frame buffer - root only */ #define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */ @@ -213,6 +254,8 @@ struct video_key #define VID_HARDWARE_SAA7146 11 #define VID_HARDWARE_VIDEUM 12 /* Reserved for Winnov videum */ #define VID_HARDWARE_RTRACK2 13 +#define VID_HARDWARE_PERMEDIA2 14 /* Reserved for Permedia2 */ +#define VID_HARDWARE_RIVA128 15 /* Reserved for RIVA 128 */ /* * Initialiser list diff --git a/include/net/dst.h b/include/net/dst.h index a73a2d045..50b3373dd 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -35,7 +35,6 @@ struct dst_entry atomic_t use; /* client references */ struct device *dev; int obsolete; - __u32 priority; unsigned long lastuse; unsigned mxlock; unsigned window; diff --git a/include/net/flow.h b/include/net/flow.h index 7759e506c..45d232fb9 100644 --- a/include/net/flow.h +++ b/include/net/flow.h @@ -21,6 +21,10 @@ struct flowi { struct in6_addr * saddr; } ip6_u; } nl_u; +#define fl6_dst nl_u.ip6_u.daddr +#define fl6_src nl_u.ip6_u.saddr +#define fl4_dst nl_u.ip4_u.daddr +#define fl4_src nl_u.ip4_u.saddr int oif; diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 5bd90dde7..905876d00 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h @@ -23,7 +23,8 @@ struct rt6_info; -struct fib6_node { +struct fib6_node +{ struct fib6_node *parent; struct fib6_node *left; struct fib6_node *right; @@ -43,12 +44,14 @@ struct fib6_node { * */ -struct rt6key { +struct rt6key +{ struct in6_addr addr; int plen; }; -struct rt6_info { +struct rt6_info +{ union { struct dst_entry dst; struct rt6_info *next; @@ -56,21 +59,16 @@ struct rt6_info { #define rt6i_dev u.dst.dev #define rt6i_nexthop u.dst.neighbour -#define rt6i_use u.dst.use -#define rt6i_ref u.dst.refcnt - -#define rt6i_tstamp u.dst.lastuse struct fib6_node *rt6i_node; struct in6_addr rt6i_gateway; - int rt6i_keylen; - u32 rt6i_flags; u32 rt6i_metric; u8 rt6i_hoplimit; unsigned long rt6i_expires; + atomic_t rt6i_ref; union { struct flow_rule *rt6iu_flowr; @@ -84,6 +82,33 @@ struct rt6_info { struct rt6key rt6i_src; }; +struct fib6_walker_t +{ + struct fib6_walker_t *prev, *next; + struct fib6_node *root, *node; + struct rt6_info *leaf; + unsigned char state; + unsigned char prune; + int (*func)(struct fib6_walker_t *); + void *args; +}; + +extern struct fib6_walker_t fib6_walker_list; + +extern __inline__ void fib6_walker_link(struct fib6_walker_t *w) +{ + w->next = fib6_walker_list.next; + w->prev = &fib6_walker_list; + w->next->prev = w; + w->prev->next = w; +} + +extern __inline__ void fib6_walker_unlink(struct fib6_walker_t *w) +{ + w->next->prev = w->prev; + w->prev->next = w->next; + w->prev = w->next = w; +} struct rt6_statistics { __u32 fib_nodes; @@ -97,8 +122,6 @@ struct rt6_statistics { #define RTN_ROOT 0x0002 /* tree root node */ #define RTN_RTINFO 0x0004 /* node with valid routing info */ -#define RTN_TAG 0x0100 - /* * priority levels (or metrics) * @@ -128,11 +151,16 @@ extern struct fib6_node *fib6_lookup(struct fib6_node *root, struct in6_addr *daddr, struct in6_addr *saddr); -#define RT6_FILTER_RTNODES 1 +struct fib6_node *fib6_locate(struct fib6_node *root, + struct in6_addr *daddr, int dst_len, + struct in6_addr *saddr, int src_len); + +extern void fib6_clean_tree(struct fib6_node *root, + int (*func)(struct rt6_info *, void *arg), + int prune, void *arg); -extern void fib6_walk_tree(struct fib6_node *root, - f_pnode func, void *arg, - int filter); +extern int fib6_walk(struct fib6_walker_t *w); +extern int fib6_walk_continue(struct fib6_walker_t *w); extern int fib6_add(struct fib6_node *root, struct rt6_info *rt); diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 8ca62a7ed..9311cc34e 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h @@ -12,23 +12,6 @@ #include <net/flow.h> #include <net/ip6_fib.h> -/* - * Structure for assync processing of operations on the routing - * table - */ - -struct rt6_req { - int operation; - struct rt6_info *ptr; - - struct rt6_req *next; - struct rt6_req *prev; - -#define RT_OPER_ADD 1 -#define RT_OPER_DEL 2 -}; - - struct pol_chain { int type; int priority; @@ -53,8 +36,7 @@ extern void ip6_route_cleanup(void); extern int ipv6_route_ioctl(unsigned int cmd, void *arg); -extern struct rt6_info * ip6_route_add(struct in6_rtmsg *rtmsg, - int *err); +extern int ip6_route_add(struct in6_rtmsg *rtmsg); extern int ip6_del_rt(struct rt6_info *); extern int ip6_rt_addr_add(struct in6_addr *addr, @@ -85,15 +67,15 @@ extern struct rt6_info * rt6_add_dflt_router(struct in6_addr *gwaddr, extern void rt6_purge_dflt_routers(int lst_resort); -extern struct rt6_info * rt6_redirect(struct in6_addr *dest, +extern void rt6_redirect(struct in6_addr *dest, struct in6_addr *saddr, - struct in6_addr *target, - struct device *dev, + struct neighbour *neigh, int on_link); -extern void rt6_pmtu_discovery(struct in6_addr *addr, +extern void rt6_pmtu_discovery(struct in6_addr *daddr, + struct in6_addr *saddr, struct device *dev, - int pmtu); + u32 pmtu); struct nlmsghdr; struct netlink_callback; @@ -103,22 +85,25 @@ extern int inet6_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *a extern int inet6_rtm_getroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg); extern void rt6_ifdown(struct device *dev); +extern void rt6_mtu_change(struct device *dev, unsigned mtu); /* * Store a destination cache entry in a socket * For UDP/RAW sockets this is done on udp_connect. */ -extern __inline__ void ip6_dst_store(struct sock *sk, struct dst_entry *dst) +extern __inline__ void ip6_dst_store(struct sock *sk, struct dst_entry *dst, + struct in6_addr *daddr) { struct ipv6_pinfo *np; struct rt6_info *rt; - + np = &sk->net_pinfo.af_inet6; dst_release(xchg(&sk->dst_cache,dst)); - + rt = (struct rt6_info *) dst; - + + np->daddr_cache = daddr; np->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0; } diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index f96fa618c..b79e4d0fb 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h @@ -212,7 +212,7 @@ extern int fib_semantic_match(int type, struct fib_info *, extern struct fib_info *fib_create_info(const struct rtmsg *r, struct kern_rta *rta, const struct nlmsghdr *, int *err); extern int fib_nh_match(struct rtmsg *r, struct nlmsghdr *, struct kern_rta *rta, struct fib_info *fi); -extern int fib_dump_info(struct sk_buff *skb, pid_t pid, u32 seq, int event, +extern int fib_dump_info(struct sk_buff *skb, u32 pid, u32 seq, int event, u8 tb_id, u8 type, u8 scope, void *dst, int dst_len, u8 tos, struct fib_info *fi); extern int fib_sync_down(u32 local, struct device *dev, int force); diff --git a/include/net/ipv6.h b/include/net/ipv6.h index acf37b357..03f30b644 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -4,7 +4,7 @@ * Authors: * Pedro Roque <roque@di.fc.ul.pt> * - * $Id: ipv6.h,v 1.12 1998/07/15 05:05:02 davem Exp $ + * $Id: ipv6.h,v 1.13 1998/08/26 12:02:11 davem Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -86,53 +86,44 @@ struct frag_hdr { #include <net/sock.h> -extern struct ipv6_mib ipv6_statistics; +extern struct ipv6_mib ipv6_statistics; +extern struct icmpv6_mib icmpv6_statistics; +extern struct udp_mib udp_stats_in6; -struct ipv6_frag { - __u16 offset; - __u16 len; - struct sk_buff *skb; - - struct frag_hdr *fhdr; - - struct ipv6_frag *next; +struct ip6_ra_chain +{ + struct ip6_ra_chain *next; + struct sock *sk; + int sel; + void (*destructor)(struct sock *); }; +extern struct ip6_ra_chain *ip6_ra_chain; + /* - * Equivalent of ipv4 struct ipq + This structure is prepared by protocol, when parsing + ancillary data and passed to IPv6. */ -struct frag_queue { +struct ipv6_txoptions +{ + /* Length of this structure */ + int tot_len; - struct frag_queue *next; - struct frag_queue *prev; + /* length of extension headers */ - __u32 id; /* fragment id */ - struct in6_addr saddr; - struct in6_addr daddr; - struct timer_list timer; /* expire timer */ - struct ipv6_frag *fragments; - struct device *dev; - __u8 last_in; /* has last segment arrived? */ - __u8 nexthdr; - __u8 *nhptr; -}; + __u16 opt_flen; /* after fragment hdr */ + __u16 opt_nflen; /* before fragment hdr */ -struct ipv6_tlvtype -{ - u8 type; - u8 len; -}; + struct ipv6_opt_hdr *hopopt; + struct ipv6_opt_hdr *dst0opt; + struct ipv6_rt_hdr *srcrt; /* Routing Header */ + struct ipv6_opt_hdr *auth; + struct ipv6_opt_hdr *dst1opt; -struct ip6_ra_chain -{ - struct ip6_ra_chain *next; - struct sock *sk; - int sel; - void (*destructor)(struct sock *); + /* Option buffer, as read by IPV6_PKTOPTIONS, starts here. */ }; -extern struct ip6_ra_chain *ip6_ra_chain; extern int ip6_ra_control(struct sock *sk, int sel, void (*destructor)(struct sock *)); @@ -140,18 +131,13 @@ extern int ip6_ra_control(struct sock *sk, int sel, extern int ip6_call_ra_chain(struct sk_buff *skb, int sel); -extern int ip6_dstopt_unknown(struct sk_buff *skb, - struct ipv6_tlvtype *hdr); +extern u8 * ipv6_reassembly(struct sk_buff **skb, u8 *nhptr); -extern int ipv6_routing_header(struct sk_buff **skb, - struct device *dev, - __u8 *nhptr, - struct ipv6_options *opt); +extern u8 * ipv6_parse_hopopts(struct sk_buff *skb, u8 *nhptr); -extern int ipv6_reassembly(struct sk_buff **skb, - struct device *dev, - __u8 *nhptr, - struct ipv6_options *opt); +extern u8 * ipv6_parse_exthdrs(struct sk_buff **skb, u8 *nhptr); + +extern struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt); #define IPV6_FRAG_TIMEOUT (60*HZ) /* 60 seconds */ @@ -226,7 +212,7 @@ extern int ipv6_rcv(struct sk_buff *skb, extern int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl, - struct ipv6_options *opt); + struct ipv6_txoptions *opt); extern int ip6_nd_hdr(struct sock *sk, struct sk_buff *skb, @@ -240,7 +226,7 @@ extern int ip6_build_xmit(struct sock *sk, const void *data, struct flowi *fl, unsigned length, - struct ipv6_options *opt, + struct ipv6_txoptions *opt, int hlimit, int flags); /* @@ -256,28 +242,27 @@ extern int ip6_mc_input(struct sk_buff *skb); * Extension header (options) processing */ -extern int ipv6opt_bld_rthdr(struct sk_buff *skb, - struct ipv6_options *opt, - struct in6_addr *addr, - int proto); - -extern int ipv6opt_srcrt_co(struct sockaddr_in6 *sin6, - int len, - struct ipv6_options *opt); - -extern int ipv6opt_srcrt_cl(struct sockaddr_in6 *sin6, - int num_addrs, - struct ipv6_options *opt); - -extern int ipv6opt_srt_tosin(struct ipv6_options *opt, - struct sockaddr_in6 *sin6, - int len); - -extern void ipv6opt_free(struct ipv6_options *opt); - -extern struct ipv6_opt_hdr * ipv6_skip_exthdr(struct ipv6_opt_hdr *hdr, +extern u8 * ipv6_build_nfrag_opts(struct sk_buff *skb, + u8 *prev_hdr, + struct ipv6_txoptions *opt, + struct in6_addr *daddr, + u32 jumbolen); +extern u8 * ipv6_build_frag_opts(struct sk_buff *skb, + u8 *prev_hdr, + struct ipv6_txoptions *opt); +extern void ipv6_push_nfrag_opts(struct sk_buff *skb, + struct ipv6_txoptions *opt, + u8 *proto, + struct in6_addr **daddr_p); +extern void ipv6_push_frag_opts(struct sk_buff *skb, + struct ipv6_txoptions *opt, + u8 *proto); + +extern u8 * ipv6_skip_exthdr(struct ipv6_opt_hdr *hdr, u8 *nexthdrp, int len); +extern struct ipv6_txoptions * ipv6_invert_rthdr(struct sock *sk, + struct ipv6_rt_hdr *hdr); /* diff --git a/include/net/ndisc.h b/include/net/ndisc.h index 8ca371336..7a51f367a 100644 --- a/include/net/ndisc.h +++ b/include/net/ndisc.h @@ -60,12 +60,7 @@ extern int ndisc_init(struct net_proto_family *ops); extern void ndisc_cleanup(void); -extern int ndisc_rcv(struct sk_buff *skb, - struct device *dev, - struct in6_addr *saddr, - struct in6_addr *daddr, - struct ipv6_options *opt, - unsigned short len); +extern int ndisc_rcv(struct sk_buff *skb, unsigned long len); extern void ndisc_send_ns(struct device *dev, struct neighbour *neigh, diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index de7c7691a..142f7b3c7 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -147,12 +147,12 @@ extern psched_time_t psched_time_base; #if PSCHED_CLOCK_SOURCE == PSCHED_JIFFIES -#define PSCHED_WATCHER +#define PSCHED_WATCHER unsigned long -extern unsigned long psched_time_mark; +extern PSCHED_WATCHER psched_time_mark; #if HZ == 100 -#define PSCHED_JSCALE 7 +#define PSCHED_JSCALE 13 #elif HZ == 1024 #define PSCHED_JSCALE 10 #else @@ -179,9 +179,9 @@ extern int psched_clock_scale; #elif defined (__alpha__) -#define PSCHED_WATCHER +#define PSCHED_WATCHER u32 -extern u32 psched_time_mark; +extern PSCHED_WATCHER psched_time_mark; #define PSCHED_GET_TIME(stamp) \ ({ u32 __res; \ diff --git a/include/net/protocol.h b/include/net/protocol.h index 63d562a98..f6e947b1f 100644 --- a/include/net/protocol.h +++ b/include/net/protocol.h @@ -48,17 +48,13 @@ struct inet_protocol #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) struct inet6_protocol { - int (*handler)(struct sk_buff *skb, struct device *dev, - struct in6_addr *saddr, - struct in6_addr *daddr, - struct ipv6_options *opt, - unsigned short len, - int redo, struct inet6_protocol *protocol); + int (*handler)(struct sk_buff *skb, + unsigned long len); - void (*err_handler)(struct sk_buff *skb, int type, int code, unsigned char *buff, - __u32 info, struct in6_addr *saddr, - struct in6_addr *daddr, - struct inet6_protocol *protocol); + void (*err_handler)(struct sk_buff *skb, struct ipv6hdr *hdr, + struct inet6_skb_parm *opt, + int type, int code, unsigned char *buff, + __u32 info); struct inet6_protocol *next; unsigned char protocol; unsigned char copy:1; diff --git a/include/net/rawv6.h b/include/net/rawv6.h index 36373719f..d54572d1f 100644 --- a/include/net/rawv6.h +++ b/include/net/rawv6.h @@ -10,19 +10,17 @@ extern struct sock *raw_v6_htable[RAWV6_HTABLE_SIZE]; extern struct sock *raw_v6_lookup(struct sock *sk, unsigned short num, struct in6_addr *loc_addr, struct in6_addr *rmt_addr); -extern int rawv6_rcv(struct sk_buff *skb, - struct device *dev, - struct in6_addr *saddr, - struct in6_addr *daddr, - struct ipv6_options *opt, - unsigned short len); +extern int rawv6_rcv(struct sock *sk, + struct sk_buff *skb, + unsigned long len); extern void rawv6_err(struct sock *sk, + struct sk_buff *skb, + struct ipv6hdr *hdr, + struct inet6_skb_parm *opt, int type, int code, - unsigned char *buff, - struct in6_addr *saddr, - struct in6_addr *daddr); + unsigned char *buff, u32 info); #endif diff --git a/include/net/route.h b/include/net/route.h index 624fd233a..bd76d033b 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -27,6 +27,11 @@ #include <net/dst.h> #include <linux/in_route.h> #include <linux/rtnetlink.h> +#include <linux/route.h> + +#ifndef __KERNEL__ +#warning This file is not supposed to be used outside of kernel. +#endif #define RT_HASH_DIVISOR 256 @@ -36,7 +41,6 @@ */ #define RT_CACHE_BUBBLE_THRESHOLD (5*HZ) -#include <linux/route.h> #define RTO_ONLINK 0x01 #define RTO_TPROXY 0x80000000 @@ -87,7 +91,8 @@ struct rtable #endif }; -#ifdef __KERNEL__ +extern struct rtable *rt_hash_table[RT_HASH_DIVISOR]; + extern void ip_rt_init(void); extern void ip_rt_redirect(u32 old_gw, u32 dst, u32 new_gw, u32 src, u8 tos, struct device *dev); @@ -131,7 +136,4 @@ extern __inline__ int ip_route_connect(struct rtable **rp, u32 dst, u32 src, u32 return ip_route_output(rp, dst, src, tos, oif); } -#endif - - #endif /* _ROUTE_H */ diff --git a/include/net/snmp.h b/include/net/snmp.h index eeeeb6aa2..e38826d0b 100644 --- a/include/net/snmp.h +++ b/include/net/snmp.h @@ -52,11 +52,14 @@ struct ipv6_mib { unsigned long Ip6InReceives; unsigned long Ip6InHdrErrors; + unsigned long Ip6InTooBigErrors; + unsigned long Ip6InNoRoutes; unsigned long Ip6InAddrErrors; - unsigned long Ip6ForwDatagrams; unsigned long Ip6InUnknownProtos; + unsigned long Ip6InTruncatedPkts; unsigned long Ip6InDiscards; unsigned long Ip6InDelivers; + unsigned long Ip6OutForwDatagrams; unsigned long Ip6OutRequests; unsigned long Ip6OutDiscards; unsigned long Ip6OutNoRoutes; @@ -67,6 +70,8 @@ struct ipv6_mib unsigned long Ip6FragOKs; unsigned long Ip6FragFails; unsigned long Ip6FragCreates; + unsigned long Ip6InMcastPkts; + unsigned long Ip6OutMcastPkts; }; struct icmp_mib @@ -98,6 +103,43 @@ struct icmp_mib unsigned long IcmpOutAddrMasks; unsigned long IcmpOutAddrMaskReps; }; + +struct icmpv6_mib +{ + unsigned long Icmp6InMsgs; + unsigned long Icmp6InErrors; + + unsigned long Icmp6InDestUnreachs; + unsigned long Icmp6InPktTooBigs; + unsigned long Icmp6InTimeExcds; + unsigned long Icmp6InParmProblems; + + unsigned long Icmp6InEchos; + unsigned long Icmp6InEchoReplies; + unsigned long Icmp6InGroupMembQueries; + unsigned long Icmp6InGroupMembResponses; + unsigned long Icmp6InGroupMembReductions; + unsigned long Icmp6InRouterSolicits; + unsigned long Icmp6InRouterAdvertisements; + unsigned long Icmp6InNeighborSolicits; + unsigned long Icmp6InNeighborAdvertisements; + unsigned long Icmp6InRedirects; + + unsigned long Icmp6OutMsgs; + + unsigned long Icmp6OutDestUnreachs; + unsigned long Icmp6OutPktTooBigs; + unsigned long Icmp6OutTimeExcds; + unsigned long Icmp6OutParmProblems; + + unsigned long Icmp6OutEchoReplies; + unsigned long Icmp6OutRouterSolicits; + unsigned long Icmp6OutNeighborSolicits; + unsigned long Icmp6OutNeighborAdvertisements; + unsigned long Icmp6OutRedirects; + unsigned long Icmp6OutGroupMembResponses; + unsigned long Icmp6OutGroupMembReductions; +}; struct tcp_mib { @@ -131,6 +173,9 @@ struct linux_mib unsigned long SyncookiesRecv; unsigned long SyncookiesFailed; unsigned long EmbryonicRsts; + unsigned long PruneCalled; + unsigned long RcvPruned; + unsigned long OfoPruned; }; #endif diff --git a/include/net/sock.h b/include/net/sock.h index ed05e12be..ad27511c2 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -87,6 +87,8 @@ #include <asm/atomic.h> +#define MIN_WRITE_SPACE 2048 + /* The AF_UNIX specific socket options */ struct unix_opt { int family; @@ -134,6 +136,7 @@ struct ipv6_pinfo { struct in6_addr saddr; struct in6_addr rcv_saddr; struct in6_addr daddr; + struct in6_addr *daddr_cache; __u32 flow_lbl; int hop_limit; @@ -141,21 +144,28 @@ struct ipv6_pinfo { int mcast_oif; __u8 priority; - - /* sockopt flags */ - - __u8 recvsrcrt:1, - rxinfo:1, + /* pktoption flags */ + union { + struct { + __u8 srcrt:2, + rxinfo:1, rxhlim:1, hopopts:1, dstopts:1, - mc_loop:1, - unused:2; + authhdr:1, + unused:1; + } bits; + __u8 all; + } rxopt; + + /* sockopt flags */ + __u8 mc_loop:1; struct ipv6_mc_socklist *ipv6_mc_list; __u32 dst_cookie; - struct ipv6_options *opt; + struct ipv6_txoptions *opt; + struct sk_buff *pktoptions; }; struct raw6_opt { @@ -207,6 +217,10 @@ struct tcp_opt { __u32 snd_wl2; /* Ack sequence for update */ __u32 snd_wnd; /* The window we expect to receive */ __u32 max_window; + __u32 pmtu_cookie; /* Last pmtu seen by socket */ + __u16 mss_cache; /* Cached effective mss, not including SACKS */ + __u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ + __u16 ext_header_len; /* Dave, do you allow mw to use this hole? 8) --ANK */ __u8 pending; /* pending events */ __u8 retransmits; __u32 last_ack_sent; /* last ack we sent */ @@ -226,6 +240,7 @@ struct tcp_opt { __u32 snd_ssthresh; /* Slow start size threshold */ __u8 dup_acks; /* Consequetive duplicate acks seen from other end */ __u8 delayed_acks; + __u16 user_mss; /* mss requested by user in ioctl */ /* Two commonly used timers in both sender and receiver paths. */ struct timer_list retransmit_timer; /* Resend (no ack) */ @@ -252,7 +267,6 @@ struct tcp_opt { wscale_ok, /* Wscale seen on SYN packet */ sack_ok; /* SACK seen on SYN packet */ char saw_tstamp; /* Saw TIMESTAMP on last packet */ - __u16 in_mss; /* MSS option received from sender */ __u8 snd_wscale; /* Window scaling received from sender */ __u8 rcv_wscale; /* Window scaling to send to receiver */ __u32 rcv_tsval; /* Time stamp value */ @@ -270,6 +284,9 @@ struct tcp_opt { __u32 urg_seq; __u32 urg_data; + __u32 last_seg_size; /* Size of last incoming segment */ + __u32 rcv_mss; /* MSS used for delayed ACK decisions */ + struct open_request *syn_wait_queue; struct open_request **syn_wait_last; @@ -350,7 +367,7 @@ struct sock { unsigned char reuse, /* SO_REUSEADDR setting */ nonagle; /* Disable Nagle algorithm? */ - int sock_readers; /* User count */ + atomic_t sock_readers; /* User count */ int rcvbuf; /* Size of receive buffer in bytes */ struct wait_queue **sleep; /* Sock wait queue */ @@ -390,12 +407,6 @@ struct sock { struct proto *prot; - /* mss is min(mtu, max_window) - * XXX Fix this, mtu only used in one TCP place and that is it -DaveM - */ - unsigned short mtu; /* mss negotiated in the syn's */ - unsigned short mss; /* current eff. mss - can change */ - unsigned short user_mss; /* mss requested by user in ioctl */ unsigned short shutdown; #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) @@ -643,42 +654,20 @@ static inline void lock_sock(struct sock *sk) #if 0 /* debugging code: the test isn't even 100% correct, but it can catch bugs */ /* Note that a double lock is ok in theory - it's just _usually_ a bug */ - if (sk->sock_readers) { + if (atomic_read(&sk->sock_readers)) { __label__ here; printk("double lock on socket at %p\n", &&here); here: } #endif -#ifdef __SMP__ - /* - * This is a very broken bottom half synchronization mechanism. - * You don't want to know.. - */ - { unsigned long flags; - save_flags(flags); - cli(); - sk->sock_readers++; - restore_flags(flags); - } -#else - sk->sock_readers++; - barrier(); -#endif + atomic_inc(&sk->sock_readers); + synchronize_bh(); } static inline void release_sock(struct sock *sk) { barrier(); -#if 0 -/* debugging code: remove me when ok */ - if (sk->sock_readers == 0) { - __label__ here; - sk->sock_readers = 1; - printk("trying to unlock unlocked socket at %p\n", &&here); -here: - } -#endif - if ((sk->sock_readers = sk->sock_readers-1) == 0) + if (atomic_dec_and_test(&sk->sock_readers)) __release_sock(sk); } @@ -890,6 +879,26 @@ extern __inline__ int sock_error(struct sock *sk) return -err; } +extern __inline__ unsigned long sock_wspace(struct sock *sk) +{ + int amt = 0; + + if (!(sk->shutdown & SEND_SHUTDOWN)) { + amt = sk->sndbuf - atomic_read(&sk->wmem_alloc); + if (amt < 0) + amt = 0; + } + return amt; +} + +/* + * Default write policy as shown to user space via poll/select/SIGIO + * Kernel internally doesn't use the MIN_WRITE_SPACE threshold. + */ +extern __inline__ int sock_writeable(struct sock *sk) +{ + return sock_wspace(sk) >= MIN_WRITE_SPACE; +} /* * Declarations from timer.c diff --git a/include/net/tcp.h b/include/net/tcp.h index 225d40ad0..3f305aa7e 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -78,6 +78,7 @@ struct tcp_bind_bucket { unsigned short flags; #define TCPB_FLAG_LOCKED 0x0001 #define TCPB_FLAG_FASTREUSE 0x0002 +#define TCPB_FLAG_GOODSOCKNUM 0x0004 struct tcp_bind_bucket *next; struct sock *owners; @@ -230,11 +231,8 @@ static __inline__ int tcp_sk_listen_hashfn(struct sock *sk) return tcp_lhashfn(sk->num); } -#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) -#define NETHDR_SIZE sizeof(struct ipv6hdr) -#else -#define NETHDR_SIZE sizeof(struct iphdr) + 40 -#endif +/* Note, that it is > than ipv6 header */ +#define NETHDR_SIZE (sizeof(struct iphdr) + 40) /* * 40 is maximal IP options size @@ -257,7 +255,6 @@ static __inline__ int tcp_sk_listen_hashfn(struct sock *sk) #define MIN_WINDOW 2048 #define MAX_ACK_BACKLOG 2 #define MAX_DELAY_ACK 2 -#define MIN_WRITE_SPACE 2048 #define TCP_WINDOW_DIFF 2048 /* urg_data states */ @@ -354,7 +351,7 @@ struct tcp_v4_open_req { struct tcp_v6_open_req { struct in6_addr loc_addr; struct in6_addr rmt_addr; - struct ipv6_options *opt; + struct sk_buff *pktopts; int iif; }; #endif @@ -400,6 +397,13 @@ extern kmem_cache_t *tcp_openreq_cachep; /* * Pointers to address related TCP functions * (i.e. things that depend on the address family) + * + * BUGGG_FUTURE: all the idea behind this struct is wrong. + * It mixes socket frontend with transport function. + * With port sharing between IPv6/v4 it gives the only advantage, + * only poor IPv6 needs to permanently recheck, that it + * is still IPv6 8)8) It must be cleaned up as soon as possible. + * --ANK (980802) */ struct tcp_func { @@ -414,7 +418,7 @@ struct tcp_func { int (*conn_request) (struct sock *sk, struct sk_buff *skb, - void *opt, __u32 isn); + __u32 isn); struct sock * (*syn_recv_sock) (struct sock *sk, struct sk_buff *skb, @@ -424,6 +428,10 @@ struct tcp_func { struct sock * (*get_sock) (struct sk_buff *skb, struct tcphdr *th); + __u16 net_header_len; + + + int (*setsockopt) (struct sock *sk, int level, int optname, @@ -490,22 +498,24 @@ extern int tcp_ioctl(struct sock *sk, extern int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, struct tcphdr *th, - void *opt, __u16 len); + unsigned len); extern int tcp_rcv_established(struct sock *sk, struct sk_buff *skb, struct tcphdr *th, - __u16 len); + unsigned len); extern int tcp_timewait_state_process(struct tcp_tw_bucket *tw, struct sk_buff *skb, struct tcphdr *th, - void *opt, __u16 len); + unsigned len); extern void tcp_close(struct sock *sk, unsigned long timeout); extern struct sock * tcp_accept(struct sock *sk, int flags); extern unsigned int tcp_poll(struct file * file, struct socket *sock, struct poll_table_struct *wait); +extern void tcp_write_space(struct sock *sk); + extern int tcp_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen); @@ -536,12 +546,11 @@ extern void tcp_v4_send_check(struct sock *sk, extern int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb, - void *ptr, __u32 isn); + __u32 isn); extern struct sock * tcp_create_openreq_child(struct sock *sk, struct open_request *req, - struct sk_buff *skb, - int mss); + struct sk_buff *skb); extern struct sock * tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb, @@ -628,30 +637,25 @@ struct tcp_sl_timer { extern struct tcp_sl_timer tcp_slt_array[TCP_SLT_MAX]; +extern int tcp_sync_mss(struct sock *sk, u32 pmtu); + /* Compute the current effective MSS, taking SACKs and IP options, * and even PMTU discovery events into account. */ + static __inline__ unsigned int tcp_current_mss(struct sock *sk) { struct tcp_opt *tp = &sk->tp_pinfo.af_tcp; struct dst_entry *dst = sk->dst_cache; - unsigned int mss_now = sk->mss; + int mss_now = tp->mss_cache; - if(dst && (sk->mtu < dst->pmtu)) { - unsigned int mss_distance = (sk->mtu - sk->mss); - - /* PMTU discovery event has occurred. */ - sk->mtu = dst->pmtu; - mss_now = sk->mss = sk->mtu - mss_distance; - } + if (dst && dst->pmtu != tp->pmtu_cookie) + mss_now = tcp_sync_mss(sk, dst->pmtu); if(tp->sack_ok && tp->num_sacks) mss_now -= (TCPOLEN_SACK_BASE_ALIGNED + (tp->num_sacks * TCPOLEN_SACK_PERBLOCK)); - if(sk->opt) - mss_now -= sk->opt->optlen; - - return mss_now; + return mss_now > 8 ? mss_now : 8; } /* Compute the actual receive window we are currently advertising. @@ -715,7 +719,12 @@ extern __inline__ int tcp_raise_window(struct sock *sk) * skbuff.h:skbuff->cb[xxx] size appropriately. */ struct tcp_skb_cb { - struct inet_skb_parm header; /* For incoming frames */ + union { + struct inet_skb_parm h4; +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) + struct inet6_skb_parm h6; +#endif + } header; /* For incoming frames */ __u32 seq; /* Starting sequence number */ __u32 end_seq; /* SEQ + FIN + SYN + datalen */ unsigned long when; /* used to compute rtt's */ @@ -787,7 +796,7 @@ static __inline__ int tcp_snd_test(struct sock *sk, struct sk_buff *skb) * * Don't use the nagle rule for urgent data. */ - if (!sk->nonagle && skb->len < (sk->mss >> 1) && tp->packets_out && + if (!sk->nonagle && skb->len < (tp->mss_cache >> 1) && tp->packets_out && !(TCP_SKB_CB(skb)->flags & TCPCB_FLAG_URG)) nagle_check = 0; @@ -913,8 +922,6 @@ extern __inline__ void tcp_syn_build_options(__u32 *ptr, int mss, int ts, int sa * SACKs don't matter, we never delay an ACK when we * have any of those going out. */ - if(ts) - mss += TCPOLEN_TSTAMP_ALIGNED; *ptr++ = htonl((TCPOPT_MSS << 24) | (TCPOLEN_MSS << 16) | mss); if (ts) { if(sack) diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index 45bdcc59d..b697d7c3c 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h @@ -28,7 +28,7 @@ extern int datagram_recv_ctl(struct sock *sk, extern int datagram_send_ctl(struct msghdr *msg, int *oif, struct in6_addr **src_addr, - struct ipv6_options *opt, + struct ipv6_txoptions *opt, int *hlimit); #define LOOPBACK4_IPV6 __constant_htonl(0x7f000006) @@ -38,6 +38,8 @@ extern int datagram_send_ctl(struct msghdr *msg, */ extern struct tcp_func ipv4_specific; +extern int inet6_destroy_sock(struct sock *sk); + #endif #endif |