diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-05-21 17:00:02 -0400 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-05-21 17:00:02 -0400 |
commit | 67394f8f069c2fdf90f3b6d851824c07815442af (patch) | |
tree | 0c33e62d34dbaecea434ae9ece3cc0c56db8b1f7 /include | |
parent | 450cbfbbbd88876e3ccec1d277f613221ca82bb7 (diff) | |
parent | 9636273dae265b9354b861b373cd43cd76a6d0fe (diff) |
Merge with /usr/src/ntfs-2.6.git
Diffstat (limited to 'include')
80 files changed, 797 insertions, 559 deletions
diff --git a/include/asm-arm/arch-imx/imx-regs.h b/include/asm-arm/arch-imx/imx-regs.h index f32c203952..93b840e8fa 100644 --- a/include/asm-arm/arch-imx/imx-regs.h +++ b/include/asm-arm/arch-imx/imx-regs.h | |||
@@ -228,6 +228,30 @@ | |||
228 | #define PD31_BIN_SPI2_TXD ( GPIO_PORTD | GPIO_BIN | 31 ) | 228 | #define PD31_BIN_SPI2_TXD ( GPIO_PORTD | GPIO_BIN | 31 ) |
229 | 229 | ||
230 | /* | 230 | /* |
231 | * PWM controller | ||
232 | */ | ||
233 | #define PWMC __REG(IMX_PWM_BASE + 0x00) /* PWM Control Register */ | ||
234 | #define PWMS __REG(IMX_PWM_BASE + 0x04) /* PWM Sample Register */ | ||
235 | #define PWMP __REG(IMX_PWM_BASE + 0x08) /* PWM Period Register */ | ||
236 | #define PWMCNT __REG(IMX_PWM_BASE + 0x0C) /* PWM Counter Register */ | ||
237 | |||
238 | #define PWMC_HCTR (0x01<<18) /* Halfword FIFO Data Swapping */ | ||
239 | #define PWMC_BCTR (0x01<<17) /* Byte FIFO Data Swapping */ | ||
240 | #define PWMC_SWR (0x01<<16) /* Software Reset */ | ||
241 | #define PWMC_CLKSRC (0x01<<15) /* Clock Source */ | ||
242 | #define PWMC_PRESCALER(x) (((x-1) & 0x7F) << 8) /* PRESCALER */ | ||
243 | #define PWMC_IRQ (0x01<< 7) /* Interrupt Request */ | ||
244 | #define PWMC_IRQEN (0x01<< 6) /* Interrupt Request Enable */ | ||
245 | #define PWMC_FIFOAV (0x01<< 5) /* FIFO Available */ | ||
246 | #define PWMC_EN (0x01<< 4) /* Enables/Disables the PWM */ | ||
247 | #define PWMC_REPEAT(x) (((x) & 0x03) << 2) /* Sample Repeats */ | ||
248 | #define PWMC_CLKSEL(x) (((x) & 0x03) << 0) /* Clock Selection */ | ||
249 | |||
250 | #define PWMS_SAMPLE(x) ((x) & 0xFFFF) /* Contains a two-sample word */ | ||
251 | #define PWMP_PERIOD(x) ((x) & 0xFFFF) /* Represents the PWM's period */ | ||
252 | #define PWMC_COUNTER(x) ((x) & 0xFFFF) /* Represents the current count value */ | ||
253 | |||
254 | /* | ||
231 | * DMA Controller | 255 | * DMA Controller |
232 | */ | 256 | */ |
233 | #define DCR __REG(IMX_DMAC_BASE +0x00) /* DMA Control Register */ | 257 | #define DCR __REG(IMX_DMAC_BASE +0x00) /* DMA Control Register */ |
diff --git a/include/asm-arm/arch-imx/imxfb.h b/include/asm-arm/arch-imx/imxfb.h new file mode 100644 index 0000000000..2346d454ab --- /dev/null +++ b/include/asm-arm/arch-imx/imxfb.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * This structure describes the machine which we are running on. | ||
3 | */ | ||
4 | struct imxfb_mach_info { | ||
5 | u_long pixclock; | ||
6 | |||
7 | u_short xres; | ||
8 | u_short yres; | ||
9 | |||
10 | u_char bpp; | ||
11 | u_char hsync_len; | ||
12 | u_char left_margin; | ||
13 | u_char right_margin; | ||
14 | |||
15 | u_char vsync_len; | ||
16 | u_char upper_margin; | ||
17 | u_char lower_margin; | ||
18 | u_char sync; | ||
19 | |||
20 | u_int cmap_greyscale:1, | ||
21 | cmap_inverse:1, | ||
22 | cmap_static:1, | ||
23 | unused:29; | ||
24 | |||
25 | u_int pcr; | ||
26 | u_int pwmr; | ||
27 | u_int lscr1; | ||
28 | |||
29 | u_char * fixed_screen_cpu; | ||
30 | dma_addr_t fixed_screen_dma; | ||
31 | |||
32 | void (*lcd_power)(int); | ||
33 | void (*backlight_power)(int); | ||
34 | }; | ||
35 | void set_imx_fb_info(struct imxfb_mach_info *hard_imx_fb_info); | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-nand.h b/include/asm-arm/arch-s3c2410/regs-nand.h index c443ac8346..7cff235e66 100644 --- a/include/asm-arm/arch-s3c2410/regs-nand.h +++ b/include/asm-arm/arch-s3c2410/regs-nand.h | |||
@@ -1,16 +1,17 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/regs-nand.h | 1 | /* linux/include/asm-arm/arch-s3c2410/regs-nand.h |
2 | * | 2 | * |
3 | * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk> | 3 | * Copyright (c) 2004,2005 Simtec Electronics <linux@simtec.co.uk> |
4 | * http://www.simtec.co.uk/products/SWLINUX/ | 4 | * http://www.simtec.co.uk/products/SWLINUX/ |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 clock register definitions | 10 | * S3C2410 NAND register definitions |
11 | * | 11 | * |
12 | * Changelog: | 12 | * Changelog: |
13 | * 18-Aug-2004 BJD Copied file from 2.4 and updated | 13 | * 18-Aug-2004 BJD Copied file from 2.4 and updated |
14 | * 01-May-2005 BJD Added definitions for s3c2440 controller | ||
14 | */ | 15 | */ |
15 | 16 | ||
16 | #ifndef __ASM_ARM_REGS_NAND | 17 | #ifndef __ASM_ARM_REGS_NAND |
@@ -26,6 +27,22 @@ | |||
26 | #define S3C2410_NFSTAT S3C2410_NFREG(0x10) | 27 | #define S3C2410_NFSTAT S3C2410_NFREG(0x10) |
27 | #define S3C2410_NFECC S3C2410_NFREG(0x14) | 28 | #define S3C2410_NFECC S3C2410_NFREG(0x14) |
28 | 29 | ||
30 | #define S3C2440_NFCONT S3C2410_NFREG(0x04) | ||
31 | #define S3C2440_NFCMD S3C2410_NFREG(0x08) | ||
32 | #define S3C2440_NFADDR S3C2410_NFREG(0x0C) | ||
33 | #define S3C2440_NFDATA S3C2410_NFREG(0x10) | ||
34 | #define S3C2440_NFECCD0 S3C2410_NFREG(0x14) | ||
35 | #define S3C2440_NFECCD1 S3C2410_NFREG(0x18) | ||
36 | #define S3C2440_NFECCD S3C2410_NFREG(0x1C) | ||
37 | #define S3C2440_NFSTAT S3C2410_NFREG(0x20) | ||
38 | #define S3C2440_NFESTAT0 S3C2410_NFREG(0x24) | ||
39 | #define S3C2440_NFESTAT1 S3C2410_NFREG(0x28) | ||
40 | #define S3C2440_NFMECC0 S3C2410_NFREG(0x2C) | ||
41 | #define S3C2440_NFMECC1 S3C2410_NFREG(0x30) | ||
42 | #define S3C2440_NFSECC S3C2410_NFREG(0x34) | ||
43 | #define S3C2440_NFSBLK S3C2410_NFREG(0x38) | ||
44 | #define S3C2440_NFEBLK S3C2410_NFREG(0x3C) | ||
45 | |||
29 | #define S3C2410_NFCONF_EN (1<<15) | 46 | #define S3C2410_NFCONF_EN (1<<15) |
30 | #define S3C2410_NFCONF_512BYTE (1<<14) | 47 | #define S3C2410_NFCONF_512BYTE (1<<14) |
31 | #define S3C2410_NFCONF_4STEP (1<<13) | 48 | #define S3C2410_NFCONF_4STEP (1<<13) |
@@ -37,7 +54,28 @@ | |||
37 | 54 | ||
38 | #define S3C2410_NFSTAT_BUSY (1<<0) | 55 | #define S3C2410_NFSTAT_BUSY (1<<0) |
39 | 56 | ||
40 | /* think ECC can only be 8bit read? */ | 57 | #define S3C2440_NFCONF_BUSWIDTH_8 (0<<0) |
58 | #define S3C2440_NFCONF_BUSWIDTH_16 (1<<0) | ||
59 | #define S3C2440_NFCONF_ADVFLASH (1<<3) | ||
60 | #define S3C2440_NFCONF_TACLS(x) ((x)<<12) | ||
61 | #define S3C2440_NFCONF_TWRPH0(x) ((x)<<8) | ||
62 | #define S3C2440_NFCONF_TWRPH1(x) ((x)<<4) | ||
63 | |||
64 | #define S3C2440_NFCONT_LOCKTIGHT (1<<13) | ||
65 | #define S3C2440_NFCONT_SOFTLOCK (1<<12) | ||
66 | #define S3C2440_NFCONT_ILLEGALACC_EN (1<<10) | ||
67 | #define S3C2440_NFCONT_RNBINT_EN (1<<9) | ||
68 | #define S3C2440_NFCONT_RN_FALLING (1<<8) | ||
69 | #define S3C2440_NFCONT_SPARE_ECCLOCK (1<<6) | ||
70 | #define S3C2440_NFCONT_MAIN_ECCLOCK (1<<5) | ||
71 | #define S3C2440_NFCONT_INITECC (1<<4) | ||
72 | #define S3C2440_NFCONT_nFCE (1<<1) | ||
73 | #define S3C2440_NFCONT_ENABLE (1<<0) | ||
74 | |||
75 | #define S3C2440_NFSTAT_READY (1<<0) | ||
76 | #define S3C2440_NFSTAT_nCE (1<<1) | ||
77 | #define S3C2440_NFSTAT_RnB_CHANGE (1<<2) | ||
78 | #define S3C2440_NFSTAT_ILLEGAL_ACCESS (1<<3) | ||
41 | 79 | ||
42 | #endif /* __ASM_ARM_REGS_NAND */ | 80 | #endif /* __ASM_ARM_REGS_NAND */ |
43 | 81 | ||
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h index 4ca3a8e934..019c45d757 100644 --- a/include/asm-arm/page.h +++ b/include/asm-arm/page.h | |||
@@ -114,19 +114,8 @@ extern void __cpu_copy_user_page(void *to, const void *from, | |||
114 | unsigned long user); | 114 | unsigned long user); |
115 | #endif | 115 | #endif |
116 | 116 | ||
117 | #define clear_user_page(addr,vaddr,pg) \ | 117 | #define clear_user_page(addr,vaddr,pg) __cpu_clear_user_page(addr, vaddr) |
118 | do { \ | 118 | #define copy_user_page(to,from,vaddr,pg) __cpu_copy_user_page(to, from, vaddr) |
119 | preempt_disable(); \ | ||
120 | __cpu_clear_user_page(addr, vaddr); \ | ||
121 | preempt_enable(); \ | ||
122 | } while (0) | ||
123 | |||
124 | #define copy_user_page(to,from,vaddr,pg) \ | ||
125 | do { \ | ||
126 | preempt_disable(); \ | ||
127 | __cpu_copy_user_page(to, from, vaddr); \ | ||
128 | preempt_enable(); \ | ||
129 | } while (0) | ||
130 | 119 | ||
131 | #define clear_page(page) memzero((void *)(page), PAGE_SIZE) | 120 | #define clear_page(page) memzero((void *)(page), PAGE_SIZE) |
132 | extern void copy_page(void *to, const void *from); | 121 | extern void copy_page(void *to, const void *from); |
@@ -171,6 +160,9 @@ typedef unsigned long pgprot_t; | |||
171 | 160 | ||
172 | #endif /* STRICT_MM_TYPECHECKS */ | 161 | #endif /* STRICT_MM_TYPECHECKS */ |
173 | 162 | ||
163 | /* the upper-most page table pointer */ | ||
164 | extern pmd_t *top_pmd; | ||
165 | |||
174 | /* Pure 2^n version of get_order */ | 166 | /* Pure 2^n version of get_order */ |
175 | static inline int get_order(unsigned long size) | 167 | static inline int get_order(unsigned long size) |
176 | { | 168 | { |
diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h index 4a9845997a..7d4118e090 100644 --- a/include/asm-arm/processor.h +++ b/include/asm-arm/processor.h | |||
@@ -23,8 +23,6 @@ | |||
23 | #include <asm/procinfo.h> | 23 | #include <asm/procinfo.h> |
24 | #include <asm/types.h> | 24 | #include <asm/types.h> |
25 | 25 | ||
26 | #define KERNEL_STACK_SIZE PAGE_SIZE | ||
27 | |||
28 | union debug_insn { | 26 | union debug_insn { |
29 | u32 arm; | 27 | u32 arm; |
30 | u16 thumb; | 28 | u16 thumb; |
@@ -87,8 +85,9 @@ unsigned long get_wchan(struct task_struct *p); | |||
87 | */ | 85 | */ |
88 | extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | 86 | extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); |
89 | 87 | ||
90 | #define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)->thread_info))[1019]) | 88 | #define KSTK_REGS(tsk) (((struct pt_regs *)(THREAD_START_SP + (unsigned long)(tsk)->thread_info)) - 1) |
91 | #define KSTK_ESP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)->thread_info))[1017]) | 89 | #define KSTK_EIP(tsk) KSTK_REGS(tsk)->ARM_pc |
90 | #define KSTK_ESP(tsk) KSTK_REGS(tsk)->ARM_sp | ||
92 | 91 | ||
93 | /* | 92 | /* |
94 | * Prefetching support - only ARMv5. | 93 | * Prefetching support - only ARMv5. |
diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h index a61618fb43..66c585c50c 100644 --- a/include/asm-arm/thread_info.h +++ b/include/asm-arm/thread_info.h | |||
@@ -14,6 +14,10 @@ | |||
14 | 14 | ||
15 | #include <asm/fpstate.h> | 15 | #include <asm/fpstate.h> |
16 | 16 | ||
17 | #define THREAD_SIZE_ORDER 1 | ||
18 | #define THREAD_SIZE 8192 | ||
19 | #define THREAD_START_SP (THREAD_SIZE - 8) | ||
20 | |||
17 | #ifndef __ASSEMBLY__ | 21 | #ifndef __ASSEMBLY__ |
18 | 22 | ||
19 | struct task_struct; | 23 | struct task_struct; |
@@ -77,8 +81,6 @@ struct thread_info { | |||
77 | #define init_thread_info (init_thread_union.thread_info) | 81 | #define init_thread_info (init_thread_union.thread_info) |
78 | #define init_stack (init_thread_union.stack) | 82 | #define init_stack (init_thread_union.stack) |
79 | 83 | ||
80 | #define THREAD_SIZE 8192 | ||
81 | |||
82 | /* | 84 | /* |
83 | * how to get the thread information struct from C | 85 | * how to get the thread information struct from C |
84 | */ | 86 | */ |
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 976ac29598..195ccdc069 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h | |||
@@ -8,6 +8,8 @@ extern char _data[], _sdata[], _edata[]; | |||
8 | extern char __bss_start[], __bss_stop[]; | 8 | extern char __bss_start[], __bss_stop[]; |
9 | extern char __init_begin[], __init_end[]; | 9 | extern char __init_begin[], __init_end[]; |
10 | extern char _sinittext[], _einittext[]; | 10 | extern char _sinittext[], _einittext[]; |
11 | extern char _sextratext[] __attribute__((weak)); | ||
12 | extern char _eextratext[] __attribute__((weak)); | ||
11 | extern char _end[]; | 13 | extern char _end[]; |
12 | 14 | ||
13 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ | 15 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ |
diff --git a/include/asm-i386/floppy.h b/include/asm-i386/floppy.h index f478228480..79727afb94 100644 --- a/include/asm-i386/floppy.h +++ b/include/asm-i386/floppy.h | |||
@@ -257,7 +257,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) | |||
257 | return 0; | 257 | return 0; |
258 | } | 258 | } |
259 | 259 | ||
260 | struct fd_routine_l { | 260 | static struct fd_routine_l { |
261 | int (*_request_dma)(unsigned int dmanr, const char * device_id); | 261 | int (*_request_dma)(unsigned int dmanr, const char * device_id); |
262 | void (*_free_dma)(unsigned int dmanr); | 262 | void (*_free_dma)(unsigned int dmanr); |
263 | int (*_get_dma_residue)(unsigned int dummy); | 263 | int (*_get_dma_residue)(unsigned int dummy); |
diff --git a/include/asm-i386/module.h b/include/asm-i386/module.h index 508865e263..eb7f2b4234 100644 --- a/include/asm-i386/module.h +++ b/include/asm-i386/module.h | |||
@@ -52,8 +52,8 @@ struct mod_arch_specific | |||
52 | #define MODULE_PROC_FAMILY "CYRIXIII " | 52 | #define MODULE_PROC_FAMILY "CYRIXIII " |
53 | #elif defined CONFIG_MVIAC3_2 | 53 | #elif defined CONFIG_MVIAC3_2 |
54 | #define MODULE_PROC_FAMILY "VIAC3-2 " | 54 | #define MODULE_PROC_FAMILY "VIAC3-2 " |
55 | #elif CONFIG_MGEODE | 55 | #elif CONFIG_MGEODEGX1 |
56 | #define MODULE_PROC_FAMILY "GEODE " | 56 | #define MODULE_PROC_FAMILY "GEODEGX1 " |
57 | #else | 57 | #else |
58 | #error unknown processor family | 58 | #error unknown processor family |
59 | #endif | 59 | #endif |
diff --git a/include/asm-ia64/ioctl32.h b/include/asm-ia64/ioctl32.h deleted file mode 100644 index d0d227f45e..0000000000 --- a/include/asm-ia64/ioctl32.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <linux/ioctl32.h> | ||
diff --git a/include/asm-parisc/floppy.h b/include/asm-parisc/floppy.h index 47f53df2ce..ca3aed768c 100644 --- a/include/asm-parisc/floppy.h +++ b/include/asm-parisc/floppy.h | |||
@@ -235,7 +235,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) | |||
235 | return 0; | 235 | return 0; |
236 | } | 236 | } |
237 | 237 | ||
238 | struct fd_routine_l { | 238 | static struct fd_routine_l { |
239 | int (*_request_dma)(unsigned int dmanr, const char * device_id); | 239 | int (*_request_dma)(unsigned int dmanr, const char * device_id); |
240 | void (*_free_dma)(unsigned int dmanr); | 240 | void (*_free_dma)(unsigned int dmanr); |
241 | int (*_get_dma_residue)(unsigned int dummy); | 241 | int (*_get_dma_residue)(unsigned int dummy); |
diff --git a/include/asm-ppc64/imalloc.h b/include/asm-ppc64/imalloc.h new file mode 100644 index 0000000000..3a45e918bf --- /dev/null +++ b/include/asm-ppc64/imalloc.h | |||
@@ -0,0 +1,24 @@ | |||
1 | #ifndef _PPC64_IMALLOC_H | ||
2 | #define _PPC64_IMALLOC_H | ||
3 | |||
4 | /* | ||
5 | * Define the address range of the imalloc VM area. | ||
6 | */ | ||
7 | #define PHBS_IO_BASE IOREGIONBASE | ||
8 | #define IMALLOC_BASE (IOREGIONBASE + 0x80000000ul) /* Reserve 2 gigs for PHBs */ | ||
9 | #define IMALLOC_END (IOREGIONBASE + EADDR_MASK) | ||
10 | |||
11 | |||
12 | /* imalloc region types */ | ||
13 | #define IM_REGION_UNUSED 0x1 | ||
14 | #define IM_REGION_SUBSET 0x2 | ||
15 | #define IM_REGION_EXISTS 0x4 | ||
16 | #define IM_REGION_OVERLAP 0x8 | ||
17 | #define IM_REGION_SUPERSET 0x10 | ||
18 | |||
19 | extern struct vm_struct * im_get_free_area(unsigned long size); | ||
20 | extern struct vm_struct * im_get_area(unsigned long v_addr, unsigned long size, | ||
21 | int region_type); | ||
22 | unsigned long im_free(void *addr); | ||
23 | |||
24 | #endif /* _PPC64_IMALLOC_H */ | ||
diff --git a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h index 188987e9d9..c78282a67d 100644 --- a/include/asm-ppc64/mmu.h +++ b/include/asm-ppc64/mmu.h | |||
@@ -15,19 +15,10 @@ | |||
15 | 15 | ||
16 | #include <linux/config.h> | 16 | #include <linux/config.h> |
17 | #include <asm/page.h> | 17 | #include <asm/page.h> |
18 | #include <linux/stringify.h> | ||
19 | 18 | ||
20 | #ifndef __ASSEMBLY__ | 19 | /* |
21 | 20 | * Segment table | |
22 | /* Time to allow for more things here */ | 21 | */ |
23 | typedef unsigned long mm_context_id_t; | ||
24 | typedef struct { | ||
25 | mm_context_id_t id; | ||
26 | #ifdef CONFIG_HUGETLB_PAGE | ||
27 | pgd_t *huge_pgdir; | ||
28 | u16 htlb_segs; /* bitmask */ | ||
29 | #endif | ||
30 | } mm_context_t; | ||
31 | 22 | ||
32 | #define STE_ESID_V 0x80 | 23 | #define STE_ESID_V 0x80 |
33 | #define STE_ESID_KS 0x20 | 24 | #define STE_ESID_KS 0x20 |
@@ -36,15 +27,48 @@ typedef struct { | |||
36 | 27 | ||
37 | #define STE_VSID_SHIFT 12 | 28 | #define STE_VSID_SHIFT 12 |
38 | 29 | ||
39 | struct stab_entry { | 30 | /* Location of cpu0's segment table */ |
40 | unsigned long esid_data; | 31 | #define STAB0_PAGE 0x9 |
41 | unsigned long vsid_data; | 32 | #define STAB0_PHYS_ADDR (STAB0_PAGE<<PAGE_SHIFT) |
42 | }; | 33 | #define STAB0_VIRT_ADDR (KERNELBASE+STAB0_PHYS_ADDR) |
34 | |||
35 | /* | ||
36 | * SLB | ||
37 | */ | ||
43 | 38 | ||
44 | /* Hardware Page Table Entry */ | 39 | #define SLB_NUM_BOLTED 3 |
40 | #define SLB_CACHE_ENTRIES 8 | ||
41 | |||
42 | /* Bits in the SLB ESID word */ | ||
43 | #define SLB_ESID_V ASM_CONST(0x0000000008000000) /* valid */ | ||
44 | |||
45 | /* Bits in the SLB VSID word */ | ||
46 | #define SLB_VSID_SHIFT 12 | ||
47 | #define SLB_VSID_KS ASM_CONST(0x0000000000000800) | ||
48 | #define SLB_VSID_KP ASM_CONST(0x0000000000000400) | ||
49 | #define SLB_VSID_N ASM_CONST(0x0000000000000200) /* no-execute */ | ||
50 | #define SLB_VSID_L ASM_CONST(0x0000000000000100) /* largepage 16M */ | ||
51 | #define SLB_VSID_C ASM_CONST(0x0000000000000080) /* class */ | ||
52 | |||
53 | #define SLB_VSID_KERNEL (SLB_VSID_KP|SLB_VSID_C) | ||
54 | #define SLB_VSID_USER (SLB_VSID_KP|SLB_VSID_KS) | ||
55 | |||
56 | /* | ||
57 | * Hash table | ||
58 | */ | ||
45 | 59 | ||
46 | #define HPTES_PER_GROUP 8 | 60 | #define HPTES_PER_GROUP 8 |
47 | 61 | ||
62 | /* Values for PP (assumes Ks=0, Kp=1) */ | ||
63 | /* pp0 will always be 0 for linux */ | ||
64 | #define PP_RWXX 0 /* Supervisor read/write, User none */ | ||
65 | #define PP_RWRX 1 /* Supervisor read/write, User read */ | ||
66 | #define PP_RWRW 2 /* Supervisor read/write, User read/write */ | ||
67 | #define PP_RXRX 3 /* Supervisor read, User read */ | ||
68 | |||
69 | #ifndef __ASSEMBLY__ | ||
70 | |||
71 | /* Hardware Page Table Entry */ | ||
48 | typedef struct { | 72 | typedef struct { |
49 | unsigned long avpn:57; /* vsid | api == avpn */ | 73 | unsigned long avpn:57; /* vsid | api == avpn */ |
50 | unsigned long : 2; /* Software use */ | 74 | unsigned long : 2; /* Software use */ |
@@ -90,14 +114,6 @@ typedef struct { | |||
90 | } dw1; | 114 | } dw1; |
91 | } HPTE; | 115 | } HPTE; |
92 | 116 | ||
93 | /* Values for PP (assumes Ks=0, Kp=1) */ | ||
94 | /* pp0 will always be 0 for linux */ | ||
95 | #define PP_RWXX 0 /* Supervisor read/write, User none */ | ||
96 | #define PP_RWRX 1 /* Supervisor read/write, User read */ | ||
97 | #define PP_RWRW 2 /* Supervisor read/write, User read/write */ | ||
98 | #define PP_RXRX 3 /* Supervisor read, User read */ | ||
99 | |||
100 | |||
101 | extern HPTE * htab_address; | 117 | extern HPTE * htab_address; |
102 | extern unsigned long htab_hash_mask; | 118 | extern unsigned long htab_hash_mask; |
103 | 119 | ||
@@ -174,31 +190,70 @@ extern int __hash_page(unsigned long ea, unsigned long access, | |||
174 | 190 | ||
175 | extern void htab_finish_init(void); | 191 | extern void htab_finish_init(void); |
176 | 192 | ||
193 | extern void hpte_init_native(void); | ||
194 | extern void hpte_init_lpar(void); | ||
195 | extern void hpte_init_iSeries(void); | ||
196 | |||
197 | extern long pSeries_lpar_hpte_insert(unsigned long hpte_group, | ||
198 | unsigned long va, unsigned long prpn, | ||
199 | int secondary, unsigned long hpteflags, | ||
200 | int bolted, int large); | ||
201 | extern long native_hpte_insert(unsigned long hpte_group, unsigned long va, | ||
202 | unsigned long prpn, int secondary, | ||
203 | unsigned long hpteflags, int bolted, int large); | ||
204 | |||
177 | #endif /* __ASSEMBLY__ */ | 205 | #endif /* __ASSEMBLY__ */ |
178 | 206 | ||
179 | /* | 207 | /* |
180 | * Location of cpu0's segment table | 208 | * VSID allocation |
209 | * | ||
210 | * We first generate a 36-bit "proto-VSID". For kernel addresses this | ||
211 | * is equal to the ESID, for user addresses it is: | ||
212 | * (context << 15) | (esid & 0x7fff) | ||
213 | * | ||
214 | * The two forms are distinguishable because the top bit is 0 for user | ||
215 | * addresses, whereas the top two bits are 1 for kernel addresses. | ||
216 | * Proto-VSIDs with the top two bits equal to 0b10 are reserved for | ||
217 | * now. | ||
218 | * | ||
219 | * The proto-VSIDs are then scrambled into real VSIDs with the | ||
220 | * multiplicative hash: | ||
221 | * | ||
222 | * VSID = (proto-VSID * VSID_MULTIPLIER) % VSID_MODULUS | ||
223 | * where VSID_MULTIPLIER = 268435399 = 0xFFFFFC7 | ||
224 | * VSID_MODULUS = 2^36-1 = 0xFFFFFFFFF | ||
225 | * | ||
226 | * This scramble is only well defined for proto-VSIDs below | ||
227 | * 0xFFFFFFFFF, so both proto-VSID and actual VSID 0xFFFFFFFFF are | ||
228 | * reserved. VSID_MULTIPLIER is prime, so in particular it is | ||
229 | * co-prime to VSID_MODULUS, making this a 1:1 scrambling function. | ||
230 | * Because the modulus is 2^n-1 we can compute it efficiently without | ||
231 | * a divide or extra multiply (see below). | ||
232 | * | ||
233 | * This scheme has several advantages over older methods: | ||
234 | * | ||
235 | * - We have VSIDs allocated for every kernel address | ||
236 | * (i.e. everything above 0xC000000000000000), except the very top | ||
237 | * segment, which simplifies several things. | ||
238 | * | ||
239 | * - We allow for 15 significant bits of ESID and 20 bits of | ||
240 | * context for user addresses. i.e. 8T (43 bits) of address space for | ||
241 | * up to 1M contexts (although the page table structure and context | ||
242 | * allocation will need changes to take advantage of this). | ||
243 | * | ||
244 | * - The scramble function gives robust scattering in the hash | ||
245 | * table (at least based on some initial results). The previous | ||
246 | * method was more susceptible to pathological cases giving excessive | ||
247 | * hash collisions. | ||
248 | */ | ||
249 | /* | ||
250 | * WARNING - If you change these you must make sure the asm | ||
251 | * implementations in slb_allocate (slb_low.S), do_stab_bolted | ||
252 | * (head.S) and ASM_VSID_SCRAMBLE (below) are changed accordingly. | ||
253 | * | ||
254 | * You'll also need to change the precomputed VSID values in head.S | ||
255 | * which are used by the iSeries firmware. | ||
181 | */ | 256 | */ |
182 | #define STAB0_PAGE 0x9 | ||
183 | #define STAB0_PHYS_ADDR (STAB0_PAGE<<PAGE_SHIFT) | ||
184 | #define STAB0_VIRT_ADDR (KERNELBASE+STAB0_PHYS_ADDR) | ||
185 | |||
186 | #define SLB_NUM_BOLTED 3 | ||
187 | #define SLB_CACHE_ENTRIES 8 | ||
188 | |||
189 | /* Bits in the SLB ESID word */ | ||
190 | #define SLB_ESID_V 0x0000000008000000 /* entry is valid */ | ||
191 | |||
192 | /* Bits in the SLB VSID word */ | ||
193 | #define SLB_VSID_SHIFT 12 | ||
194 | #define SLB_VSID_KS 0x0000000000000800 | ||
195 | #define SLB_VSID_KP 0x0000000000000400 | ||
196 | #define SLB_VSID_N 0x0000000000000200 /* no-execute */ | ||
197 | #define SLB_VSID_L 0x0000000000000100 /* largepage (4M) */ | ||
198 | #define SLB_VSID_C 0x0000000000000080 /* class */ | ||
199 | |||
200 | #define SLB_VSID_KERNEL (SLB_VSID_KP|SLB_VSID_C) | ||
201 | #define SLB_VSID_USER (SLB_VSID_KP|SLB_VSID_KS) | ||
202 | 257 | ||
203 | #define VSID_MULTIPLIER ASM_CONST(200730139) /* 28-bit prime */ | 258 | #define VSID_MULTIPLIER ASM_CONST(200730139) /* 28-bit prime */ |
204 | #define VSID_BITS 36 | 259 | #define VSID_BITS 36 |
@@ -239,4 +294,50 @@ extern void htab_finish_init(void); | |||
239 | srdi rx,rx,VSID_BITS; /* extract 2^36 bit */ \ | 294 | srdi rx,rx,VSID_BITS; /* extract 2^36 bit */ \ |
240 | add rt,rt,rx | 295 | add rt,rt,rx |
241 | 296 | ||
297 | |||
298 | #ifndef __ASSEMBLY__ | ||
299 | |||
300 | typedef unsigned long mm_context_id_t; | ||
301 | |||
302 | typedef struct { | ||
303 | mm_context_id_t id; | ||
304 | #ifdef CONFIG_HUGETLB_PAGE | ||
305 | pgd_t *huge_pgdir; | ||
306 | u16 htlb_segs; /* bitmask */ | ||
307 | #endif | ||
308 | } mm_context_t; | ||
309 | |||
310 | |||
311 | static inline unsigned long vsid_scramble(unsigned long protovsid) | ||
312 | { | ||
313 | #if 0 | ||
314 | /* The code below is equivalent to this function for arguments | ||
315 | * < 2^VSID_BITS, which is all this should ever be called | ||
316 | * with. However gcc is not clever enough to compute the | ||
317 | * modulus (2^n-1) without a second multiply. */ | ||
318 | return ((protovsid * VSID_MULTIPLIER) % VSID_MODULUS); | ||
319 | #else /* 1 */ | ||
320 | unsigned long x; | ||
321 | |||
322 | x = protovsid * VSID_MULTIPLIER; | ||
323 | x = (x >> VSID_BITS) + (x & VSID_MODULUS); | ||
324 | return (x + ((x+1) >> VSID_BITS)) & VSID_MODULUS; | ||
325 | #endif /* 1 */ | ||
326 | } | ||
327 | |||
328 | /* This is only valid for addresses >= KERNELBASE */ | ||
329 | static inline unsigned long get_kernel_vsid(unsigned long ea) | ||
330 | { | ||
331 | return vsid_scramble(ea >> SID_SHIFT); | ||
332 | } | ||
333 | |||
334 | /* This is only valid for user addresses (which are below 2^41) */ | ||
335 | static inline unsigned long get_vsid(unsigned long context, unsigned long ea) | ||
336 | { | ||
337 | return vsid_scramble((context << USER_ESID_BITS) | ||
338 | | (ea >> SID_SHIFT)); | ||
339 | } | ||
340 | |||
341 | #endif /* __ASSEMBLY */ | ||
342 | |||
242 | #endif /* _PPC64_MMU_H_ */ | 343 | #endif /* _PPC64_MMU_H_ */ |
diff --git a/include/asm-ppc64/mmu_context.h b/include/asm-ppc64/mmu_context.h index c2e8e04663..77a743402d 100644 --- a/include/asm-ppc64/mmu_context.h +++ b/include/asm-ppc64/mmu_context.h | |||
@@ -84,86 +84,4 @@ static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) | |||
84 | local_irq_restore(flags); | 84 | local_irq_restore(flags); |
85 | } | 85 | } |
86 | 86 | ||
87 | /* VSID allocation | ||
88 | * =============== | ||
89 | * | ||
90 | * We first generate a 36-bit "proto-VSID". For kernel addresses this | ||
91 | * is equal to the ESID, for user addresses it is: | ||
92 | * (context << 15) | (esid & 0x7fff) | ||
93 | * | ||
94 | * The two forms are distinguishable because the top bit is 0 for user | ||
95 | * addresses, whereas the top two bits are 1 for kernel addresses. | ||
96 | * Proto-VSIDs with the top two bits equal to 0b10 are reserved for | ||
97 | * now. | ||
98 | * | ||
99 | * The proto-VSIDs are then scrambled into real VSIDs with the | ||
100 | * multiplicative hash: | ||
101 | * | ||
102 | * VSID = (proto-VSID * VSID_MULTIPLIER) % VSID_MODULUS | ||
103 | * where VSID_MULTIPLIER = 268435399 = 0xFFFFFC7 | ||
104 | * VSID_MODULUS = 2^36-1 = 0xFFFFFFFFF | ||
105 | * | ||
106 | * This scramble is only well defined for proto-VSIDs below | ||
107 | * 0xFFFFFFFFF, so both proto-VSID and actual VSID 0xFFFFFFFFF are | ||
108 | * reserved. VSID_MULTIPLIER is prime, so in particular it is | ||
109 | * co-prime to VSID_MODULUS, making this a 1:1 scrambling function. | ||
110 | * Because the modulus is 2^n-1 we can compute it efficiently without | ||
111 | * a divide or extra multiply (see below). | ||
112 | * | ||
113 | * This scheme has several advantages over older methods: | ||
114 | * | ||
115 | * - We have VSIDs allocated for every kernel address | ||
116 | * (i.e. everything above 0xC000000000000000), except the very top | ||
117 | * segment, which simplifies several things. | ||
118 | * | ||
119 | * - We allow for 15 significant bits of ESID and 20 bits of | ||
120 | * context for user addresses. i.e. 8T (43 bits) of address space for | ||
121 | * up to 1M contexts (although the page table structure and context | ||
122 | * allocation will need changes to take advantage of this). | ||
123 | * | ||
124 | * - The scramble function gives robust scattering in the hash | ||
125 | * table (at least based on some initial results). The previous | ||
126 | * method was more susceptible to pathological cases giving excessive | ||
127 | * hash collisions. | ||
128 | */ | ||
129 | |||
130 | /* | ||
131 | * WARNING - If you change these you must make sure the asm | ||
132 | * implementations in slb_allocate(), do_stab_bolted and mmu.h | ||
133 | * (ASM_VSID_SCRAMBLE macro) are changed accordingly. | ||
134 | * | ||
135 | * You'll also need to change the precomputed VSID values in head.S | ||
136 | * which are used by the iSeries firmware. | ||
137 | */ | ||
138 | |||
139 | static inline unsigned long vsid_scramble(unsigned long protovsid) | ||
140 | { | ||
141 | #if 0 | ||
142 | /* The code below is equivalent to this function for arguments | ||
143 | * < 2^VSID_BITS, which is all this should ever be called | ||
144 | * with. However gcc is not clever enough to compute the | ||
145 | * modulus (2^n-1) without a second multiply. */ | ||
146 | return ((protovsid * VSID_MULTIPLIER) % VSID_MODULUS); | ||
147 | #else /* 1 */ | ||
148 | unsigned long x; | ||
149 | |||
150 | x = protovsid * VSID_MULTIPLIER; | ||
151 | x = (x >> VSID_BITS) + (x & VSID_MODULUS); | ||
152 | return (x + ((x+1) >> VSID_BITS)) & VSID_MODULUS; | ||
153 | #endif /* 1 */ | ||
154 | } | ||
155 | |||
156 | /* This is only valid for addresses >= KERNELBASE */ | ||
157 | static inline unsigned long get_kernel_vsid(unsigned long ea) | ||
158 | { | ||
159 | return vsid_scramble(ea >> SID_SHIFT); | ||
160 | } | ||
161 | |||
162 | /* This is only valid for user addresses (which are below 2^41) */ | ||
163 | static inline unsigned long get_vsid(unsigned long context, unsigned long ea) | ||
164 | { | ||
165 | return vsid_scramble((context << USER_ESID_BITS) | ||
166 | | (ea >> SID_SHIFT)); | ||
167 | } | ||
168 | |||
169 | #endif /* __PPC64_MMU_CONTEXT_H */ | 87 | #endif /* __PPC64_MMU_CONTEXT_H */ |
diff --git a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h index 86219574c1..bcd21789d3 100644 --- a/include/asm-ppc64/page.h +++ b/include/asm-ppc64/page.h | |||
@@ -23,7 +23,6 @@ | |||
23 | #define PAGE_SHIFT 12 | 23 | #define PAGE_SHIFT 12 |
24 | #define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT) | 24 | #define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT) |
25 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 25 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
26 | #define PAGE_OFFSET_MASK (PAGE_SIZE-1) | ||
27 | 26 | ||
28 | #define SID_SHIFT 28 | 27 | #define SID_SHIFT 28 |
29 | #define SID_MASK 0xfffffffffUL | 28 | #define SID_MASK 0xfffffffffUL |
@@ -85,9 +84,6 @@ | |||
85 | /* align addr on a size boundary - adjust address up if needed */ | 84 | /* align addr on a size boundary - adjust address up if needed */ |
86 | #define _ALIGN(addr,size) _ALIGN_UP(addr,size) | 85 | #define _ALIGN(addr,size) _ALIGN_UP(addr,size) |
87 | 86 | ||
88 | /* to align the pointer to the (next) double word boundary */ | ||
89 | #define DOUBLEWORD_ALIGN(addr) _ALIGN(addr,sizeof(unsigned long)) | ||
90 | |||
91 | /* to align the pointer to the (next) page boundary */ | 87 | /* to align the pointer to the (next) page boundary */ |
92 | #define PAGE_ALIGN(addr) _ALIGN(addr, PAGE_SIZE) | 88 | #define PAGE_ALIGN(addr) _ALIGN(addr, PAGE_SIZE) |
93 | 89 | ||
@@ -100,7 +96,6 @@ | |||
100 | #define REGION_SIZE 4UL | 96 | #define REGION_SIZE 4UL |
101 | #define REGION_SHIFT 60UL | 97 | #define REGION_SHIFT 60UL |
102 | #define REGION_MASK (((1UL<<REGION_SIZE)-1UL)<<REGION_SHIFT) | 98 | #define REGION_MASK (((1UL<<REGION_SIZE)-1UL)<<REGION_SHIFT) |
103 | #define REGION_STRIDE (1UL << REGION_SHIFT) | ||
104 | 99 | ||
105 | static __inline__ void clear_page(void *addr) | 100 | static __inline__ void clear_page(void *addr) |
106 | { | 101 | { |
@@ -209,13 +204,13 @@ extern u64 ppc64_pft_size; /* Log 2 of page table size */ | |||
209 | #define VMALLOCBASE ASM_CONST(0xD000000000000000) | 204 | #define VMALLOCBASE ASM_CONST(0xD000000000000000) |
210 | #define IOREGIONBASE ASM_CONST(0xE000000000000000) | 205 | #define IOREGIONBASE ASM_CONST(0xE000000000000000) |
211 | 206 | ||
212 | #define IO_REGION_ID (IOREGIONBASE>>REGION_SHIFT) | 207 | #define IO_REGION_ID (IOREGIONBASE >> REGION_SHIFT) |
213 | #define VMALLOC_REGION_ID (VMALLOCBASE>>REGION_SHIFT) | 208 | #define VMALLOC_REGION_ID (VMALLOCBASE >> REGION_SHIFT) |
214 | #define KERNEL_REGION_ID (KERNELBASE>>REGION_SHIFT) | 209 | #define KERNEL_REGION_ID (KERNELBASE >> REGION_SHIFT) |
215 | #define USER_REGION_ID (0UL) | 210 | #define USER_REGION_ID (0UL) |
216 | #define REGION_ID(X) (((unsigned long)(X))>>REGION_SHIFT) | 211 | #define REGION_ID(ea) (((unsigned long)(ea)) >> REGION_SHIFT) |
217 | 212 | ||
218 | #define __bpn_to_ba(x) ((((unsigned long)(x))<<PAGE_SHIFT) + KERNELBASE) | 213 | #define __bpn_to_ba(x) ((((unsigned long)(x)) << PAGE_SHIFT) + KERNELBASE) |
219 | #define __ba_to_bpn(x) ((((unsigned long)(x)) & ~REGION_MASK) >> PAGE_SHIFT) | 214 | #define __ba_to_bpn(x) ((((unsigned long)(x)) & ~REGION_MASK) >> PAGE_SHIFT) |
220 | 215 | ||
221 | #define __va(x) ((void *)((unsigned long)(x) + KERNELBASE)) | 216 | #define __va(x) ((void *)((unsigned long)(x) + KERNELBASE)) |
diff --git a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h index b984e2747e..264c4f7993 100644 --- a/include/asm-ppc64/pgtable.h +++ b/include/asm-ppc64/pgtable.h | |||
@@ -17,16 +17,6 @@ | |||
17 | 17 | ||
18 | #include <asm-generic/pgtable-nopud.h> | 18 | #include <asm-generic/pgtable-nopud.h> |
19 | 19 | ||
20 | /* PMD_SHIFT determines what a second-level page table entry can map */ | ||
21 | #define PMD_SHIFT (PAGE_SHIFT + PAGE_SHIFT - 3) | ||
22 | #define PMD_SIZE (1UL << PMD_SHIFT) | ||
23 | #define PMD_MASK (~(PMD_SIZE-1)) | ||
24 | |||
25 | /* PGDIR_SHIFT determines what a third-level page table entry can map */ | ||
26 | #define PGDIR_SHIFT (PAGE_SHIFT + (PAGE_SHIFT - 3) + (PAGE_SHIFT - 2)) | ||
27 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | ||
28 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | ||
29 | |||
30 | /* | 20 | /* |
31 | * Entries per page directory level. The PTE level must use a 64b record | 21 | * Entries per page directory level. The PTE level must use a 64b record |
32 | * for each page table entry. The PMD and PGD level use a 32b record for | 22 | * for each page table entry. The PMD and PGD level use a 32b record for |
@@ -40,40 +30,30 @@ | |||
40 | #define PTRS_PER_PMD (1 << PMD_INDEX_SIZE) | 30 | #define PTRS_PER_PMD (1 << PMD_INDEX_SIZE) |
41 | #define PTRS_PER_PGD (1 << PGD_INDEX_SIZE) | 31 | #define PTRS_PER_PGD (1 << PGD_INDEX_SIZE) |
42 | 32 | ||
43 | #define USER_PTRS_PER_PGD (1024) | 33 | /* PMD_SHIFT determines what a second-level page table entry can map */ |
44 | #define FIRST_USER_ADDRESS 0 | 34 | #define PMD_SHIFT (PAGE_SHIFT + PTE_INDEX_SIZE) |
35 | #define PMD_SIZE (1UL << PMD_SHIFT) | ||
36 | #define PMD_MASK (~(PMD_SIZE-1)) | ||
45 | 37 | ||
46 | #define EADDR_SIZE (PTE_INDEX_SIZE + PMD_INDEX_SIZE + \ | 38 | /* PGDIR_SHIFT determines what a third-level page table entry can map */ |
47 | PGD_INDEX_SIZE + PAGE_SHIFT) | 39 | #define PGDIR_SHIFT (PMD_SHIFT + PMD_INDEX_SIZE) |
40 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | ||
41 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | ||
42 | |||
43 | #define FIRST_USER_ADDRESS 0 | ||
48 | 44 | ||
49 | /* | 45 | /* |
50 | * Size of EA range mapped by our pagetables. | 46 | * Size of EA range mapped by our pagetables. |
51 | */ | 47 | */ |
52 | #define PGTABLE_EA_BITS 41 | 48 | #define EADDR_SIZE (PTE_INDEX_SIZE + PMD_INDEX_SIZE + \ |
53 | #define PGTABLE_EA_MASK ((1UL<<PGTABLE_EA_BITS)-1) | 49 | PGD_INDEX_SIZE + PAGE_SHIFT) |
50 | #define EADDR_MASK ((1UL << EADDR_SIZE) - 1) | ||
54 | 51 | ||
55 | /* | 52 | /* |
56 | * Define the address range of the vmalloc VM area. | 53 | * Define the address range of the vmalloc VM area. |
57 | */ | 54 | */ |
58 | #define VMALLOC_START (0xD000000000000000ul) | 55 | #define VMALLOC_START (0xD000000000000000ul) |
59 | #define VMALLOC_END (VMALLOC_START + PGTABLE_EA_MASK) | 56 | #define VMALLOC_END (VMALLOC_START + EADDR_MASK) |
60 | |||
61 | /* | ||
62 | * Define the address range of the imalloc VM area. | ||
63 | * (used for ioremap) | ||
64 | */ | ||
65 | #define IMALLOC_START (ioremap_bot) | ||
66 | #define IMALLOC_VMADDR(x) ((unsigned long)(x)) | ||
67 | #define PHBS_IO_BASE (0xE000000000000000ul) /* Reserve 2 gigs for PHBs */ | ||
68 | #define IMALLOC_BASE (0xE000000080000000ul) | ||
69 | #define IMALLOC_END (IMALLOC_BASE + PGTABLE_EA_MASK) | ||
70 | |||
71 | /* | ||
72 | * Define the user address range | ||
73 | */ | ||
74 | #define USER_START (0UL) | ||
75 | #define USER_END (USER_START + PGTABLE_EA_MASK) | ||
76 | |||
77 | 57 | ||
78 | /* | 58 | /* |
79 | * Bits in a linux-style PTE. These match the bits in the | 59 | * Bits in a linux-style PTE. These match the bits in the |
@@ -168,10 +148,6 @@ extern unsigned long empty_zero_page[PAGE_SIZE/sizeof(unsigned long)]; | |||
168 | /* shift to put page number into pte */ | 148 | /* shift to put page number into pte */ |
169 | #define PTE_SHIFT (17) | 149 | #define PTE_SHIFT (17) |
170 | 150 | ||
171 | /* We allow 2^41 bytes of real memory, so we need 29 bits in the PMD | ||
172 | * to give the PTE page number. The bottom two bits are for flags. */ | ||
173 | #define PMD_TO_PTEPAGE_SHIFT (2) | ||
174 | |||
175 | #ifdef CONFIG_HUGETLB_PAGE | 151 | #ifdef CONFIG_HUGETLB_PAGE |
176 | 152 | ||
177 | #ifndef __ASSEMBLY__ | 153 | #ifndef __ASSEMBLY__ |
@@ -200,13 +176,14 @@ void hugetlb_mm_free_pgd(struct mm_struct *mm); | |||
200 | */ | 176 | */ |
201 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) | 177 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) |
202 | 178 | ||
203 | #define pfn_pte(pfn,pgprot) \ | 179 | static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) |
204 | ({ \ | 180 | { |
205 | pte_t pte; \ | 181 | pte_t pte; |
206 | pte_val(pte) = ((unsigned long)(pfn) << PTE_SHIFT) | \ | 182 | |
207 | pgprot_val(pgprot); \ | 183 | |
208 | pte; \ | 184 | pte_val(pte) = (pfn << PTE_SHIFT) | pgprot_val(pgprot); |
209 | }) | 185 | return pte; |
186 | } | ||
210 | 187 | ||
211 | #define pte_modify(_pte, newprot) \ | 188 | #define pte_modify(_pte, newprot) \ |
212 | (__pte((pte_val(_pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))) | 189 | (__pte((pte_val(_pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))) |
@@ -220,13 +197,12 @@ void hugetlb_mm_free_pgd(struct mm_struct *mm); | |||
220 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | 197 | #define pte_page(x) pfn_to_page(pte_pfn(x)) |
221 | 198 | ||
222 | #define pmd_set(pmdp, ptep) \ | 199 | #define pmd_set(pmdp, ptep) \ |
223 | (pmd_val(*(pmdp)) = (__ba_to_bpn(ptep) << PMD_TO_PTEPAGE_SHIFT)) | 200 | (pmd_val(*(pmdp)) = __ba_to_bpn(ptep)) |
224 | #define pmd_none(pmd) (!pmd_val(pmd)) | 201 | #define pmd_none(pmd) (!pmd_val(pmd)) |
225 | #define pmd_bad(pmd) (pmd_val(pmd) == 0) | 202 | #define pmd_bad(pmd) (pmd_val(pmd) == 0) |
226 | #define pmd_present(pmd) (pmd_val(pmd) != 0) | 203 | #define pmd_present(pmd) (pmd_val(pmd) != 0) |
227 | #define pmd_clear(pmdp) (pmd_val(*(pmdp)) = 0) | 204 | #define pmd_clear(pmdp) (pmd_val(*(pmdp)) = 0) |
228 | #define pmd_page_kernel(pmd) \ | 205 | #define pmd_page_kernel(pmd) (__bpn_to_ba(pmd_val(pmd))) |
229 | (__bpn_to_ba(pmd_val(pmd) >> PMD_TO_PTEPAGE_SHIFT)) | ||
230 | #define pmd_page(pmd) virt_to_page(pmd_page_kernel(pmd)) | 206 | #define pmd_page(pmd) virt_to_page(pmd_page_kernel(pmd)) |
231 | 207 | ||
232 | #define pud_set(pudp, pmdp) (pud_val(*(pudp)) = (__ba_to_bpn(pmdp))) | 208 | #define pud_set(pudp, pmdp) (pud_val(*(pudp)) = (__ba_to_bpn(pmdp))) |
@@ -266,8 +242,6 @@ void hugetlb_mm_free_pgd(struct mm_struct *mm); | |||
266 | /* to find an entry in the ioremap page-table-directory */ | 242 | /* to find an entry in the ioremap page-table-directory */ |
267 | #define pgd_offset_i(address) (ioremap_pgd + pgd_index(address)) | 243 | #define pgd_offset_i(address) (ioremap_pgd + pgd_index(address)) |
268 | 244 | ||
269 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) | ||
270 | |||
271 | /* | 245 | /* |
272 | * The following only work if pte_present() is true. | 246 | * The following only work if pte_present() is true. |
273 | * Undefined behaviour if not.. | 247 | * Undefined behaviour if not.. |
@@ -442,7 +416,7 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | |||
442 | pte_clear(mm, addr, ptep); | 416 | pte_clear(mm, addr, ptep); |
443 | flush_tlb_pending(); | 417 | flush_tlb_pending(); |
444 | } | 418 | } |
445 | *ptep = __pte(pte_val(pte)) & ~_PAGE_HPTEFLAGS; | 419 | *ptep = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); |
446 | } | 420 | } |
447 | 421 | ||
448 | /* Set the dirty and/or accessed bits atomically in a linux PTE, this | 422 | /* Set the dirty and/or accessed bits atomically in a linux PTE, this |
@@ -487,18 +461,13 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long addr, | |||
487 | 461 | ||
488 | extern unsigned long ioremap_bot, ioremap_base; | 462 | extern unsigned long ioremap_bot, ioremap_base; |
489 | 463 | ||
490 | #define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT) | ||
491 | #define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS) | ||
492 | |||
493 | #define pte_ERROR(e) \ | ||
494 | printk("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e)) | ||
495 | #define pmd_ERROR(e) \ | 464 | #define pmd_ERROR(e) \ |
496 | printk("%s:%d: bad pmd %08x.\n", __FILE__, __LINE__, pmd_val(e)) | 465 | printk("%s:%d: bad pmd %08x.\n", __FILE__, __LINE__, pmd_val(e)) |
497 | #define pgd_ERROR(e) \ | 466 | #define pgd_ERROR(e) \ |
498 | printk("%s:%d: bad pgd %08x.\n", __FILE__, __LINE__, pgd_val(e)) | 467 | printk("%s:%d: bad pgd %08x.\n", __FILE__, __LINE__, pgd_val(e)) |
499 | 468 | ||
500 | extern pgd_t swapper_pg_dir[1024]; | 469 | extern pgd_t swapper_pg_dir[]; |
501 | extern pgd_t ioremap_dir[1024]; | 470 | extern pgd_t ioremap_dir[]; |
502 | 471 | ||
503 | extern void paging_init(void); | 472 | extern void paging_init(void); |
504 | 473 | ||
@@ -540,43 +509,11 @@ extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); | |||
540 | */ | 509 | */ |
541 | #define kern_addr_valid(addr) (1) | 510 | #define kern_addr_valid(addr) (1) |
542 | 511 | ||
543 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
544 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
545 | |||
546 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 512 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
547 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 513 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
548 | 514 | ||
549 | #define MK_IOSPACE_PFN(space, pfn) (pfn) | ||
550 | #define GET_IOSPACE(pfn) 0 | ||
551 | #define GET_PFN(pfn) (pfn) | ||
552 | |||
553 | void pgtable_cache_init(void); | 515 | void pgtable_cache_init(void); |
554 | 516 | ||
555 | extern void hpte_init_native(void); | ||
556 | extern void hpte_init_lpar(void); | ||
557 | extern void hpte_init_iSeries(void); | ||
558 | |||
559 | /* imalloc region types */ | ||
560 | #define IM_REGION_UNUSED 0x1 | ||
561 | #define IM_REGION_SUBSET 0x2 | ||
562 | #define IM_REGION_EXISTS 0x4 | ||
563 | #define IM_REGION_OVERLAP 0x8 | ||
564 | #define IM_REGION_SUPERSET 0x10 | ||
565 | |||
566 | extern struct vm_struct * im_get_free_area(unsigned long size); | ||
567 | extern struct vm_struct * im_get_area(unsigned long v_addr, unsigned long size, | ||
568 | int region_type); | ||
569 | unsigned long im_free(void *addr); | ||
570 | |||
571 | extern long pSeries_lpar_hpte_insert(unsigned long hpte_group, | ||
572 | unsigned long va, unsigned long prpn, | ||
573 | int secondary, unsigned long hpteflags, | ||
574 | int bolted, int large); | ||
575 | |||
576 | extern long native_hpte_insert(unsigned long hpte_group, unsigned long va, | ||
577 | unsigned long prpn, int secondary, | ||
578 | unsigned long hpteflags, int bolted, int large); | ||
579 | |||
580 | /* | 517 | /* |
581 | * find_linux_pte returns the address of a linux pte for a given | 518 | * find_linux_pte returns the address of a linux pte for a given |
582 | * effective address and directory. If not found, it returns zero. | 519 | * effective address and directory. If not found, it returns zero. |
diff --git a/include/asm-ppc64/xics.h b/include/asm-ppc64/xics.h index 0027da4364..fdec5e7a7a 100644 --- a/include/asm-ppc64/xics.h +++ b/include/asm-ppc64/xics.h | |||
@@ -30,7 +30,4 @@ struct xics_ipi_struct { | |||
30 | 30 | ||
31 | extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned; | 31 | extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned; |
32 | 32 | ||
33 | extern unsigned int default_distrib_server; | ||
34 | extern unsigned int interrupt_server_size; | ||
35 | |||
36 | #endif /* _PPC64_KERNEL_XICS_H */ | 33 | #endif /* _PPC64_KERNEL_XICS_H */ |
diff --git a/include/asm-sh/floppy.h b/include/asm-sh/floppy.h index f030ca0805..38d7a29424 100644 --- a/include/asm-sh/floppy.h +++ b/include/asm-sh/floppy.h | |||
@@ -227,7 +227,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) | |||
227 | return 0; | 227 | return 0; |
228 | } | 228 | } |
229 | 229 | ||
230 | struct fd_routine_l { | 230 | static struct fd_routine_l { |
231 | int (*_request_dma)(unsigned int dmanr, const char * device_id); | 231 | int (*_request_dma)(unsigned int dmanr, const char * device_id); |
232 | void (*_free_dma)(unsigned int dmanr); | 232 | void (*_free_dma)(unsigned int dmanr); |
233 | int (*_get_dma_residue)(unsigned int dummy); | 233 | int (*_get_dma_residue)(unsigned int dummy); |
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h index 2c28e1f605..b9b1914aae 100644 --- a/include/asm-sparc64/pgalloc.h +++ b/include/asm-sparc64/pgalloc.h | |||
@@ -122,17 +122,12 @@ static __inline__ void free_pmd_slow(pmd_t *pmd) | |||
122 | #define pmd_populate(MM,PMD,PTE_PAGE) \ | 122 | #define pmd_populate(MM,PMD,PTE_PAGE) \ |
123 | pmd_populate_kernel(MM,PMD,page_address(PTE_PAGE)) | 123 | pmd_populate_kernel(MM,PMD,page_address(PTE_PAGE)) |
124 | 124 | ||
125 | extern pte_t *__pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address); | 125 | extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address); |
126 | |||
127 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | ||
128 | { | ||
129 | return __pte_alloc_one_kernel(mm, address); | ||
130 | } | ||
131 | 126 | ||
132 | static inline struct page * | 127 | static inline struct page * |
133 | pte_alloc_one(struct mm_struct *mm, unsigned long addr) | 128 | pte_alloc_one(struct mm_struct *mm, unsigned long addr) |
134 | { | 129 | { |
135 | pte_t *pte = __pte_alloc_one_kernel(mm, addr); | 130 | pte_t *pte = pte_alloc_one_kernel(mm, addr); |
136 | 131 | ||
137 | if (pte) | 132 | if (pte) |
138 | return virt_to_page(pte); | 133 | return virt_to_page(pte); |
diff --git a/include/asm-um/arch-signal-i386.h b/include/asm-um/arch-signal-i386.h deleted file mode 100644 index 99a9de4728..0000000000 --- a/include/asm-um/arch-signal-i386.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #ifndef __UM_ARCH_SIGNAL_I386_H | ||
7 | #define __UM_ARCH_SIGNAL_I386_H | ||
8 | |||
9 | struct arch_signal_context { | ||
10 | unsigned long extrasigs[_NSIG_WORDS]; | ||
11 | }; | ||
12 | |||
13 | #endif | ||
14 | |||
15 | /* | ||
16 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
17 | * Emacs will notice this stuff at the end of the file and automatically | ||
18 | * adjust the settings for this buffer only. This must remain at the end | ||
19 | * of the file. | ||
20 | * --------------------------------------------------------------------------- | ||
21 | * Local variables: | ||
22 | * c-file-style: "linux" | ||
23 | * End: | ||
24 | */ | ||
diff --git a/include/asm-um/archparam-i386.h b/include/asm-um/archparam-i386.h index 6f78de5b62..49e89b8d7e 100644 --- a/include/asm-um/archparam-i386.h +++ b/include/asm-um/archparam-i386.h | |||
@@ -6,143 +6,6 @@ | |||
6 | #ifndef __UM_ARCHPARAM_I386_H | 6 | #ifndef __UM_ARCHPARAM_I386_H |
7 | #define __UM_ARCHPARAM_I386_H | 7 | #define __UM_ARCHPARAM_I386_H |
8 | 8 | ||
9 | /********* Bits for asm-um/elf.h ************/ | ||
10 | |||
11 | #include <asm/user.h> | ||
12 | |||
13 | extern char * elf_aux_platform; | ||
14 | #define ELF_PLATFORM (elf_aux_platform) | ||
15 | |||
16 | #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) | ||
17 | |||
18 | typedef struct user_i387_struct elf_fpregset_t; | ||
19 | typedef unsigned long elf_greg_t; | ||
20 | |||
21 | #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) | ||
22 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
23 | |||
24 | #define ELF_DATA ELFDATA2LSB | ||
25 | #define ELF_ARCH EM_386 | ||
26 | |||
27 | #define ELF_PLAT_INIT(regs, load_addr) do { \ | ||
28 | PT_REGS_EBX(regs) = 0; \ | ||
29 | PT_REGS_ECX(regs) = 0; \ | ||
30 | PT_REGS_EDX(regs) = 0; \ | ||
31 | PT_REGS_ESI(regs) = 0; \ | ||
32 | PT_REGS_EDI(regs) = 0; \ | ||
33 | PT_REGS_EBP(regs) = 0; \ | ||
34 | PT_REGS_EAX(regs) = 0; \ | ||
35 | } while(0) | ||
36 | |||
37 | /* Shamelessly stolen from include/asm-i386/elf.h */ | ||
38 | |||
39 | #define ELF_CORE_COPY_REGS(pr_reg, regs) do { \ | ||
40 | pr_reg[0] = PT_REGS_EBX(regs); \ | ||
41 | pr_reg[1] = PT_REGS_ECX(regs); \ | ||
42 | pr_reg[2] = PT_REGS_EDX(regs); \ | ||
43 | pr_reg[3] = PT_REGS_ESI(regs); \ | ||
44 | pr_reg[4] = PT_REGS_EDI(regs); \ | ||
45 | pr_reg[5] = PT_REGS_EBP(regs); \ | ||
46 | pr_reg[6] = PT_REGS_EAX(regs); \ | ||
47 | pr_reg[7] = PT_REGS_DS(regs); \ | ||
48 | pr_reg[8] = PT_REGS_ES(regs); \ | ||
49 | /* fake once used fs and gs selectors? */ \ | ||
50 | pr_reg[9] = PT_REGS_DS(regs); \ | ||
51 | pr_reg[10] = PT_REGS_DS(regs); \ | ||
52 | pr_reg[11] = PT_REGS_SYSCALL_NR(regs); \ | ||
53 | pr_reg[12] = PT_REGS_IP(regs); \ | ||
54 | pr_reg[13] = PT_REGS_CS(regs); \ | ||
55 | pr_reg[14] = PT_REGS_EFLAGS(regs); \ | ||
56 | pr_reg[15] = PT_REGS_SP(regs); \ | ||
57 | pr_reg[16] = PT_REGS_SS(regs); \ | ||
58 | } while(0); | ||
59 | |||
60 | |||
61 | extern unsigned long vsyscall_ehdr; | ||
62 | extern unsigned long vsyscall_end; | ||
63 | extern unsigned long __kernel_vsyscall; | ||
64 | |||
65 | #define VSYSCALL_BASE vsyscall_ehdr | ||
66 | #define VSYSCALL_END vsyscall_end | ||
67 | |||
68 | /* | ||
69 | * This is the range that is readable by user mode, and things | ||
70 | * acting like user mode such as get_user_pages. | ||
71 | */ | ||
72 | #define FIXADDR_USER_START VSYSCALL_BASE | ||
73 | #define FIXADDR_USER_END VSYSCALL_END | ||
74 | |||
75 | /* | ||
76 | * Architecture-neutral AT_ values in 0-17, leave some room | ||
77 | * for more of them, start the x86-specific ones at 32. | ||
78 | */ | ||
79 | #define AT_SYSINFO 32 | ||
80 | #define AT_SYSINFO_EHDR 33 | ||
81 | |||
82 | #define ARCH_DLINFO \ | ||
83 | do { \ | ||
84 | if ( vsyscall_ehdr ) { \ | ||
85 | NEW_AUX_ENT(AT_SYSINFO, __kernel_vsyscall); \ | ||
86 | NEW_AUX_ENT(AT_SYSINFO_EHDR, vsyscall_ehdr); \ | ||
87 | } \ | ||
88 | } while (0) | ||
89 | |||
90 | /* | ||
91 | * These macros parameterize elf_core_dump in fs/binfmt_elf.c to write out | ||
92 | * extra segments containing the vsyscall DSO contents. Dumping its | ||
93 | * contents makes post-mortem fully interpretable later without matching up | ||
94 | * the same kernel and hardware config to see what PC values meant. | ||
95 | * Dumping its extra ELF program headers includes all the other information | ||
96 | * a debugger needs to easily find how the vsyscall DSO was being used. | ||
97 | */ | ||
98 | #define ELF_CORE_EXTRA_PHDRS \ | ||
99 | (vsyscall_ehdr ? (((struct elfhdr *)vsyscall_ehdr)->e_phnum) : 0 ) | ||
100 | |||
101 | #define ELF_CORE_WRITE_EXTRA_PHDRS \ | ||
102 | if ( vsyscall_ehdr ) { \ | ||
103 | const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; \ | ||
104 | const struct elf_phdr *const phdrp = \ | ||
105 | (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); \ | ||
106 | int i; \ | ||
107 | Elf32_Off ofs = 0; \ | ||
108 | for (i = 0; i < ehdrp->e_phnum; ++i) { \ | ||
109 | struct elf_phdr phdr = phdrp[i]; \ | ||
110 | if (phdr.p_type == PT_LOAD) { \ | ||
111 | ofs = phdr.p_offset = offset; \ | ||
112 | offset += phdr.p_filesz; \ | ||
113 | } \ | ||
114 | else \ | ||
115 | phdr.p_offset += ofs; \ | ||
116 | phdr.p_paddr = 0; /* match other core phdrs */ \ | ||
117 | DUMP_WRITE(&phdr, sizeof(phdr)); \ | ||
118 | } \ | ||
119 | } | ||
120 | #define ELF_CORE_WRITE_EXTRA_DATA \ | ||
121 | if ( vsyscall_ehdr ) { \ | ||
122 | const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; \ | ||
123 | const struct elf_phdr *const phdrp = \ | ||
124 | (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); \ | ||
125 | int i; \ | ||
126 | for (i = 0; i < ehdrp->e_phnum; ++i) { \ | ||
127 | if (phdrp[i].p_type == PT_LOAD) \ | ||
128 | DUMP_WRITE((void *) phdrp[i].p_vaddr, \ | ||
129 | phdrp[i].p_filesz); \ | ||
130 | } \ | ||
131 | } | ||
132 | |||
133 | #define R_386_NONE 0 | ||
134 | #define R_386_32 1 | ||
135 | #define R_386_PC32 2 | ||
136 | #define R_386_GOT32 3 | ||
137 | #define R_386_PLT32 4 | ||
138 | #define R_386_COPY 5 | ||
139 | #define R_386_GLOB_DAT 6 | ||
140 | #define R_386_JMP_SLOT 7 | ||
141 | #define R_386_RELATIVE 8 | ||
142 | #define R_386_GOTOFF 9 | ||
143 | #define R_386_GOTPC 10 | ||
144 | #define R_386_NUM 11 | ||
145 | |||
146 | /********* Nothing for asm-um/hardirq.h **********/ | 9 | /********* Nothing for asm-um/hardirq.h **********/ |
147 | 10 | ||
148 | /********* Nothing for asm-um/hw_irq.h **********/ | 11 | /********* Nothing for asm-um/hw_irq.h **********/ |
diff --git a/include/asm-um/archparam-ppc.h b/include/asm-um/archparam-ppc.h index 0ebced92a7..172cd6ffac 100644 --- a/include/asm-um/archparam-ppc.h +++ b/include/asm-um/archparam-ppc.h | |||
@@ -1,26 +1,6 @@ | |||
1 | #ifndef __UM_ARCHPARAM_PPC_H | 1 | #ifndef __UM_ARCHPARAM_PPC_H |
2 | #define __UM_ARCHPARAM_PPC_H | 2 | #define __UM_ARCHPARAM_PPC_H |
3 | 3 | ||
4 | /********* Bits for asm-um/elf.h ************/ | ||
5 | |||
6 | #define ELF_PLATFORM (0) | ||
7 | |||
8 | #define ELF_ET_DYN_BASE (0x08000000) | ||
9 | |||
10 | /* the following stolen from asm-ppc/elf.h */ | ||
11 | #define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ | ||
12 | #define ELF_NFPREG 33 /* includes fpscr */ | ||
13 | /* General registers */ | ||
14 | typedef unsigned long elf_greg_t; | ||
15 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
16 | |||
17 | /* Floating point registers */ | ||
18 | typedef double elf_fpreg_t; | ||
19 | typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | ||
20 | |||
21 | #define ELF_DATA ELFDATA2MSB | ||
22 | #define ELF_ARCH EM_PPC | ||
23 | |||
24 | /********* Bits for asm-um/hw_irq.h **********/ | 4 | /********* Bits for asm-um/hw_irq.h **********/ |
25 | 5 | ||
26 | struct hw_interrupt_type; | 6 | struct hw_interrupt_type; |
diff --git a/include/asm-um/archparam-x86_64.h b/include/asm-um/archparam-x86_64.h index 96321c4892..270ed9586b 100644 --- a/include/asm-um/archparam-x86_64.h +++ b/include/asm-um/archparam-x86_64.h | |||
@@ -7,42 +7,6 @@ | |||
7 | #ifndef __UM_ARCHPARAM_X86_64_H | 7 | #ifndef __UM_ARCHPARAM_X86_64_H |
8 | #define __UM_ARCHPARAM_X86_64_H | 8 | #define __UM_ARCHPARAM_X86_64_H |
9 | 9 | ||
10 | #include <asm/user.h> | ||
11 | |||
12 | #define ELF_PLATFORM "x86_64" | ||
13 | |||
14 | #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) | ||
15 | |||
16 | typedef unsigned long elf_greg_t; | ||
17 | typedef struct { } elf_fpregset_t; | ||
18 | |||
19 | #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) | ||
20 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
21 | |||
22 | #define ELF_DATA ELFDATA2LSB | ||
23 | #define ELF_ARCH EM_X86_64 | ||
24 | |||
25 | #define ELF_PLAT_INIT(regs, load_addr) do { \ | ||
26 | PT_REGS_RBX(regs) = 0; \ | ||
27 | PT_REGS_RCX(regs) = 0; \ | ||
28 | PT_REGS_RDX(regs) = 0; \ | ||
29 | PT_REGS_RSI(regs) = 0; \ | ||
30 | PT_REGS_RDI(regs) = 0; \ | ||
31 | PT_REGS_RBP(regs) = 0; \ | ||
32 | PT_REGS_RAX(regs) = 0; \ | ||
33 | PT_REGS_R8(regs) = 0; \ | ||
34 | PT_REGS_R9(regs) = 0; \ | ||
35 | PT_REGS_R10(regs) = 0; \ | ||
36 | PT_REGS_R11(regs) = 0; \ | ||
37 | PT_REGS_R12(regs) = 0; \ | ||
38 | PT_REGS_R13(regs) = 0; \ | ||
39 | PT_REGS_R14(regs) = 0; \ | ||
40 | PT_REGS_R15(regs) = 0; \ | ||
41 | } while (0) | ||
42 | |||
43 | #ifdef TIF_IA32 /* XXX */ | ||
44 | clear_thread_flag(TIF_IA32); | ||
45 | #endif | ||
46 | 10 | ||
47 | /* No user-accessible fixmap addresses, i.e. vsyscall */ | 11 | /* No user-accessible fixmap addresses, i.e. vsyscall */ |
48 | #define FIXADDR_USER_START 0 | 12 | #define FIXADDR_USER_START 0 |
diff --git a/include/asm-um/delay.h b/include/asm-um/delay.h index 40695576ca..0985bda667 100644 --- a/include/asm-um/delay.h +++ b/include/asm-um/delay.h | |||
@@ -4,4 +4,6 @@ | |||
4 | #include "asm/arch/delay.h" | 4 | #include "asm/arch/delay.h" |
5 | #include "asm/archparam.h" | 5 | #include "asm/archparam.h" |
6 | 6 | ||
7 | #define MILLION 1000000 | ||
8 | |||
7 | #endif | 9 | #endif |
diff --git a/include/asm-um/elf-i386.h b/include/asm-um/elf-i386.h new file mode 100644 index 0000000000..9bab712dc5 --- /dev/null +++ b/include/asm-um/elf-i386.h | |||
@@ -0,0 +1,169 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | #ifndef __UM_ELF_I386_H | ||
6 | #define __UM_ELF_I386_H | ||
7 | |||
8 | #include <asm/user.h> | ||
9 | |||
10 | #define R_386_NONE 0 | ||
11 | #define R_386_32 1 | ||
12 | #define R_386_PC32 2 | ||
13 | #define R_386_GOT32 3 | ||
14 | #define R_386_PLT32 4 | ||
15 | #define R_386_COPY 5 | ||
16 | #define R_386_GLOB_DAT 6 | ||
17 | #define R_386_JMP_SLOT 7 | ||
18 | #define R_386_RELATIVE 8 | ||
19 | #define R_386_GOTOFF 9 | ||
20 | #define R_386_GOTPC 10 | ||
21 | #define R_386_NUM 11 | ||
22 | |||
23 | typedef unsigned long elf_greg_t; | ||
24 | |||
25 | #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) | ||
26 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
27 | |||
28 | typedef struct user_i387_struct elf_fpregset_t; | ||
29 | |||
30 | /* | ||
31 | * This is used to ensure we don't load something for the wrong architecture. | ||
32 | */ | ||
33 | #define elf_check_arch(x) \ | ||
34 | (((x)->e_machine == EM_386) || ((x)->e_machine == EM_486)) | ||
35 | |||
36 | #define ELF_CLASS ELFCLASS32 | ||
37 | #define ELF_DATA ELFDATA2LSB | ||
38 | #define ELF_ARCH EM_386 | ||
39 | |||
40 | #define ELF_PLAT_INIT(regs, load_addr) do { \ | ||
41 | PT_REGS_EBX(regs) = 0; \ | ||
42 | PT_REGS_ECX(regs) = 0; \ | ||
43 | PT_REGS_EDX(regs) = 0; \ | ||
44 | PT_REGS_ESI(regs) = 0; \ | ||
45 | PT_REGS_EDI(regs) = 0; \ | ||
46 | PT_REGS_EBP(regs) = 0; \ | ||
47 | PT_REGS_EAX(regs) = 0; \ | ||
48 | } while(0) | ||
49 | |||
50 | #define USE_ELF_CORE_DUMP | ||
51 | #define ELF_EXEC_PAGESIZE 4096 | ||
52 | |||
53 | #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) | ||
54 | |||
55 | /* Shamelessly stolen from include/asm-i386/elf.h */ | ||
56 | |||
57 | #define ELF_CORE_COPY_REGS(pr_reg, regs) do { \ | ||
58 | pr_reg[0] = PT_REGS_EBX(regs); \ | ||
59 | pr_reg[1] = PT_REGS_ECX(regs); \ | ||
60 | pr_reg[2] = PT_REGS_EDX(regs); \ | ||
61 | pr_reg[3] = PT_REGS_ESI(regs); \ | ||
62 | pr_reg[4] = PT_REGS_EDI(regs); \ | ||
63 | pr_reg[5] = PT_REGS_EBP(regs); \ | ||
64 | pr_reg[6] = PT_REGS_EAX(regs); \ | ||
65 | pr_reg[7] = PT_REGS_DS(regs); \ | ||
66 | pr_reg[8] = PT_REGS_ES(regs); \ | ||
67 | /* fake once used fs and gs selectors? */ \ | ||
68 | pr_reg[9] = PT_REGS_DS(regs); \ | ||
69 | pr_reg[10] = PT_REGS_DS(regs); \ | ||
70 | pr_reg[11] = PT_REGS_SYSCALL_NR(regs); \ | ||
71 | pr_reg[12] = PT_REGS_IP(regs); \ | ||
72 | pr_reg[13] = PT_REGS_CS(regs); \ | ||
73 | pr_reg[14] = PT_REGS_EFLAGS(regs); \ | ||
74 | pr_reg[15] = PT_REGS_SP(regs); \ | ||
75 | pr_reg[16] = PT_REGS_SS(regs); \ | ||
76 | } while(0); | ||
77 | |||
78 | extern long elf_aux_hwcap; | ||
79 | #define ELF_HWCAP (elf_aux_hwcap) | ||
80 | |||
81 | extern char * elf_aux_platform; | ||
82 | #define ELF_PLATFORM (elf_aux_platform) | ||
83 | |||
84 | #define SET_PERSONALITY(ex, ibcs2) do ; while(0) | ||
85 | |||
86 | extern unsigned long vsyscall_ehdr; | ||
87 | extern unsigned long vsyscall_end; | ||
88 | extern unsigned long __kernel_vsyscall; | ||
89 | |||
90 | #define VSYSCALL_BASE vsyscall_ehdr | ||
91 | #define VSYSCALL_END vsyscall_end | ||
92 | |||
93 | /* | ||
94 | * This is the range that is readable by user mode, and things | ||
95 | * acting like user mode such as get_user_pages. | ||
96 | */ | ||
97 | #define FIXADDR_USER_START VSYSCALL_BASE | ||
98 | #define FIXADDR_USER_END VSYSCALL_END | ||
99 | |||
100 | /* | ||
101 | * Architecture-neutral AT_ values in 0-17, leave some room | ||
102 | * for more of them, start the x86-specific ones at 32. | ||
103 | */ | ||
104 | #define AT_SYSINFO 32 | ||
105 | #define AT_SYSINFO_EHDR 33 | ||
106 | |||
107 | #define ARCH_DLINFO \ | ||
108 | do { \ | ||
109 | if ( vsyscall_ehdr ) { \ | ||
110 | NEW_AUX_ENT(AT_SYSINFO, __kernel_vsyscall); \ | ||
111 | NEW_AUX_ENT(AT_SYSINFO_EHDR, vsyscall_ehdr); \ | ||
112 | } \ | ||
113 | } while (0) | ||
114 | |||
115 | /* | ||
116 | * These macros parameterize elf_core_dump in fs/binfmt_elf.c to write out | ||
117 | * extra segments containing the vsyscall DSO contents. Dumping its | ||
118 | * contents makes post-mortem fully interpretable later without matching up | ||
119 | * the same kernel and hardware config to see what PC values meant. | ||
120 | * Dumping its extra ELF program headers includes all the other information | ||
121 | * a debugger needs to easily find how the vsyscall DSO was being used. | ||
122 | */ | ||
123 | #define ELF_CORE_EXTRA_PHDRS \ | ||
124 | (vsyscall_ehdr ? (((struct elfhdr *)vsyscall_ehdr)->e_phnum) : 0 ) | ||
125 | |||
126 | #define ELF_CORE_WRITE_EXTRA_PHDRS \ | ||
127 | if ( vsyscall_ehdr ) { \ | ||
128 | const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; \ | ||
129 | const struct elf_phdr *const phdrp = \ | ||
130 | (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); \ | ||
131 | int i; \ | ||
132 | Elf32_Off ofs = 0; \ | ||
133 | for (i = 0; i < ehdrp->e_phnum; ++i) { \ | ||
134 | struct elf_phdr phdr = phdrp[i]; \ | ||
135 | if (phdr.p_type == PT_LOAD) { \ | ||
136 | ofs = phdr.p_offset = offset; \ | ||
137 | offset += phdr.p_filesz; \ | ||
138 | } \ | ||
139 | else \ | ||
140 | phdr.p_offset += ofs; \ | ||
141 | phdr.p_paddr = 0; /* match other core phdrs */ \ | ||
142 | DUMP_WRITE(&phdr, sizeof(phdr)); \ | ||
143 | } \ | ||
144 | } | ||
145 | #define ELF_CORE_WRITE_EXTRA_DATA \ | ||
146 | if ( vsyscall_ehdr ) { \ | ||
147 | const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; \ | ||
148 | const struct elf_phdr *const phdrp = \ | ||
149 | (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); \ | ||
150 | int i; \ | ||
151 | for (i = 0; i < ehdrp->e_phnum; ++i) { \ | ||
152 | if (phdrp[i].p_type == PT_LOAD) \ | ||
153 | DUMP_WRITE((void *) phdrp[i].p_vaddr, \ | ||
154 | phdrp[i].p_filesz); \ | ||
155 | } \ | ||
156 | } | ||
157 | |||
158 | #endif | ||
159 | |||
160 | /* | ||
161 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
162 | * Emacs will notice this stuff at the end of the file and automatically | ||
163 | * adjust the settings for this buffer only. This must remain at the end | ||
164 | * of the file. | ||
165 | * --------------------------------------------------------------------------- | ||
166 | * Local variables: | ||
167 | * c-file-style: "linux" | ||
168 | * End: | ||
169 | */ | ||
diff --git a/include/asm-um/elf.h b/include/asm-um/elf-ppc.h index 7908f8fe82..2998cf9250 100644 --- a/include/asm-um/elf.h +++ b/include/asm-um/elf-ppc.h | |||
@@ -1,8 +1,7 @@ | |||
1 | #ifndef __UM_ELF_H | 1 | #ifndef __UM_ELF_PPC_H |
2 | #define __UM_ELF_H | 2 | #define __UM_ELF_PPC_H |
3 | 3 | ||
4 | #include "linux/config.h" | 4 | #include "linux/config.h" |
5 | #include "asm/archparam.h" | ||
6 | 5 | ||
7 | extern long elf_aux_hwcap; | 6 | extern long elf_aux_hwcap; |
8 | #define ELF_HWCAP (elf_aux_hwcap) | 7 | #define ELF_HWCAP (elf_aux_hwcap) |
@@ -13,7 +12,7 @@ extern long elf_aux_hwcap; | |||
13 | 12 | ||
14 | #define elf_check_arch(x) (1) | 13 | #define elf_check_arch(x) (1) |
15 | 14 | ||
16 | #ifdef CONFIG_64BIT | 15 | #ifdef CONFIG_64_BIT |
17 | #define ELF_CLASS ELFCLASS64 | 16 | #define ELF_CLASS ELFCLASS64 |
18 | #else | 17 | #else |
19 | #define ELF_CLASS ELFCLASS32 | 18 | #define ELF_CLASS ELFCLASS32 |
@@ -34,4 +33,22 @@ extern long elf_aux_hwcap; | |||
34 | #define R_386_GOTPC 10 | 33 | #define R_386_GOTPC 10 |
35 | #define R_386_NUM 11 | 34 | #define R_386_NUM 11 |
36 | 35 | ||
36 | #define ELF_PLATFORM (0) | ||
37 | |||
38 | #define ELF_ET_DYN_BASE (0x08000000) | ||
39 | |||
40 | /* the following stolen from asm-ppc/elf.h */ | ||
41 | #define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ | ||
42 | #define ELF_NFPREG 33 /* includes fpscr */ | ||
43 | /* General registers */ | ||
44 | typedef unsigned long elf_greg_t; | ||
45 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
46 | |||
47 | /* Floating point registers */ | ||
48 | typedef double elf_fpreg_t; | ||
49 | typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | ||
50 | |||
51 | #define ELF_DATA ELFDATA2MSB | ||
52 | #define ELF_ARCH EM_PPC | ||
53 | |||
37 | #endif | 54 | #endif |
diff --git a/include/asm-um/elf-x86_64.h b/include/asm-um/elf-x86_64.h new file mode 100644 index 0000000000..8a8246d039 --- /dev/null +++ b/include/asm-um/elf-x86_64.h | |||
@@ -0,0 +1,95 @@ | |||
1 | /* | ||
2 | * Copyright 2003 PathScale, Inc. | ||
3 | * | ||
4 | * Licensed under the GPL | ||
5 | */ | ||
6 | #ifndef __UM_ELF_X86_64_H | ||
7 | #define __UM_ELF_X86_64_H | ||
8 | |||
9 | #include <asm/user.h> | ||
10 | |||
11 | /* x86-64 relocation types, taken from asm-x86_64/elf.h */ | ||
12 | #define R_X86_64_NONE 0 /* No reloc */ | ||
13 | #define R_X86_64_64 1 /* Direct 64 bit */ | ||
14 | #define R_X86_64_PC32 2 /* PC relative 32 bit signed */ | ||
15 | #define R_X86_64_GOT32 3 /* 32 bit GOT entry */ | ||
16 | #define R_X86_64_PLT32 4 /* 32 bit PLT address */ | ||
17 | #define R_X86_64_COPY 5 /* Copy symbol at runtime */ | ||
18 | #define R_X86_64_GLOB_DAT 6 /* Create GOT entry */ | ||
19 | #define R_X86_64_JUMP_SLOT 7 /* Create PLT entry */ | ||
20 | #define R_X86_64_RELATIVE 8 /* Adjust by program base */ | ||
21 | #define R_X86_64_GOTPCREL 9 /* 32 bit signed pc relative | ||
22 | offset to GOT */ | ||
23 | #define R_X86_64_32 10 /* Direct 32 bit zero extended */ | ||
24 | #define R_X86_64_32S 11 /* Direct 32 bit sign extended */ | ||
25 | #define R_X86_64_16 12 /* Direct 16 bit zero extended */ | ||
26 | #define R_X86_64_PC16 13 /* 16 bit sign extended pc relative */ | ||
27 | #define R_X86_64_8 14 /* Direct 8 bit sign extended */ | ||
28 | #define R_X86_64_PC8 15 /* 8 bit sign extended pc relative */ | ||
29 | |||
30 | #define R_X86_64_NUM 16 | ||
31 | |||
32 | typedef unsigned long elf_greg_t; | ||
33 | |||
34 | #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) | ||
35 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
36 | |||
37 | typedef struct { } elf_fpregset_t; | ||
38 | |||
39 | /* | ||
40 | * This is used to ensure we don't load something for the wrong architecture. | ||
41 | */ | ||
42 | #define elf_check_arch(x) \ | ||
43 | ((x)->e_machine == EM_X86_64) | ||
44 | |||
45 | #define ELF_CLASS ELFCLASS64 | ||
46 | #define ELF_DATA ELFDATA2LSB | ||
47 | #define ELF_ARCH EM_X86_64 | ||
48 | |||
49 | #define ELF_PLAT_INIT(regs, load_addr) do { \ | ||
50 | PT_REGS_RBX(regs) = 0; \ | ||
51 | PT_REGS_RCX(regs) = 0; \ | ||
52 | PT_REGS_RDX(regs) = 0; \ | ||
53 | PT_REGS_RSI(regs) = 0; \ | ||
54 | PT_REGS_RDI(regs) = 0; \ | ||
55 | PT_REGS_RBP(regs) = 0; \ | ||
56 | PT_REGS_RAX(regs) = 0; \ | ||
57 | PT_REGS_R8(regs) = 0; \ | ||
58 | PT_REGS_R9(regs) = 0; \ | ||
59 | PT_REGS_R10(regs) = 0; \ | ||
60 | PT_REGS_R11(regs) = 0; \ | ||
61 | PT_REGS_R12(regs) = 0; \ | ||
62 | PT_REGS_R13(regs) = 0; \ | ||
63 | PT_REGS_R14(regs) = 0; \ | ||
64 | PT_REGS_R15(regs) = 0; \ | ||
65 | } while (0) | ||
66 | |||
67 | #ifdef TIF_IA32 /* XXX */ | ||
68 | #error XXX, indeed | ||
69 | clear_thread_flag(TIF_IA32); | ||
70 | #endif | ||
71 | |||
72 | #define USE_ELF_CORE_DUMP | ||
73 | #define ELF_EXEC_PAGESIZE 4096 | ||
74 | |||
75 | #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) | ||
76 | |||
77 | extern long elf_aux_hwcap; | ||
78 | #define ELF_HWCAP (elf_aux_hwcap) | ||
79 | |||
80 | #define ELF_PLATFORM "x86_64" | ||
81 | |||
82 | #define SET_PERSONALITY(ex, ibcs2) do ; while(0) | ||
83 | |||
84 | #endif | ||
85 | |||
86 | /* | ||
87 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
88 | * Emacs will notice this stuff at the end of the file and automatically | ||
89 | * adjust the settings for this buffer only. This must remain at the end | ||
90 | * of the file. | ||
91 | * --------------------------------------------------------------------------- | ||
92 | * Local variables: | ||
93 | * c-file-style: "linux" | ||
94 | * End: | ||
95 | */ | ||
diff --git a/include/asm-um/fixmap.h b/include/asm-um/fixmap.h index 900f3fbb9f..ae0ca3932d 100644 --- a/include/asm-um/fixmap.h +++ b/include/asm-um/fixmap.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | #include <asm/kmap_types.h> | 5 | #include <asm/kmap_types.h> |
6 | #include <asm/archparam.h> | 6 | #include <asm/archparam.h> |
7 | #include <asm/elf.h> | ||
7 | 8 | ||
8 | /* | 9 | /* |
9 | * Here we define all the compile-time 'special' virtual | 10 | * Here we define all the compile-time 'special' virtual |
diff --git a/include/asm-um/ipc.h b/include/asm-um/ipc.h index e2ddc47f3e..a46e3d9c2a 100644 --- a/include/asm-um/ipc.h +++ b/include/asm-um/ipc.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef __UM_IPC_H | #include <asm-generic/ipc.h> | |
2 | #define __UM_IPC_H | ||
3 | |||
4 | #include "asm/arch/ipc.h" | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-um/linkage.h b/include/asm-um/linkage.h index 27011652b0..7dfce37adc 100644 --- a/include/asm-um/linkage.h +++ b/include/asm-um/linkage.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef __ASM_LINKAGE_H | 1 | #ifndef __ASM_UM_LINKAGE_H |
2 | #define __ASM_LINKAGE_H | 2 | #define __ASM_UM_LINKAGE_H |
3 | 3 | ||
4 | #define FASTCALL(x) x __attribute__((regparm(3))) | 4 | #include "asm/arch/linkage.h" |
5 | #define fastcall __attribute__((regparm(3))) | ||
6 | 5 | ||
7 | #endif | 6 | #endif |
diff --git a/include/asm-um/page.h b/include/asm-um/page.h index 102eb3df1a..504ea8e486 100644 --- a/include/asm-um/page.h +++ b/include/asm-um/page.h | |||
@@ -45,6 +45,9 @@ typedef struct { unsigned long pgd; } pgd_t; | |||
45 | ({ (pte).pte_high = (phys) >> 32; \ | 45 | ({ (pte).pte_high = (phys) >> 32; \ |
46 | (pte).pte_low = (phys) | pgprot_val(prot); }) | 46 | (pte).pte_low = (phys) | pgprot_val(prot); }) |
47 | 47 | ||
48 | #define pmd_val(x) ((x).pmd) | ||
49 | #define __pmd(x) ((pmd_t) { (x) } ) | ||
50 | |||
48 | typedef unsigned long long pfn_t; | 51 | typedef unsigned long long pfn_t; |
49 | typedef unsigned long long phys_t; | 52 | typedef unsigned long long phys_t; |
50 | 53 | ||
diff --git a/include/asm-um/pgtable-3level.h b/include/asm-um/pgtable-3level.h index d309f3a9e6..65e8bfc55f 100644 --- a/include/asm-um/pgtable-3level.h +++ b/include/asm-um/pgtable-3level.h | |||
@@ -149,7 +149,7 @@ static inline pmd_t pfn_pmd(pfn_t page_nr, pgprot_t pgprot) | |||
149 | 149 | ||
150 | #define pte_to_pgoff(p) ((p).pte >> 32) | 150 | #define pte_to_pgoff(p) ((p).pte >> 32) |
151 | 151 | ||
152 | #define pgoff_to_pte(off) ((pte_t) { ((off) < 32) | _PAGE_FILE }) | 152 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 32) | _PAGE_FILE }) |
153 | 153 | ||
154 | #else | 154 | #else |
155 | 155 | ||
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index 71f9c0c78c..510e513c7f 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h | |||
@@ -106,7 +106,7 @@ extern unsigned long end_iomem; | |||
106 | /* | 106 | /* |
107 | * Define this if things work differently on an i386 and an i486: | 107 | * Define this if things work differently on an i386 and an i486: |
108 | * it will (on an i486) warn about kernel memory accesses that are | 108 | * it will (on an i486) warn about kernel memory accesses that are |
109 | * done without a 'verify_area(VERIFY_WRITE,..)' | 109 | * done without a 'access_ok(VERIFY_WRITE,..)' |
110 | */ | 110 | */ |
111 | #undef TEST_VERIFY_AREA | 111 | #undef TEST_VERIFY_AREA |
112 | 112 | ||
diff --git a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h index b953b1ad3b..b2fc94fbc2 100644 --- a/include/asm-um/processor-generic.h +++ b/include/asm-um/processor-generic.h | |||
@@ -24,9 +24,6 @@ struct thread_struct { | |||
24 | int forking; | 24 | int forking; |
25 | int nsyscalls; | 25 | int nsyscalls; |
26 | struct pt_regs regs; | 26 | struct pt_regs regs; |
27 | unsigned long cr2; | ||
28 | int err; | ||
29 | unsigned long trap_no; | ||
30 | int singlestep_syscall; | 27 | int singlestep_syscall; |
31 | void *fault_addr; | 28 | void *fault_addr; |
32 | void *fault_catcher; | 29 | void *fault_catcher; |
@@ -74,8 +71,6 @@ struct thread_struct { | |||
74 | .forking = 0, \ | 71 | .forking = 0, \ |
75 | .nsyscalls = 0, \ | 72 | .nsyscalls = 0, \ |
76 | .regs = EMPTY_REGS, \ | 73 | .regs = EMPTY_REGS, \ |
77 | .cr2 = 0, \ | ||
78 | .err = 0, \ | ||
79 | .fault_addr = NULL, \ | 74 | .fault_addr = NULL, \ |
80 | .prev_sched = NULL, \ | 75 | .prev_sched = NULL, \ |
81 | .temp_stack = 0, \ | 76 | .temp_stack = 0, \ |
diff --git a/include/asm-um/processor-i386.h b/include/asm-um/processor-i386.h index 2deb8f1adb..431bad3ae9 100644 --- a/include/asm-um/processor-i386.h +++ b/include/asm-um/processor-i386.h | |||
@@ -9,13 +9,18 @@ | |||
9 | extern int host_has_xmm; | 9 | extern int host_has_xmm; |
10 | extern int host_has_cmov; | 10 | extern int host_has_cmov; |
11 | 11 | ||
12 | /* include faultinfo structure */ | ||
13 | #include "sysdep/faultinfo.h" | ||
14 | |||
12 | struct arch_thread { | 15 | struct arch_thread { |
13 | unsigned long debugregs[8]; | 16 | unsigned long debugregs[8]; |
14 | int debugregs_seq; | 17 | int debugregs_seq; |
18 | struct faultinfo faultinfo; | ||
15 | }; | 19 | }; |
16 | 20 | ||
17 | #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ | 21 | #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ |
18 | .debugregs_seq = 0 } | 22 | .debugregs_seq = 0, \ |
23 | .faultinfo = { 0, 0, 0 } } | ||
19 | 24 | ||
20 | #include "asm/arch/user.h" | 25 | #include "asm/arch/user.h" |
21 | 26 | ||
diff --git a/include/asm-um/processor-x86_64.h b/include/asm-um/processor-x86_64.h index a1ae3a4cd9..0beb9a42ae 100644 --- a/include/asm-um/processor-x86_64.h +++ b/include/asm-um/processor-x86_64.h | |||
@@ -7,9 +7,13 @@ | |||
7 | #ifndef __UM_PROCESSOR_X86_64_H | 7 | #ifndef __UM_PROCESSOR_X86_64_H |
8 | #define __UM_PROCESSOR_X86_64_H | 8 | #define __UM_PROCESSOR_X86_64_H |
9 | 9 | ||
10 | #include "asm/arch/user.h" | 10 | /* include faultinfo structure */ |
11 | #include "sysdep/faultinfo.h" | ||
11 | 12 | ||
12 | struct arch_thread { | 13 | struct arch_thread { |
14 | unsigned long debugregs[8]; | ||
15 | int debugregs_seq; | ||
16 | struct faultinfo faultinfo; | ||
13 | }; | 17 | }; |
14 | 18 | ||
15 | /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ | 19 | /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ |
@@ -20,7 +24,11 @@ extern inline void rep_nop(void) | |||
20 | 24 | ||
21 | #define cpu_relax() rep_nop() | 25 | #define cpu_relax() rep_nop() |
22 | 26 | ||
23 | #define INIT_ARCH_THREAD { } | 27 | #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ |
28 | .debugregs_seq = 0, \ | ||
29 | .faultinfo = { 0, 0, 0 } } | ||
30 | |||
31 | #include "asm/arch/user.h" | ||
24 | 32 | ||
25 | #define current_text_addr() \ | 33 | #define current_text_addr() \ |
26 | ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; }) | 34 | ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; }) |
diff --git a/include/asm-um/setup.h b/include/asm-um/setup.h index c85252e803..99f086301f 100644 --- a/include/asm-um/setup.h +++ b/include/asm-um/setup.h | |||
@@ -2,7 +2,8 @@ | |||
2 | #define SETUP_H_INCLUDED | 2 | #define SETUP_H_INCLUDED |
3 | 3 | ||
4 | /* POSIX mandated with _POSIX_ARG_MAX that we can rely on 4096 chars in the | 4 | /* POSIX mandated with _POSIX_ARG_MAX that we can rely on 4096 chars in the |
5 | * command line, so this choice is ok.*/ | 5 | * command line, so this choice is ok. |
6 | */ | ||
6 | 7 | ||
7 | #define COMMAND_LINE_SIZE 4096 | 8 | #define COMMAND_LINE_SIZE 4096 |
8 | 9 | ||
diff --git a/include/asm-x86_64/apicdef.h b/include/asm-x86_64/apicdef.h index 3d7627ffe6..bfebdb6906 100644 --- a/include/asm-x86_64/apicdef.h +++ b/include/asm-x86_64/apicdef.h | |||
@@ -112,7 +112,7 @@ | |||
112 | 112 | ||
113 | #define APIC_BASE (fix_to_virt(FIX_APIC_BASE)) | 113 | #define APIC_BASE (fix_to_virt(FIX_APIC_BASE)) |
114 | 114 | ||
115 | #define MAX_IO_APICS 32 | 115 | #define MAX_IO_APICS 128 |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * All x86-64 systems are xAPIC compatible. | 118 | * All x86-64 systems are xAPIC compatible. |
diff --git a/include/asm-x86_64/floppy.h b/include/asm-x86_64/floppy.h index bca9b28a1a..af7ded63b5 100644 --- a/include/asm-x86_64/floppy.h +++ b/include/asm-x86_64/floppy.h | |||
@@ -223,7 +223,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) | |||
223 | return 0; | 223 | return 0; |
224 | } | 224 | } |
225 | 225 | ||
226 | struct fd_routine_l { | 226 | static struct fd_routine_l { |
227 | int (*_request_dma)(unsigned int dmanr, const char * device_id); | 227 | int (*_request_dma)(unsigned int dmanr, const char * device_id); |
228 | void (*_free_dma)(unsigned int dmanr); | 228 | void (*_free_dma)(unsigned int dmanr); |
229 | int (*_get_dma_residue)(unsigned int dummy); | 229 | int (*_get_dma_residue)(unsigned int dummy); |
diff --git a/include/asm-x86_64/io_apic.h b/include/asm-x86_64/io_apic.h index 7efc932e8f..3257374900 100644 --- a/include/asm-x86_64/io_apic.h +++ b/include/asm-x86_64/io_apic.h | |||
@@ -202,7 +202,6 @@ extern int skip_ioapic_setup; | |||
202 | #define io_apic_assign_pci_irqs (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs) | 202 | #define io_apic_assign_pci_irqs (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs) |
203 | 203 | ||
204 | #ifdef CONFIG_ACPI_BOOT | 204 | #ifdef CONFIG_ACPI_BOOT |
205 | extern int io_apic_get_unique_id (int ioapic, int apic_id); | ||
206 | extern int io_apic_get_version (int ioapic); | 205 | extern int io_apic_get_version (int ioapic); |
207 | extern int io_apic_get_redir_entries (int ioapic); | 206 | extern int io_apic_get_redir_entries (int ioapic); |
208 | extern int io_apic_set_pci_routing (int ioapic, int pin, int irq, int, int); | 207 | extern int io_apic_set_pci_routing (int ioapic, int pin, int irq, int, int); |
diff --git a/include/asm-x86_64/ioctl32.h b/include/asm-x86_64/ioctl32.h deleted file mode 100644 index d0d227f45e..0000000000 --- a/include/asm-x86_64/ioctl32.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <linux/ioctl32.h> | ||
diff --git a/include/asm-x86_64/nmi.h b/include/asm-x86_64/nmi.h index 21d56b086b..d3abfc6a8f 100644 --- a/include/asm-x86_64/nmi.h +++ b/include/asm-x86_64/nmi.h | |||
@@ -53,5 +53,7 @@ extern void die_nmi(char *str, struct pt_regs *regs); | |||
53 | 53 | ||
54 | extern int panic_on_timeout; | 54 | extern int panic_on_timeout; |
55 | extern int unknown_nmi_panic; | 55 | extern int unknown_nmi_panic; |
56 | |||
57 | extern int check_nmi_watchdog(void); | ||
56 | 58 | ||
57 | #endif /* ASM_NMI_H */ | 59 | #endif /* ASM_NMI_H */ |
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index f0581c3562..d641b19f6d 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h | |||
@@ -62,7 +62,6 @@ struct cpuinfo_x86 { | |||
62 | int x86_tlbsize; /* number of 4K pages in DTLB/ITLB combined(in pages)*/ | 62 | int x86_tlbsize; /* number of 4K pages in DTLB/ITLB combined(in pages)*/ |
63 | __u8 x86_virt_bits, x86_phys_bits; | 63 | __u8 x86_virt_bits, x86_phys_bits; |
64 | __u8 x86_num_cores; | 64 | __u8 x86_num_cores; |
65 | __u8 x86_apicid; | ||
66 | __u32 x86_power; | 65 | __u32 x86_power; |
67 | __u32 extended_cpuid_level; /* Max extended CPUID function supported */ | 66 | __u32 extended_cpuid_level; /* Max extended CPUID function supported */ |
68 | unsigned long loops_per_jiffy; | 67 | unsigned long loops_per_jiffy; |
@@ -159,9 +158,9 @@ static inline void clear_in_cr4 (unsigned long mask) | |||
159 | 158 | ||
160 | 159 | ||
161 | /* | 160 | /* |
162 | * User space process size. 47bits. | 161 | * User space process size. 47bits minus one guard page. |
163 | */ | 162 | */ |
164 | #define TASK_SIZE (0x800000000000UL) | 163 | #define TASK_SIZE (0x800000000000UL - 4096) |
165 | 164 | ||
166 | /* This decides where the kernel will search for a free chunk of vm | 165 | /* This decides where the kernel will search for a free chunk of vm |
167 | * space during mmap's. | 166 | * space during mmap's. |
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index d0f8f8b4c3..f2f073642d 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h | |||
@@ -30,6 +30,11 @@ extern void ia32_syscall(void); | |||
30 | extern void iommu_hole_init(void); | 30 | extern void iommu_hole_init(void); |
31 | 31 | ||
32 | extern void time_init_gtod(void); | 32 | extern void time_init_gtod(void); |
33 | extern int pmtimer_mark_offset(void); | ||
34 | extern unsigned int do_gettimeoffset_pm(void); | ||
35 | extern u32 pmtmr_ioport; | ||
36 | extern unsigned long long monotonic_base; | ||
37 | extern int sysctl_vsyscall; | ||
33 | 38 | ||
34 | extern void do_softirq_thunk(void); | 39 | extern void do_softirq_thunk(void); |
35 | 40 | ||
diff --git a/include/asm-x86_64/vsyscall.h b/include/asm-x86_64/vsyscall.h index b0c8d43399..2872da23fc 100644 --- a/include/asm-x86_64/vsyscall.h +++ b/include/asm-x86_64/vsyscall.h | |||
@@ -25,6 +25,7 @@ enum vsyscall_num { | |||
25 | 25 | ||
26 | #define VXTIME_TSC 1 | 26 | #define VXTIME_TSC 1 |
27 | #define VXTIME_HPET 2 | 27 | #define VXTIME_HPET 2 |
28 | #define VXTIME_PMTMR 3 | ||
28 | 29 | ||
29 | struct vxtime_data { | 30 | struct vxtime_data { |
30 | long hpet_address; /* HPET base address */ | 31 | long hpet_address; /* HPET base address */ |
@@ -54,6 +55,8 @@ extern struct timezone sys_tz; | |||
54 | extern int sysctl_vsyscall; | 55 | extern int sysctl_vsyscall; |
55 | extern seqlock_t xtime_lock; | 56 | extern seqlock_t xtime_lock; |
56 | 57 | ||
58 | extern int sysctl_vsyscall; | ||
59 | |||
57 | #define ARCH_HAVE_XTIME_LOCK 1 | 60 | #define ARCH_HAVE_XTIME_LOCK 1 |
58 | 61 | ||
59 | #endif /* __KERNEL__ */ | 62 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/awe_voice.h b/include/linux/awe_voice.h index da0e27de75..4bf9f33048 100644 --- a/include/linux/awe_voice.h +++ b/include/linux/awe_voice.h | |||
@@ -29,9 +29,9 @@ | |||
29 | #define SAMPLE_TYPE_AWE32 0x20 | 29 | #define SAMPLE_TYPE_AWE32 0x20 |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #ifndef _PATCHKEY | 32 | #define _LINUX_PATCHKEY_H_INDIRECT |
33 | #define _PATCHKEY(id) ((id<<8)|0xfd) | 33 | #include <linux/patchkey.h> |
34 | #endif | 34 | #undef _LINUX_PATCHKEY_H_INDIRECT |
35 | 35 | ||
36 | /*---------------------------------------------------------------- | 36 | /*---------------------------------------------------------------- |
37 | * patch information record | 37 | * patch information record |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 54f820832c..7e736e201c 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -77,7 +77,6 @@ extern int flush_old_exec(struct linux_binprm * bprm); | |||
77 | extern int setup_arg_pages(struct linux_binprm * bprm, | 77 | extern int setup_arg_pages(struct linux_binprm * bprm, |
78 | unsigned long stack_top, | 78 | unsigned long stack_top, |
79 | int executable_stack); | 79 | int executable_stack); |
80 | extern int copy_strings(int argc,char __user * __user * argv,struct linux_binprm *bprm); | ||
81 | extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); | 80 | extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); |
82 | extern void compute_creds(struct linux_binprm *binprm); | 81 | extern void compute_creds(struct linux_binprm *binprm); |
83 | extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); | 82 | extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); |
diff --git a/include/linux/device.h b/include/linux/device.h index cf470459fa..df94c0de53 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -273,9 +273,6 @@ struct device { | |||
273 | BIOS data relevant to device) */ | 273 | BIOS data relevant to device) */ |
274 | struct dev_pm_info power; | 274 | struct dev_pm_info power; |
275 | 275 | ||
276 | u32 detach_state; /* State to enter when device is | ||
277 | detached from its driver. */ | ||
278 | |||
279 | u64 *dma_mask; /* dma mask (if dma'able device) */ | 276 | u64 *dma_mask; /* dma mask (if dma'able device) */ |
280 | u64 coherent_dma_mask;/* Like dma_mask, but for | 277 | u64 coherent_dma_mask;/* Like dma_mask, but for |
281 | alloc_coherent mappings as | 278 | alloc_coherent mappings as |
diff --git a/include/linux/err.h b/include/linux/err.h index 17c55df136..ff71d2af5d 100644 --- a/include/linux/err.h +++ b/include/linux/err.h | |||
@@ -13,6 +13,8 @@ | |||
13 | * This should be a per-architecture thing, to allow different | 13 | * This should be a per-architecture thing, to allow different |
14 | * error and pointer decisions. | 14 | * error and pointer decisions. |
15 | */ | 15 | */ |
16 | #define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L) | ||
17 | |||
16 | static inline void *ERR_PTR(long error) | 18 | static inline void *ERR_PTR(long error) |
17 | { | 19 | { |
18 | return (void *) error; | 20 | return (void *) error; |
@@ -25,7 +27,7 @@ static inline long PTR_ERR(const void *ptr) | |||
25 | 27 | ||
26 | static inline long IS_ERR(const void *ptr) | 28 | static inline long IS_ERR(const void *ptr) |
27 | { | 29 | { |
28 | return unlikely((unsigned long)ptr > (unsigned long)-1000L); | 30 | return IS_ERR_VALUE((unsigned long)ptr); |
29 | } | 31 | } |
30 | 32 | ||
31 | #endif /* _LINUX_ERR_H */ | 33 | #endif /* _LINUX_ERR_H */ |
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 396c48cbae..220748b7ab 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)eth.h 1.0.4 05/13/93 | 8 | * Version: @(#)eth.h 1.0.4 05/13/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * | 12 | * |
13 | * Relocated to include/linux where it belongs by Alan Cox | 13 | * Relocated to include/linux where it belongs by Alan Cox |
diff --git a/include/linux/fddidevice.h b/include/linux/fddidevice.h index 2e5ee47f3e..002f636769 100644 --- a/include/linux/fddidevice.h +++ b/include/linux/fddidevice.h | |||
@@ -10,7 +10,7 @@ | |||
10 | * Author: Lawrence V. Stefani, <stefani@lkg.dec.com> | 10 | * Author: Lawrence V. Stefani, <stefani@lkg.dec.com> |
11 | * | 11 | * |
12 | * fddidevice.h is based on previous trdevice.h work by | 12 | * fddidevice.h is based on previous trdevice.h work by |
13 | * Ross Biro, <bir7@leland.Stanford.Edu> | 13 | * Ross Biro |
14 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 14 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
15 | * Alan Cox, <gw4pts@gw4pts.ampr.org> | 15 | * Alan Cox, <gw4pts@gw4pts.ampr.org> |
16 | * | 16 | * |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4edba067a7..0180102dac 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1341,7 +1341,7 @@ extern int fs_may_remount_ro(struct super_block *); | |||
1341 | 1341 | ||
1342 | extern int check_disk_change(struct block_device *); | 1342 | extern int check_disk_change(struct block_device *); |
1343 | extern int invalidate_inodes(struct super_block *); | 1343 | extern int invalidate_inodes(struct super_block *); |
1344 | extern int __invalidate_device(struct block_device *, int); | 1344 | extern int __invalidate_device(struct block_device *); |
1345 | extern int invalidate_partition(struct gendisk *, int); | 1345 | extern int invalidate_partition(struct gendisk *, int); |
1346 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 1346 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
1347 | pgoff_t start, pgoff_t end); | 1347 | pgoff_t start, pgoff_t end); |
diff --git a/include/linux/hippidevice.h b/include/linux/hippidevice.h index 89b3a4a5b7..9debe6bbe5 100644 --- a/include/linux/hippidevice.h +++ b/include/linux/hippidevice.h | |||
@@ -10,7 +10,7 @@ | |||
10 | * Author: Jes Sorensen, <Jes.Sorensen@cern.ch> | 10 | * Author: Jes Sorensen, <Jes.Sorensen@cern.ch> |
11 | * | 11 | * |
12 | * hippidevice.h is based on previous fddidevice.h work by | 12 | * hippidevice.h is based on previous fddidevice.h work by |
13 | * Ross Biro, <bir7@leland.Stanford.Edu> | 13 | * Ross Biro |
14 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 14 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
15 | * Alan Cox, <gw4pts@gw4pts.ampr.org> | 15 | * Alan Cox, <gw4pts@gw4pts.ampr.org> |
16 | * Lawrence V. Stefani, <stefani@lkg.dec.com> | 16 | * Lawrence V. Stefani, <stefani@lkg.dec.com> |
diff --git a/include/linux/if.h b/include/linux/if.h index 110282dbd3..d73a9d62f2 100644 --- a/include/linux/if.h +++ b/include/linux/if.h | |||
@@ -8,7 +8,7 @@ | |||
8 | * Version: @(#)if.h 1.0.2 04/18/93 | 8 | * Version: @(#)if.h 1.0.2 04/18/93 |
9 | * | 9 | * |
10 | * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1982-1988 | 10 | * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1982-1988 |
11 | * Ross Biro, <bir7@leland.Stanford.Edu> | 11 | * Ross Biro |
12 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 12 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
13 | * | 13 | * |
14 | * This program is free software; you can redistribute it and/or | 14 | * This program is free software; you can redistribute it and/or |
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h index bbf49bcd77..0856548a2a 100644 --- a/include/linux/if_arp.h +++ b/include/linux/if_arp.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * | 9 | * |
10 | * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988 | 10 | * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988 |
11 | * Portions taken from the KA9Q/NOS (v2.00m PA0GRI) source. | 11 | * Portions taken from the KA9Q/NOS (v2.00m PA0GRI) source. |
12 | * Ross Biro, <bir7@leland.Stanford.Edu> | 12 | * Ross Biro |
13 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 13 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
14 | * Florian La Roche, | 14 | * Florian La Roche, |
15 | * Jonathan Layes <layes@loran.com> | 15 | * Jonathan Layes <layes@loran.com> |
diff --git a/include/linux/if_ltalk.h b/include/linux/if_ltalk.h index e75e832b7f..76525760ba 100644 --- a/include/linux/if_ltalk.h +++ b/include/linux/if_ltalk.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #define LTALK_ALEN 1 | 6 | #define LTALK_ALEN 1 |
7 | 7 | ||
8 | #ifdef __KERNEL__ | 8 | #ifdef __KERNEL__ |
9 | extern void ltalk_setup(struct net_device *); | 9 | extern struct net_device *alloc_ltalkdev(int sizeof_priv); |
10 | #endif | 10 | #endif |
11 | 11 | ||
12 | #endif | 12 | #endif |
diff --git a/include/linux/ixjuser.h b/include/linux/ixjuser.h index 88121166d7..fd1756d3a4 100644 --- a/include/linux/ixjuser.h +++ b/include/linux/ixjuser.h | |||
@@ -42,8 +42,6 @@ | |||
42 | * | 42 | * |
43 | *****************************************************************************/ | 43 | *****************************************************************************/ |
44 | 44 | ||
45 | static char ixjuser_h_rcsid[] = "$Id: ixjuser.h,v 4.1 2001/08/05 00:17:37 craigs Exp $"; | ||
46 | |||
47 | #include <linux/telephony.h> | 45 | #include <linux/telephony.h> |
48 | 46 | ||
49 | 47 | ||
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index f20c163de4..99ddba5a4e 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -43,6 +43,9 @@ typedef int (*kprobe_fault_handler_t) (struct kprobe *, struct pt_regs *, | |||
43 | struct kprobe { | 43 | struct kprobe { |
44 | struct hlist_node hlist; | 44 | struct hlist_node hlist; |
45 | 45 | ||
46 | /* list of kprobes for multi-handler support */ | ||
47 | struct list_head list; | ||
48 | |||
46 | /* location of the probe point */ | 49 | /* location of the probe point */ |
47 | kprobe_opcode_t *addr; | 50 | kprobe_opcode_t *addr; |
48 | 51 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index 505160ab47..1f7e2039a0 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -584,6 +584,13 @@ static inline void scr_write(struct ata_port *ap, unsigned int reg, u32 val) | |||
584 | ap->ops->scr_write(ap, reg, val); | 584 | ap->ops->scr_write(ap, reg, val); |
585 | } | 585 | } |
586 | 586 | ||
587 | static inline void scr_write_flush(struct ata_port *ap, unsigned int reg, | ||
588 | u32 val) | ||
589 | { | ||
590 | ap->ops->scr_write(ap, reg, val); | ||
591 | (void) ap->ops->scr_read(ap, reg); | ||
592 | } | ||
593 | |||
587 | static inline unsigned int sata_dev_present(struct ata_port *ap) | 594 | static inline unsigned int sata_dev_present(struct ata_port *ap) |
588 | { | 595 | { |
589 | return ((scr_read(ap, SCR_STATUS) & 0xf) == 0x3) ? 1 : 0; | 596 | return ((scr_read(ap, SCR_STATUS) & 0xf) == 0x3) ? 1 : 0; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 8b007ad2d4..17518fe0b3 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -637,9 +637,9 @@ extern unsigned long do_mremap(unsigned long addr, | |||
637 | * These functions are passed a count `nr_to_scan' and a gfpmask. They should | 637 | * These functions are passed a count `nr_to_scan' and a gfpmask. They should |
638 | * scan `nr_to_scan' objects, attempting to free them. | 638 | * scan `nr_to_scan' objects, attempting to free them. |
639 | * | 639 | * |
640 | * The callback must the number of objects which remain in the cache. | 640 | * The callback must return the number of objects which remain in the cache. |
641 | * | 641 | * |
642 | * The callback will be passes nr_to_scan == 0 when the VM is querying the | 642 | * The callback will be passed nr_to_scan == 0 when the VM is querying the |
643 | * cache size, so a fastpath for that case is appropriate. | 643 | * cache size, so a fastpath for that case is appropriate. |
644 | */ | 644 | */ |
645 | typedef int (*shrinker_t)(int nr_to_scan, unsigned int gfp_mask); | 645 | typedef int (*shrinker_t)(int nr_to_scan, unsigned int gfp_mask); |
diff --git a/include/linux/mpage.h b/include/linux/mpage.h index dea1b00836..3ca880463c 100644 --- a/include/linux/mpage.h +++ b/include/linux/mpage.h | |||
@@ -20,9 +20,6 @@ int mpage_writepages(struct address_space *mapping, | |||
20 | struct writeback_control *wbc, get_block_t get_block); | 20 | struct writeback_control *wbc, get_block_t get_block); |
21 | int mpage_writepage(struct page *page, get_block_t *get_block, | 21 | int mpage_writepage(struct page *page, get_block_t *get_block, |
22 | struct writeback_control *wbc); | 22 | struct writeback_control *wbc); |
23 | int __mpage_writepages(struct address_space *mapping, | ||
24 | struct writeback_control *wbc, get_block_t get_block, | ||
25 | writepage_t writepage); | ||
26 | 23 | ||
27 | static inline int | 24 | static inline int |
28 | generic_writepages(struct address_space *mapping, struct writeback_control *wbc) | 25 | generic_writepages(struct address_space *mapping, struct writeback_control *wbc) |
diff --git a/include/linux/net.h b/include/linux/net.h index e5914c1f0c..6d997ff3f1 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * Version: @(#)net.h 1.0.3 05/25/93 | 7 | * Version: @(#)net.h 1.0.3 05/25/93 |
8 | * | 8 | * |
9 | * Authors: Orest Zborowski, <obz@Kodak.COM> | 9 | * Authors: Orest Zborowski, <obz@Kodak.COM> |
10 | * Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or | 13 | * This program is free software; you can redistribute it and/or |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 8d775be678..ac11d73be4 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)dev.h 1.0.10 08/12/93 | 8 | * Version: @(#)dev.h 1.0.10 08/12/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * Corey Minyard <wf-rch!minyard@relay.EU.net> | 12 | * Corey Minyard <wf-rch!minyard@relay.EU.net> |
13 | * Donald J. Becker, <becker@cesdis.gsfc.nasa.gov> | 13 | * Donald J. Becker, <becker@cesdis.gsfc.nasa.gov> |
diff --git a/include/linux/patchkey.h b/include/linux/patchkey.h new file mode 100644 index 0000000000..d974a6e923 --- /dev/null +++ b/include/linux/patchkey.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * <linux/patchkey.h> -- definition of _PATCHKEY macro | ||
3 | * | ||
4 | * Copyright (C) 2005 Stuart Brady | ||
5 | * | ||
6 | * This exists because awe_voice.h defined its own _PATCHKEY and it wasn't | ||
7 | * clear whether removing this would break anything in userspace. | ||
8 | * | ||
9 | * Do not include this file directly. Please use <sys/soundcard.h> instead. | ||
10 | * For kernel code, use <linux/soundcard.h> | ||
11 | */ | ||
12 | |||
13 | #ifndef _LINUX_PATCHKEY_H_INDIRECT | ||
14 | #error "patchkey.h included directly" | ||
15 | #endif | ||
16 | |||
17 | #ifndef _LINUX_PATCHKEY_H | ||
18 | #define _LINUX_PATCHKEY_H | ||
19 | |||
20 | /* Endian macros. */ | ||
21 | #ifdef __KERNEL__ | ||
22 | # include <asm/byteorder.h> | ||
23 | #else | ||
24 | # include <endian.h> | ||
25 | #endif | ||
26 | |||
27 | #if defined(__KERNEL__) | ||
28 | # if defined(__BIG_ENDIAN) | ||
29 | # define _PATCHKEY(id) (0xfd00|id) | ||
30 | # elif defined(__LITTLE_ENDIAN) | ||
31 | # define _PATCHKEY(id) ((id<<8)|0x00fd) | ||
32 | # else | ||
33 | # error "could not determine byte order" | ||
34 | # endif | ||
35 | #elif defined(__BYTE_ORDER) | ||
36 | # if __BYTE_ORDER == __BIG_ENDIAN | ||
37 | # define _PATCHKEY(id) (0xfd00|id) | ||
38 | # elif __BYTE_ORDER == __LITTLE_ENDIAN | ||
39 | # define _PATCHKEY(id) ((id<<8)|0x00fd) | ||
40 | # else | ||
41 | # error "could not determine byte order" | ||
42 | # endif | ||
43 | #endif | ||
44 | |||
45 | #endif /* _LINUX_PATCHKEY_H */ | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 5d5820a4cf..ae27792b5a 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -854,6 +854,7 @@ | |||
854 | #define PCI_DEVICE_ID_MYLEX_DAC960_LA 0x0020 | 854 | #define PCI_DEVICE_ID_MYLEX_DAC960_LA 0x0020 |
855 | #define PCI_DEVICE_ID_MYLEX_DAC960_LP 0x0050 | 855 | #define PCI_DEVICE_ID_MYLEX_DAC960_LP 0x0050 |
856 | #define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 | 856 | #define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 |
857 | #define PCI_DEVICE_ID_MYLEX_DAC960_GEM 0xB166 | ||
857 | 858 | ||
858 | #define PCI_VENDOR_ID_PICOP 0x1066 | 859 | #define PCI_VENDOR_ID_PICOP 0x1066 |
859 | #define PCI_DEVICE_ID_PICOP_PT86C52X 0x0001 | 860 | #define PCI_DEVICE_ID_PICOP_PT86C52X 0x0001 |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5f868a5885..4dbb109022 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -578,7 +578,7 @@ struct task_struct { | |||
578 | unsigned long flags; /* per process flags, defined below */ | 578 | unsigned long flags; /* per process flags, defined below */ |
579 | unsigned long ptrace; | 579 | unsigned long ptrace; |
580 | 580 | ||
581 | int lock_depth; /* Lock depth */ | 581 | int lock_depth; /* BKL lock depth */ |
582 | 582 | ||
583 | int prio, static_prio; | 583 | int prio, static_prio; |
584 | struct list_head run_list; | 584 | struct list_head run_list; |
@@ -661,7 +661,10 @@ struct task_struct { | |||
661 | struct key *thread_keyring; /* keyring private to this thread */ | 661 | struct key *thread_keyring; /* keyring private to this thread */ |
662 | #endif | 662 | #endif |
663 | int oomkilladj; /* OOM kill score adjustment (bit shift). */ | 663 | int oomkilladj; /* OOM kill score adjustment (bit shift). */ |
664 | char comm[TASK_COMM_LEN]; | 664 | char comm[TASK_COMM_LEN]; /* executable name excluding path |
665 | - access with [gs]et_task_comm (which lock | ||
666 | it with task_lock()) | ||
667 | - initialized normally by flush_old_exec */ | ||
665 | /* file system info */ | 668 | /* file system info */ |
666 | int link_count, total_link_count; | 669 | int link_count, total_link_count; |
667 | /* ipc stuff */ | 670 | /* ipc stuff */ |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index c3fb5984f2..d6025af7ef 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -479,6 +479,25 @@ uart_handle_cts_change(struct uart_port *port, unsigned int status) | |||
479 | } | 479 | } |
480 | } | 480 | } |
481 | 481 | ||
482 | #include <linux/tty_flip.h> | ||
483 | |||
484 | static inline void | ||
485 | uart_insert_char(struct uart_port *port, unsigned int status, | ||
486 | unsigned int overrun, unsigned int ch, unsigned int flag) | ||
487 | { | ||
488 | struct tty_struct *tty = port->info->tty; | ||
489 | |||
490 | if ((status & port->ignore_status_mask & ~overrun) == 0) | ||
491 | tty_insert_flip_char(tty, ch, flag); | ||
492 | |||
493 | /* | ||
494 | * Overrun is special. Since it's reported immediately, | ||
495 | * it doesn't affect the current character. | ||
496 | */ | ||
497 | if (status & ~port->ignore_status_mask & overrun) | ||
498 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); | ||
499 | } | ||
500 | |||
482 | /* | 501 | /* |
483 | * UART_ENABLE_MS - determine if port should enable modem status irqs | 502 | * UART_ENABLE_MS - determine if port should enable modem status irqs |
484 | */ | 503 | */ |
diff --git a/include/linux/sockios.h b/include/linux/sockios.h index 5eb33205cc..e6b9d1d36e 100644 --- a/include/linux/sockios.h +++ b/include/linux/sockios.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)sockios.h 1.0.2 03/09/93 | 8 | * Version: @(#)sockios.h 1.0.2 03/09/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or | 13 | * This program is free software; you can redistribute it and/or |
diff --git a/include/linux/soundcard.h b/include/linux/soundcard.h index 28d2d18819..523d069c86 100644 --- a/include/linux/soundcard.h +++ b/include/linux/soundcard.h | |||
@@ -39,6 +39,13 @@ | |||
39 | /* In Linux we need to be prepared for cross compiling */ | 39 | /* In Linux we need to be prepared for cross compiling */ |
40 | #include <linux/ioctl.h> | 40 | #include <linux/ioctl.h> |
41 | 41 | ||
42 | /* Endian macros. */ | ||
43 | #ifdef __KERNEL__ | ||
44 | # include <asm/byteorder.h> | ||
45 | #else | ||
46 | # include <endian.h> | ||
47 | #endif | ||
48 | |||
42 | /* | 49 | /* |
43 | * Supported card ID numbers (Should be somewhere else?) | 50 | * Supported card ID numbers (Should be somewhere else?) |
44 | */ | 51 | */ |
@@ -179,13 +186,26 @@ typedef struct seq_event_rec { | |||
179 | * Some big endian/little endian handling macros | 186 | * Some big endian/little endian handling macros |
180 | */ | 187 | */ |
181 | 188 | ||
182 | #if defined(_AIX) || defined(AIX) || defined(sparc) || defined(__sparc__) || defined(HPPA) || defined(PPC) || defined(__mc68000__) | 189 | #define _LINUX_PATCHKEY_H_INDIRECT |
183 | /* Big endian machines */ | 190 | #include <linux/patchkey.h> |
184 | # define _PATCHKEY(id) (0xfd00|id) | 191 | #undef _LINUX_PATCHKEY_H_INDIRECT |
185 | # define AFMT_S16_NE AFMT_S16_BE | 192 | |
186 | #else | 193 | #if defined(__KERNEL__) |
187 | # define _PATCHKEY(id) ((id<<8)|0xfd) | 194 | # if defined(__BIG_ENDIAN) |
188 | # define AFMT_S16_NE AFMT_S16_LE | 195 | # define AFMT_S16_NE AFMT_S16_BE |
196 | # elif defined(__LITTLE_ENDIAN) | ||
197 | # define AFMT_S16_NE AFMT_S16_LE | ||
198 | # else | ||
199 | # error "could not determine byte order" | ||
200 | # endif | ||
201 | #elif defined(__BYTE_ORDER) | ||
202 | # if __BYTE_ORDER == __BIG_ENDIAN | ||
203 | # define AFMT_S16_NE AFMT_S16_BE | ||
204 | # elif __BYTE_ORDER == __LITTLE_ENDIAN | ||
205 | # define AFMT_S16_NE AFMT_S16_LE | ||
206 | # else | ||
207 | # error "could not determine byte order" | ||
208 | # endif | ||
189 | #endif | 209 | #endif |
190 | 210 | ||
191 | /* | 211 | /* |
diff --git a/include/linux/trdevice.h b/include/linux/trdevice.h index aaa1f337ed..99e02ef54c 100644 --- a/include/linux/trdevice.h +++ b/include/linux/trdevice.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)eth.h 1.0.4 05/13/93 | 8 | * Version: @(#)eth.h 1.0.4 05/13/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * | 12 | * |
13 | * Relocated to include/linux where it belongs by Alan Cox | 13 | * Relocated to include/linux where it belongs by Alan Cox |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 3a358c8951..6409d9cf59 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -41,6 +41,7 @@ extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags); | |||
41 | extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, | 41 | extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, |
42 | unsigned long start, unsigned long end); | 42 | unsigned long start, unsigned long end); |
43 | extern struct vm_struct *remove_vm_area(void *addr); | 43 | extern struct vm_struct *remove_vm_area(void *addr); |
44 | extern struct vm_struct *__remove_vm_area(void *addr); | ||
44 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, | 45 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, |
45 | struct page ***pages); | 46 | struct page ***pages); |
46 | extern void unmap_vm_area(struct vm_struct *area); | 47 | extern void unmap_vm_area(struct vm_struct *area); |
diff --git a/include/media/video-buf-dvb.h b/include/media/video-buf-dvb.h index 94bd33619a..ad0a07a3a8 100644 --- a/include/media/video-buf-dvb.h +++ b/include/media/video-buf-dvb.h | |||
@@ -16,7 +16,7 @@ struct videobuf_dvb { | |||
16 | int nfeeds; | 16 | int nfeeds; |
17 | 17 | ||
18 | /* videobuf_dvb_(un)register manges this */ | 18 | /* videobuf_dvb_(un)register manges this */ |
19 | struct dvb_adapter *adapter; | 19 | struct dvb_adapter adapter; |
20 | struct dvb_demux demux; | 20 | struct dvb_demux demux; |
21 | struct dmxdev dmxdev; | 21 | struct dmxdev dmxdev; |
22 | struct dmx_frontend fe_hw; | 22 | struct dmx_frontend fe_hw; |
diff --git a/include/net/act_generic.h b/include/net/act_generic.h index 95b120781c..c9daa7e523 100644 --- a/include/net/act_generic.h +++ b/include/net/act_generic.h | |||
@@ -2,8 +2,8 @@ | |||
2 | * include/net/act_generic.h | 2 | * include/net/act_generic.h |
3 | * | 3 | * |
4 | */ | 4 | */ |
5 | #ifndef ACT_GENERIC_H | 5 | #ifndef _NET_ACT_GENERIC_H |
6 | #define ACT_GENERIC_H | 6 | #define _NET_ACT_GENERIC_H |
7 | static inline int tcf_defact_release(struct tcf_defact *p, int bind) | 7 | static inline int tcf_defact_release(struct tcf_defact *p, int bind) |
8 | { | 8 | { |
9 | int ret = 0; | 9 | int ret = 0; |
diff --git a/include/net/icmp.h b/include/net/icmp.h index 3fc192478a..e5ef0d15fb 100644 --- a/include/net/icmp.h +++ b/include/net/icmp.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)icmp.h 1.0.4 05/13/93 | 8 | * Version: @(#)icmp.h 1.0.4 05/13/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or | 13 | * This program is free software; you can redistribute it and/or |
diff --git a/include/net/ip.h b/include/net/ip.h index b4db1375da..3f63992eb7 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)ip.h 1.0.2 05/07/93 | 8 | * Version: @(#)ip.h 1.0.2 05/07/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * Alan Cox, <gw4pts@gw4pts.ampr.org> | 12 | * Alan Cox, <gw4pts@gw4pts.ampr.org> |
13 | * | 13 | * |
diff --git a/include/net/route.h b/include/net/route.h index 22da7579d5..efe92b239e 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)route.h 1.0.4 05/27/93 | 8 | * Version: @(#)route.h 1.0.4 05/27/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * Fixes: | 12 | * Fixes: |
13 | * Alan Cox : Reformatted. Added ip_rt_local() | 13 | * Alan Cox : Reformatted. Added ip_rt_local() |
diff --git a/include/net/sock.h b/include/net/sock.h index cc4c9190b7..a9ef3a6a13 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)sock.h 1.0.4 05/13/93 | 8 | * Version: @(#)sock.h 1.0.4 05/13/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * Corey Minyard <wf-rch!minyard@relay.EU.net> | 12 | * Corey Minyard <wf-rch!minyard@relay.EU.net> |
13 | * Florian La Roche <flla@stud.uni-sb.de> | 13 | * Florian La Roche <flla@stud.uni-sb.de> |
@@ -141,6 +141,7 @@ struct sock_common { | |||
141 | * @sk_callback_lock: used with the callbacks in the end of this struct | 141 | * @sk_callback_lock: used with the callbacks in the end of this struct |
142 | * @sk_error_queue: rarely used | 142 | * @sk_error_queue: rarely used |
143 | * @sk_prot: protocol handlers inside a network family | 143 | * @sk_prot: protocol handlers inside a network family |
144 | * @sk_prot_creator: sk_prot of original sock creator (see ipv6_setsockopt, IPV6_ADDRFORM for instance) | ||
144 | * @sk_err: last error | 145 | * @sk_err: last error |
145 | * @sk_err_soft: errors that don't cause failure but are the cause of a persistent failure not just 'timed out' | 146 | * @sk_err_soft: errors that don't cause failure but are the cause of a persistent failure not just 'timed out' |
146 | * @sk_ack_backlog: current listen backlog | 147 | * @sk_ack_backlog: current listen backlog |
@@ -218,6 +219,7 @@ struct sock { | |||
218 | } sk_backlog; | 219 | } sk_backlog; |
219 | struct sk_buff_head sk_error_queue; | 220 | struct sk_buff_head sk_error_queue; |
220 | struct proto *sk_prot; | 221 | struct proto *sk_prot; |
222 | struct proto *sk_prot_creator; | ||
221 | rwlock_t sk_callback_lock; | 223 | rwlock_t sk_callback_lock; |
222 | int sk_err, | 224 | int sk_err, |
223 | sk_err_soft; | 225 | sk_err_soft; |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 9355ae5b1d..e71f8ba3e1 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)tcp.h 1.0.5 05/23/93 | 8 | * Version: @(#)tcp.h 1.0.5 05/23/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or | 13 | * This program is free software; you can redistribute it and/or |
diff --git a/include/net/udp.h b/include/net/udp.h index c496d10101..ac229b761d 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)udp.h 1.0.2 05/07/93 | 8 | * Version: @(#)udp.h 1.0.2 05/07/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * | 12 | * |
13 | * Fixes: | 13 | * Fixes: |
diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h index 6dcf497bf4..a30d6cd4c0 100644 --- a/include/scsi/scsi_transport_spi.h +++ b/include/scsi/scsi_transport_spi.h | |||
@@ -27,8 +27,11 @@ struct scsi_transport_template; | |||
27 | 27 | ||
28 | struct spi_transport_attrs { | 28 | struct spi_transport_attrs { |
29 | int period; /* value in the PPR/SDTR command */ | 29 | int period; /* value in the PPR/SDTR command */ |
30 | int min_period; | ||
30 | int offset; | 31 | int offset; |
32 | int max_offset; | ||
31 | unsigned int width:1; /* 0 - narrow, 1 - wide */ | 33 | unsigned int width:1; /* 0 - narrow, 1 - wide */ |
34 | unsigned int max_width:1; | ||
32 | unsigned int iu:1; /* Information Units enabled */ | 35 | unsigned int iu:1; /* Information Units enabled */ |
33 | unsigned int dt:1; /* DT clocking enabled */ | 36 | unsigned int dt:1; /* DT clocking enabled */ |
34 | unsigned int qas:1; /* Quick Arbitration and Selection enabled */ | 37 | unsigned int qas:1; /* Quick Arbitration and Selection enabled */ |
@@ -63,8 +66,11 @@ struct spi_host_attrs { | |||
63 | 66 | ||
64 | /* accessor functions */ | 67 | /* accessor functions */ |
65 | #define spi_period(x) (((struct spi_transport_attrs *)&(x)->starget_data)->period) | 68 | #define spi_period(x) (((struct spi_transport_attrs *)&(x)->starget_data)->period) |
69 | #define spi_min_period(x) (((struct spi_transport_attrs *)&(x)->starget_data)->min_period) | ||
66 | #define spi_offset(x) (((struct spi_transport_attrs *)&(x)->starget_data)->offset) | 70 | #define spi_offset(x) (((struct spi_transport_attrs *)&(x)->starget_data)->offset) |
71 | #define spi_max_offset(x) (((struct spi_transport_attrs *)&(x)->starget_data)->max_offset) | ||
67 | #define spi_width(x) (((struct spi_transport_attrs *)&(x)->starget_data)->width) | 72 | #define spi_width(x) (((struct spi_transport_attrs *)&(x)->starget_data)->width) |
73 | #define spi_max_width(x) (((struct spi_transport_attrs *)&(x)->starget_data)->max_width) | ||
68 | #define spi_iu(x) (((struct spi_transport_attrs *)&(x)->starget_data)->iu) | 74 | #define spi_iu(x) (((struct spi_transport_attrs *)&(x)->starget_data)->iu) |
69 | #define spi_dt(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dt) | 75 | #define spi_dt(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dt) |
70 | #define spi_qas(x) (((struct spi_transport_attrs *)&(x)->starget_data)->qas) | 76 | #define spi_qas(x) (((struct spi_transport_attrs *)&(x)->starget_data)->qas) |