aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acpi/processor.h9
-rw-r--r--include/asm-m68knommu/cacheflush.h14
-rw-r--r--include/asm-m68knommu/system.h2
-rw-r--r--include/asm-powerpc/systbl.h4
-rw-r--r--include/asm-powerpc/unistd.h6
-rw-r--r--include/asm-ppc/page.h2
-rw-r--r--include/asm-sh/bugs.h2
-rw-r--r--include/asm-sh/cpu-sh4/freq.h4
-rw-r--r--include/asm-sh/cpu-sh5/cacheflush.h6
-rw-r--r--include/asm-sh/cpu-sh5/mmu_context.h6
-rw-r--r--include/asm-sh/hp6xx.h28
-rw-r--r--include/asm-sh/io.h22
-rw-r--r--include/asm-sh/io_trapped.h58
-rw-r--r--include/asm-sh/ioctls.h4
-rw-r--r--include/asm-sh/irq.h4
-rw-r--r--include/asm-sh/mmu_context_64.h3
-rw-r--r--include/asm-sh/page.h7
-rw-r--r--include/asm-sh/pgtable_64.h13
-rw-r--r--include/asm-sh/processor.h2
-rw-r--r--include/asm-sh/r7780rp.h3
-rw-r--r--include/asm-sh/rts7751r2d.h3
-rw-r--r--include/asm-sh/system.h5
-rw-r--r--include/asm-sh/system_32.h3
-rw-r--r--include/asm-sh/termbits.h5
-rw-r--r--include/asm-sh/termios.h6
-rw-r--r--include/asm-sh/tlb.h1
-rw-r--r--include/asm-sh/uaccess.h29
-rw-r--r--include/asm-sh/uaccess_32.h24
-rw-r--r--include/asm-sh/uaccess_64.h19
-rw-r--r--include/asm-sh/unistd_32.h6
-rw-r--r--include/asm-sh/unistd_64.h6
-rw-r--r--include/asm-x86/cacheflush.h7
-rw-r--r--include/asm-x86/kdebug.h1
-rw-r--r--include/linux/acpi.h1
-rw-r--r--include/linux/audit.h5
-rw-r--r--include/linux/configfs.h1
-rw-r--r--include/linux/cpuidle.h2
-rw-r--r--include/linux/dcache.h5
-rw-r--r--include/linux/dcookies.h15
-rw-r--r--include/linux/fs.h6
-rw-r--r--include/linux/fs_struct.h10
-rw-r--r--include/linux/hid.h2
-rw-r--r--include/linux/ktime.h2
-rw-r--r--include/linux/maple.h100
-rw-r--r--include/linux/module.h3
-rw-r--r--include/linux/namei.h11
-rw-r--r--include/linux/nfsd/export.h8
-rw-r--r--include/linux/path.h15
-rw-r--r--include/linux/proc_fs.h2
-rw-r--r--include/linux/seq_file.h5
-rw-r--r--include/linux/slub_def.h15
51 files changed, 309 insertions, 213 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index cdc8004cfd12..06480bcabfdc 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -32,9 +32,11 @@
32#define DOMAIN_COORD_TYPE_SW_ANY 0xfd 32#define DOMAIN_COORD_TYPE_SW_ANY 0xfd
33#define DOMAIN_COORD_TYPE_HW_ALL 0xfe 33#define DOMAIN_COORD_TYPE_HW_ALL 0xfe
34 34
35#define ACPI_CSTATE_SYSTEMIO (0) 35#define ACPI_CSTATE_SYSTEMIO 0
36#define ACPI_CSTATE_FFH (1) 36#define ACPI_CSTATE_FFH 1
37#define ACPI_CSTATE_HALT (2) 37#define ACPI_CSTATE_HALT 2
38
39#define ACPI_CX_DESC_LEN 32
38 40
39/* Power Management */ 41/* Power Management */
40 42
@@ -74,6 +76,7 @@ struct acpi_processor_cx {
74 u64 time; 76 u64 time;
75 struct acpi_processor_cx_policy promotion; 77 struct acpi_processor_cx_policy promotion;
76 struct acpi_processor_cx_policy demotion; 78 struct acpi_processor_cx_policy demotion;
79 char desc[ACPI_CX_DESC_LEN];
77}; 80};
78 81
79struct acpi_processor_power { 82struct acpi_processor_power {
diff --git a/include/asm-m68knommu/cacheflush.h b/include/asm-m68knommu/cacheflush.h
index 29bc0aad2ebc..87e5dc0413b4 100644
--- a/include/asm-m68knommu/cacheflush.h
+++ b/include/asm-m68knommu/cacheflush.h
@@ -54,28 +54,28 @@ static inline void __flush_cache_all(void)
54#if defined(CONFIG_M527x) || defined(CONFIG_M528x) 54#if defined(CONFIG_M527x) || defined(CONFIG_M528x)
55 __asm__ __volatile__ ( 55 __asm__ __volatile__ (
56 "movel #0x81000200, %%d0\n\t" 56 "movel #0x81000200, %%d0\n\t"
57 "movec %%d0, %%CACR\n\t" 57 "movec %%d0, %%CACR\n\t"
58 "nop\n\t" 58 "nop\n\t"
59 : : : "d0" ); 59 : : : "d0" );
60#endif /* CONFIG_M527x || CONFIG_M528x */ 60#endif /* CONFIG_M527x || CONFIG_M528x */
61#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || defined(CONFIG_M5272) 61#if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || defined(CONFIG_M5272)
62 __asm__ __volatile__ ( 62 __asm__ __volatile__ (
63 "movel #0x81000100, %%d0\n\t" 63 "movel #0x81000100, %%d0\n\t"
64 "movec %%d0, %%CACR\n\t" 64 "movec %%d0, %%CACR\n\t"
65 "nop\n\t" 65 "nop\n\t"
66 : : : "d0" ); 66 : : : "d0" );
67#endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ 67#endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */
68#ifdef CONFIG_M5249 68#ifdef CONFIG_M5249
69 __asm__ __volatile__ ( 69 __asm__ __volatile__ (
70 "movel #0xa1000200, %%d0\n\t" 70 "movel #0xa1000200, %%d0\n\t"
71 "movec %%d0, %%CACR\n\t" 71 "movec %%d0, %%CACR\n\t"
72 "nop\n\t" 72 "nop\n\t"
73 : : : "d0" ); 73 : : : "d0" );
74#endif /* CONFIG_M5249 */ 74#endif /* CONFIG_M5249 */
75#ifdef CONFIG_M532x 75#ifdef CONFIG_M532x
76 __asm__ __volatile__ ( 76 __asm__ __volatile__ (
77 "movel #0x81000200, %%d0\n\t" 77 "movel #0x81000200, %%d0\n\t"
78 "movec %%d0, %%CACR\n\t" 78 "movec %%d0, %%CACR\n\t"
79 "nop\n\t" 79 "nop\n\t"
80 : : : "d0" ); 80 : : : "d0" );
81#endif /* CONFIG_M532x */ 81#endif /* CONFIG_M532x */
diff --git a/include/asm-m68knommu/system.h b/include/asm-m68knommu/system.h
index 039ab3f81732..64c64432bbb8 100644
--- a/include/asm-m68knommu/system.h
+++ b/include/asm-m68knommu/system.h
@@ -104,7 +104,7 @@ asmlinkage void resume(void);
104#define mb() asm volatile ("" : : :"memory") 104#define mb() asm volatile ("" : : :"memory")
105#define rmb() asm volatile ("" : : :"memory") 105#define rmb() asm volatile ("" : : :"memory")
106#define wmb() asm volatile ("" : : :"memory") 106#define wmb() asm volatile ("" : : :"memory")
107#define set_mb(var, value) do { xchg(&var, value); } while (0) 107#define set_mb(var, value) ({ (var) = (value); wmb(); })
108 108
109#ifdef CONFIG_SMP 109#ifdef CONFIG_SMP
110#define smp_mb() mb() 110#define smp_mb() mb()
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h
index e996521fb3a6..ae7085c65692 100644
--- a/include/asm-powerpc/systbl.h
+++ b/include/asm-powerpc/systbl.h
@@ -309,8 +309,10 @@ SYSCALL_SPU(getcpu)
309COMPAT_SYS(epoll_pwait) 309COMPAT_SYS(epoll_pwait)
310COMPAT_SYS_SPU(utimensat) 310COMPAT_SYS_SPU(utimensat)
311COMPAT_SYS_SPU(signalfd) 311COMPAT_SYS_SPU(signalfd)
312SYSCALL(ni_syscall) 312SYSCALL_SPU(timerfd_create)
313SYSCALL_SPU(eventfd) 313SYSCALL_SPU(eventfd)
314COMPAT_SYS_SPU(sync_file_range2) 314COMPAT_SYS_SPU(sync_file_range2)
315COMPAT_SYS(fallocate) 315COMPAT_SYS(fallocate)
316SYSCALL(subpage_prot) 316SYSCALL(subpage_prot)
317COMPAT_SYS_SPU(timerfd_settime)
318COMPAT_SYS_SPU(timerfd_gettime)
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h
index fedc4b8e49e2..ce91bb662063 100644
--- a/include/asm-powerpc/unistd.h
+++ b/include/asm-powerpc/unistd.h
@@ -328,15 +328,17 @@
328#define __NR_epoll_pwait 303 328#define __NR_epoll_pwait 303
329#define __NR_utimensat 304 329#define __NR_utimensat 304
330#define __NR_signalfd 305 330#define __NR_signalfd 305
331#define __NR_timerfd 306 331#define __NR_timerfd_create 306
332#define __NR_eventfd 307 332#define __NR_eventfd 307
333#define __NR_sync_file_range2 308 333#define __NR_sync_file_range2 308
334#define __NR_fallocate 309 334#define __NR_fallocate 309
335#define __NR_subpage_prot 310 335#define __NR_subpage_prot 310
336#define __NR_timerfd_settime 311
337#define __NR_timerfd_gettime 312
336 338
337#ifdef __KERNEL__ 339#ifdef __KERNEL__
338 340
339#define __NR_syscalls 311 341#define __NR_syscalls 313
340 342
341#define __NR__exit __NR_exit 343#define __NR__exit __NR_exit
342#define NR_syscalls __NR_syscalls 344#define NR_syscalls __NR_syscalls
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h
index ad4c5a1bc9d6..37e4756b6b2d 100644
--- a/include/asm-ppc/page.h
+++ b/include/asm-ppc/page.h
@@ -125,6 +125,8 @@ extern __inline__ int get_order(unsigned long size)
125 return 32 - lz; 125 return 32 - lz;
126} 126}
127 127
128typedef struct page *pgtable_t;
129
128#endif /* __ASSEMBLY__ */ 130#endif /* __ASSEMBLY__ */
129 131
130#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 132#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
diff --git a/include/asm-sh/bugs.h b/include/asm-sh/bugs.h
index def8128b8b78..cfda7d5bf026 100644
--- a/include/asm-sh/bugs.h
+++ b/include/asm-sh/bugs.h
@@ -39,7 +39,7 @@ static void __init check_bugs(void)
39 *p++ = '4'; 39 *p++ = '4';
40 *p++ = 'a'; 40 *p++ = 'a';
41 break; 41 break;
42 case CPU_SH7343 ... CPU_SH7722: 42 case CPU_SH7343 ... CPU_SH7366:
43 *p++ = '4'; 43 *p++ = '4';
44 *p++ = 'a'; 44 *p++ = 'a';
45 *p++ = 'l'; 45 *p++ = 'l';
diff --git a/include/asm-sh/cpu-sh4/freq.h b/include/asm-sh/cpu-sh4/freq.h
index 1ac10b9a078f..ec028c649215 100644
--- a/include/asm-sh/cpu-sh4/freq.h
+++ b/include/asm-sh/cpu-sh4/freq.h
@@ -10,12 +10,14 @@
10#ifndef __ASM_CPU_SH4_FREQ_H 10#ifndef __ASM_CPU_SH4_FREQ_H
11#define __ASM_CPU_SH4_FREQ_H 11#define __ASM_CPU_SH4_FREQ_H
12 12
13#if defined(CONFIG_CPU_SUBTYPE_SH7722) 13#if defined(CONFIG_CPU_SUBTYPE_SH7722) || defined(CONFIG_CPU_SUBTYPE_SH7366)
14#define FRQCR 0xa4150000 14#define FRQCR 0xa4150000
15#define VCLKCR 0xa4150004 15#define VCLKCR 0xa4150004
16#define SCLKACR 0xa4150008 16#define SCLKACR 0xa4150008
17#define SCLKBCR 0xa415000c 17#define SCLKBCR 0xa415000c
18#if defined(CONFIG_CPU_SUBTYPE_SH7722)
18#define IrDACLKCR 0xa4150010 19#define IrDACLKCR 0xa4150010
20#endif
19#elif defined(CONFIG_CPU_SUBTYPE_SH7763) || \ 21#elif defined(CONFIG_CPU_SUBTYPE_SH7763) || \
20 defined(CONFIG_CPU_SUBTYPE_SH7780) 22 defined(CONFIG_CPU_SUBTYPE_SH7780)
21#define FRQCR 0xffc80000 23#define FRQCR 0xffc80000
diff --git a/include/asm-sh/cpu-sh5/cacheflush.h b/include/asm-sh/cpu-sh5/cacheflush.h
index 98edb5b1da32..5a11f0b7e66a 100644
--- a/include/asm-sh/cpu-sh5/cacheflush.h
+++ b/include/asm-sh/cpu-sh5/cacheflush.h
@@ -3,15 +3,13 @@
3 3
4#ifndef __ASSEMBLY__ 4#ifndef __ASSEMBLY__
5 5
6#include <asm/page.h>
7
8struct vm_area_struct; 6struct vm_area_struct;
9struct page; 7struct page;
10struct mm_struct; 8struct mm_struct;
11 9
12extern void flush_cache_all(void); 10extern void flush_cache_all(void);
13extern void flush_cache_mm(struct mm_struct *mm); 11extern void flush_cache_mm(struct mm_struct *mm);
14extern void flush_cache_sigtramp(unsigned long start, unsigned long end); 12extern void flush_cache_sigtramp(unsigned long vaddr);
15extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, 13extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
16 unsigned long end); 14 unsigned long end);
17extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn); 15extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn);
@@ -27,7 +25,7 @@ extern void flush_icache_user_range(struct vm_area_struct *vma,
27#define flush_dcache_mmap_unlock(mapping) do { } while (0) 25#define flush_dcache_mmap_unlock(mapping) do { } while (0)
28 26
29#define flush_icache_page(vma, page) do { } while (0) 27#define flush_icache_page(vma, page) do { } while (0)
30#define p3_cache_init() do { } while (0) 28void p3_cache_init(void);
31 29
32#endif /* __ASSEMBLY__ */ 30#endif /* __ASSEMBLY__ */
33 31
diff --git a/include/asm-sh/cpu-sh5/mmu_context.h b/include/asm-sh/cpu-sh5/mmu_context.h
index df857fc09960..68a1d2cff457 100644
--- a/include/asm-sh/cpu-sh5/mmu_context.h
+++ b/include/asm-sh/cpu-sh5/mmu_context.h
@@ -16,12 +16,6 @@
16/* This has to be a common function because the next location to fill 16/* This has to be a common function because the next location to fill
17 * information is shared. */ 17 * information is shared. */
18extern void __do_tlb_refill(unsigned long address, unsigned long long is_text_not_data, pte_t *pte); 18extern void __do_tlb_refill(unsigned long address, unsigned long long is_text_not_data, pte_t *pte);
19
20/* Profiling counter. */
21#ifdef CONFIG_SH64_PROC_TLB
22extern unsigned long long calls_to_do_fast_page_fault;
23#endif
24
25#endif /* __ASSEMBLY__ */ 19#endif /* __ASSEMBLY__ */
26 20
27#endif /* __ASM_SH_CPU_SH5_MMU_CONTEXT_H */ 21#endif /* __ASM_SH_CPU_SH5_MMU_CONTEXT_H */
diff --git a/include/asm-sh/hp6xx.h b/include/asm-sh/hp6xx.h
index 53ca5643d9c7..0d4165a32dcd 100644
--- a/include/asm-sh/hp6xx.h
+++ b/include/asm-sh/hp6xx.h
@@ -10,9 +10,9 @@
10 * 10 *
11 */ 11 */
12 12
13#define HP680_BTN_IRQ 32 /* IRQ0_IRQ */ 13#define HP680_BTN_IRQ 32 /* IRQ0_IRQ */
14#define HP680_TS_IRQ 35 /* IRQ3_IRQ */ 14#define HP680_TS_IRQ 35 /* IRQ3_IRQ */
15#define HP680_HD64461_IRQ 36 /* IRQ4_IRQ */ 15#define HP680_HD64461_IRQ 36 /* IRQ4_IRQ */
16 16
17#define DAC_LCD_BRIGHTNESS 0 17#define DAC_LCD_BRIGHTNESS 0
18#define DAC_SPEAKER_VOLUME 1 18#define DAC_SPEAKER_VOLUME 1
@@ -55,26 +55,4 @@
55#define PJDR 0xa4000130 55#define PJDR 0xa4000130
56#define PKDR 0xa4000132 56#define PKDR 0xa4000132
57 57
58static inline void hp6xx_led_red(int on)
59{
60 u16 v16;
61 v16 = ctrl_inw(CONFIG_HD64461_IOBASE + HD64461_GPBDR - 0x10000);
62 if (on)
63 ctrl_outw(v16 & (~HD64461_GPBDR_LED_RED), CONFIG_HD64461_IOBASE + HD64461_GPBDR - 0x10000);
64 else
65 ctrl_outw(v16 | HD64461_GPBDR_LED_RED, CONFIG_HD64461_IOBASE + HD64461_GPBDR - 0x10000);
66}
67
68static inline void hp6xx_led_green(int on)
69{
70 u8 v8;
71
72 v8 = ctrl_inb(PKDR);
73 if (on)
74 ctrl_outb(v8 & (~PKDR_LED_GREEN), PKDR);
75 else
76 ctrl_outb(v8 | PKDR_LED_GREEN, PKDR);
77}
78
79
80#endif /* __ASM_SH_HP6XX_H */ 58#endif /* __ASM_SH_HP6XX_H */
diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h
index 94900c089519..356e50d06745 100644
--- a/include/asm-sh/io.h
+++ b/include/asm-sh/io.h
@@ -38,6 +38,7 @@
38 */ 38 */
39#define __IO_PREFIX generic 39#define __IO_PREFIX generic
40#include <asm/io_generic.h> 40#include <asm/io_generic.h>
41#include <asm/io_trapped.h>
41 42
42#define maybebadio(port) \ 43#define maybebadio(port) \
43 printk(KERN_ERR "bad PC-like io %s:%u for port 0x%lx at 0x%08x\n", \ 44 printk(KERN_ERR "bad PC-like io %s:%u for port 0x%lx at 0x%08x\n", \
@@ -181,13 +182,13 @@ __BUILD_MEMORY_STRING(w, u16)
181#define iowrite32(v,a) writel((v),(a)) 182#define iowrite32(v,a) writel((v),(a))
182#define iowrite32be(v,a) __raw_writel(cpu_to_be32((v)),(a)) 183#define iowrite32be(v,a) __raw_writel(cpu_to_be32((v)),(a))
183 184
184#define ioread8_rep(a,d,c) insb((a),(d),(c)) 185#define ioread8_rep(a, d, c) readsb((a), (d), (c))
185#define ioread16_rep(a,d,c) insw((a),(d),(c)) 186#define ioread16_rep(a, d, c) readsw((a), (d), (c))
186#define ioread32_rep(a,d,c) insl((a),(d),(c)) 187#define ioread32_rep(a, d, c) readsl((a), (d), (c))
187 188
188#define iowrite8_rep(a,s,c) outsb((a),(s),(c)) 189#define iowrite8_rep(a, s, c) writesb((a), (s), (c))
189#define iowrite16_rep(a,s,c) outsw((a),(s),(c)) 190#define iowrite16_rep(a, s, c) writesw((a), (s), (c))
190#define iowrite32_rep(a,s,c) outsl((a),(s),(c)) 191#define iowrite32_rep(a, s, c) writesl((a), (s), (c))
191 192
192#define mmiowb() wmb() /* synco on SH-4A, otherwise a nop */ 193#define mmiowb() wmb() /* synco on SH-4A, otherwise a nop */
193 194
@@ -207,6 +208,8 @@ static inline void __set_io_port_base(unsigned long pbase)
207 generic_io_base = pbase; 208 generic_io_base = pbase;
208} 209}
209 210
211#define __ioport_map(p, n) sh_mv.mv_ioport_map((p), (n))
212
210/* We really want to try and get these to memcpy etc */ 213/* We really want to try and get these to memcpy etc */
211extern void memcpy_fromio(void *, volatile void __iomem *, unsigned long); 214extern void memcpy_fromio(void *, volatile void __iomem *, unsigned long);
212extern void memcpy_toio(volatile void __iomem *, const void *, unsigned long); 215extern void memcpy_toio(volatile void __iomem *, const void *, unsigned long);
@@ -309,7 +312,14 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags)
309{ 312{
310#ifdef CONFIG_SUPERH32 313#ifdef CONFIG_SUPERH32
311 unsigned long last_addr = offset + size - 1; 314 unsigned long last_addr = offset + size - 1;
315#endif
316 void __iomem *ret;
312 317
318 ret = __ioremap_trapped(offset, size);
319 if (ret)
320 return ret;
321
322#ifdef CONFIG_SUPERH32
313 /* 323 /*
314 * For P1 and P2 space this is trivial, as everything is already 324 * For P1 and P2 space this is trivial, as everything is already
315 * mapped. Uncached access for P1 addresses are done through P2. 325 * mapped. Uncached access for P1 addresses are done through P2.
diff --git a/include/asm-sh/io_trapped.h b/include/asm-sh/io_trapped.h
new file mode 100644
index 000000000000..f1251d4f0ba9
--- /dev/null
+++ b/include/asm-sh/io_trapped.h
@@ -0,0 +1,58 @@
1#ifndef __ASM_SH_IO_TRAPPED_H
2#define __ASM_SH_IO_TRAPPED_H
3
4#include <linux/list.h>
5#include <linux/ioport.h>
6#include <asm/page.h>
7
8#define IO_TRAPPED_MAGIC 0xfeedbeef
9
10struct trapped_io {
11 unsigned int magic;
12 struct resource *resource;
13 unsigned int num_resources;
14 unsigned int minimum_bus_width;
15 struct list_head list;
16 void __iomem *virt_base;
17} __aligned(PAGE_SIZE);
18
19#ifdef CONFIG_IO_TRAPPED
20int register_trapped_io(struct trapped_io *tiop);
21int handle_trapped_io(struct pt_regs *regs, unsigned long address);
22
23void __iomem *match_trapped_io_handler(struct list_head *list,
24 unsigned long offset,
25 unsigned long size);
26
27#ifdef CONFIG_HAS_IOMEM
28extern struct list_head trapped_mem;
29
30static inline void __iomem *
31__ioremap_trapped(unsigned long offset, unsigned long size)
32{
33 return match_trapped_io_handler(&trapped_mem, offset, size);
34}
35#else
36#define __ioremap_trapped(offset, size) NULL
37#endif
38
39#ifdef CONFIG_HAS_IOPORT
40extern struct list_head trapped_io;
41
42static inline void __iomem *
43__ioport_map_trapped(unsigned long offset, unsigned long size)
44{
45 return match_trapped_io_handler(&trapped_io, offset, size);
46}
47#else
48#define __ioport_map_trapped(offset, size) NULL
49#endif
50
51#else
52#define register_trapped_io(tiop) (-1)
53#define handle_trapped_io(tiop, address) 0
54#define __ioremap_trapped(offset, size) NULL
55#define __ioport_map_trapped(offset, size) NULL
56#endif
57
58#endif /* __ASM_SH_IO_TRAPPED_H */
diff --git a/include/asm-sh/ioctls.h b/include/asm-sh/ioctls.h
index 35805df010a0..c212c371a4a5 100644
--- a/include/asm-sh/ioctls.h
+++ b/include/asm-sh/ioctls.h
@@ -78,6 +78,10 @@
78#define TIOCSBRK _IO('T', 39) /* 0x5427 */ /* BSD compatibility */ 78#define TIOCSBRK _IO('T', 39) /* 0x5427 */ /* BSD compatibility */
79#define TIOCCBRK _IO('T', 40) /* 0x5428 */ /* BSD compatibility */ 79#define TIOCCBRK _IO('T', 40) /* 0x5428 */ /* BSD compatibility */
80#define TIOCGSID _IOR('T', 41, pid_t) /* 0x5429 */ /* Return the session ID of FD */ 80#define TIOCGSID _IOR('T', 41, pid_t) /* 0x5429 */ /* Return the session ID of FD */
81#define TCGETS2 _IOR('T', 42, struct termios2)
82#define TCSETS2 _IOW('T', 43, struct termios2)
83#define TCSETSW2 _IOW('T', 44, struct termios2)
84#define TCSETSF2 _IOW('T', 45, struct termios2)
81#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ 85#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
82#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ 86#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
83 87
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h
index 11850f65c922..ca66e5df69dc 100644
--- a/include/asm-sh/irq.h
+++ b/include/asm-sh/irq.h
@@ -50,4 +50,8 @@ extern void irq_ctx_exit(int cpu);
50# define irq_ctx_exit(cpu) do { } while (0) 50# define irq_ctx_exit(cpu) do { } while (0)
51#endif 51#endif
52 52
53#ifdef CONFIG_CPU_SH5
54#include <asm/cpu/irq.h>
55#endif
56
53#endif /* __ASM_SH_IRQ_H */ 57#endif /* __ASM_SH_IRQ_H */
diff --git a/include/asm-sh/mmu_context_64.h b/include/asm-sh/mmu_context_64.h
index 020be744b088..9649f1c07caf 100644
--- a/include/asm-sh/mmu_context_64.h
+++ b/include/asm-sh/mmu_context_64.h
@@ -66,6 +66,9 @@ static inline void set_asid(unsigned long asid)
66 : "=r" (sr), "=r" (pc) : "0" (sr)); 66 : "=r" (sr), "=r" (pc) : "0" (sr));
67} 67}
68 68
69/* arch/sh/kernel/cpu/sh5/entry.S */
70extern unsigned long switch_and_save_asid(unsigned long new_asid);
71
69/* No spare register to twiddle, so use a software cache */ 72/* No spare register to twiddle, so use a software cache */
70extern pgd_t *mmu_pdtp_cache; 73extern pgd_t *mmu_pdtp_cache;
71 74
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h
index 134562dc8c45..304c30b5d947 100644
--- a/include/asm-sh/page.h
+++ b/include/asm-sh/page.h
@@ -55,11 +55,14 @@ extern void clear_page(void *to);
55extern void copy_page(void *to, void *from); 55extern void copy_page(void *to, void *from);
56 56
57#if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU) && \ 57#if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_MMU) && \
58 (defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB)) 58 (defined(CONFIG_CPU_SH5) || defined(CONFIG_CPU_SH4) || \
59 defined(CONFIG_SH7705_CACHE_32KB))
59struct page; 60struct page;
60struct vm_area_struct; 61struct vm_area_struct;
61extern void clear_user_page(void *to, unsigned long address, struct page *page); 62extern void clear_user_page(void *to, unsigned long address, struct page *page);
62#ifdef CONFIG_CPU_SH4 63extern void copy_user_page(void *to, void *from, unsigned long address,
64 struct page *page);
65#if defined(CONFIG_CPU_SH4)
63extern void copy_user_highpage(struct page *to, struct page *from, 66extern void copy_user_highpage(struct page *to, struct page *from,
64 unsigned long vaddr, struct vm_area_struct *vma); 67 unsigned long vaddr, struct vm_area_struct *vma);
65#define __HAVE_ARCH_COPY_USER_HIGHPAGE 68#define __HAVE_ARCH_COPY_USER_HIGHPAGE
diff --git a/include/asm-sh/pgtable_64.h b/include/asm-sh/pgtable_64.h
index 972211671c9a..f9dd9d311441 100644
--- a/include/asm-sh/pgtable_64.h
+++ b/include/asm-sh/pgtable_64.h
@@ -138,6 +138,14 @@ static __inline__ void pmd_set(pmd_t *pmdp,pte_t *ptep)
138#endif 138#endif
139 139
140/* 140/*
141 * Stub out _PAGE_SZHUGE if we don't have a good definition for it,
142 * to make pte_mkhuge() happy.
143 */
144#ifndef _PAGE_SZHUGE
145# define _PAGE_SZHUGE (0)
146#endif
147
148/*
141 * Default flags for a Kernel page. 149 * Default flags for a Kernel page.
142 * This is fundametally also SHARED because the main use of this define 150 * This is fundametally also SHARED because the main use of this define
143 * (other than for PGD/PMD entries) is for the VMALLOC pool which is 151 * (other than for PGD/PMD entries) is for the VMALLOC pool which is
@@ -179,6 +187,11 @@ static __inline__ void pmd_set(pmd_t *pmdp,pte_t *ptep)
179 _PAGE_WRITE | _PAGE_EXECUTE) 187 _PAGE_WRITE | _PAGE_EXECUTE)
180#define PAGE_KERNEL __pgprot(_KERNPG_TABLE) 188#define PAGE_KERNEL __pgprot(_KERNPG_TABLE)
181 189
190#define PAGE_KERNEL_NOCACHE \
191 __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \
192 _PAGE_EXECUTE | _PAGE_ACCESSED | \
193 _PAGE_DIRTY | _PAGE_SHARED)
194
182/* Make it a device mapping for maximum safety (e.g. for mapping device 195/* Make it a device mapping for maximum safety (e.g. for mapping device
183 registers into user-space via /dev/map). */ 196 registers into user-space via /dev/map). */
184#define pgprot_noncached(x) __pgprot(((x).pgprot & ~(_PAGE_CACHABLE)) | _PAGE_DEVICE) 197#define pgprot_noncached(x) __pgprot(((x).pgprot & ~(_PAGE_CACHABLE)) | _PAGE_DEVICE)
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h
index c9b14161f73d..19fe47c1ca17 100644
--- a/include/asm-sh/processor.h
+++ b/include/asm-sh/processor.h
@@ -33,7 +33,7 @@ enum cpu_type {
33 CPU_SH7763, CPU_SH7770, CPU_SH7780, CPU_SH7781, CPU_SH7785, CPU_SHX3, 33 CPU_SH7763, CPU_SH7770, CPU_SH7780, CPU_SH7781, CPU_SH7785, CPU_SHX3,
34 34
35 /* SH4AL-DSP types */ 35 /* SH4AL-DSP types */
36 CPU_SH7343, CPU_SH7722, 36 CPU_SH7343, CPU_SH7722, CPU_SH7366,
37 37
38 /* SH-5 types */ 38 /* SH-5 types */
39 CPU_SH5_101, CPU_SH5_103, 39 CPU_SH5_101, CPU_SH5_103,
diff --git a/include/asm-sh/r7780rp.h b/include/asm-sh/r7780rp.h
index bdecea0840a0..1770460a4616 100644
--- a/include/asm-sh/r7780rp.h
+++ b/include/asm-sh/r7780rp.h
@@ -195,7 +195,4 @@ unsigned char *highlander_init_irq_r7780mp(void);
195unsigned char *highlander_init_irq_r7780rp(void); 195unsigned char *highlander_init_irq_r7780rp(void);
196unsigned char *highlander_init_irq_r7785rp(void); 196unsigned char *highlander_init_irq_r7785rp(void);
197 197
198#define __IO_PREFIX r7780rp
199#include <asm/io_generic.h>
200
201#endif /* __ASM_SH_RENESAS_R7780RP */ 198#endif /* __ASM_SH_RENESAS_R7780RP */
diff --git a/include/asm-sh/rts7751r2d.h b/include/asm-sh/rts7751r2d.h
index 83b9c111f171..0a800157b826 100644
--- a/include/asm-sh/rts7751r2d.h
+++ b/include/asm-sh/rts7751r2d.h
@@ -67,7 +67,4 @@
67void init_rts7751r2d_IRQ(void); 67void init_rts7751r2d_IRQ(void);
68int rts7751r2d_irq_demux(int); 68int rts7751r2d_irq_demux(int);
69 69
70#define __IO_PREFIX rts7751r2d
71#include <asm/io_generic.h>
72
73#endif /* __ASM_SH_RENESAS_RTS7751R2D */ 70#endif /* __ASM_SH_RENESAS_RTS7751R2D */
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h
index 772cd1a0a674..5145aa2a0ce9 100644
--- a/include/asm-sh/system.h
+++ b/include/asm-sh/system.h
@@ -182,6 +182,11 @@ BUILD_TRAP_HANDLER(fpu_state_restore);
182 182
183#define arch_align_stack(x) (x) 183#define arch_align_stack(x) (x)
184 184
185struct mem_access {
186 unsigned long (*from)(void *dst, const void *src, unsigned long cnt);
187 unsigned long (*to)(void *dst, const void *src, unsigned long cnt);
188};
189
185#ifdef CONFIG_SUPERH32 190#ifdef CONFIG_SUPERH32
186# include "system_32.h" 191# include "system_32.h"
187#else 192#else
diff --git a/include/asm-sh/system_32.h b/include/asm-sh/system_32.h
index 7ff08d956ba8..f11bcf0855ed 100644
--- a/include/asm-sh/system_32.h
+++ b/include/asm-sh/system_32.h
@@ -96,4 +96,7 @@ do { \
96 : "=&r" (__dummy)); \ 96 : "=&r" (__dummy)); \
97} while (0) 97} while (0)
98 98
99int handle_unaligned_access(opcode_t instruction, struct pt_regs *regs,
100 struct mem_access *ma);
101
99#endif /* __ASM_SH_SYSTEM_32_H */ 102#endif /* __ASM_SH_SYSTEM_32_H */
diff --git a/include/asm-sh/termbits.h b/include/asm-sh/termbits.h
index 7ee1b42eeab0..77db116948cf 100644
--- a/include/asm-sh/termbits.h
+++ b/include/asm-sh/termbits.h
@@ -140,6 +140,7 @@ struct ktermios {
140#define HUPCL 0002000 140#define HUPCL 0002000
141#define CLOCAL 0004000 141#define CLOCAL 0004000
142#define CBAUDEX 0010000 142#define CBAUDEX 0010000
143#define BOTHER 0010000
143#define B57600 0010001 144#define B57600 0010001
144#define B115200 0010002 145#define B115200 0010002
145#define B230400 0010003 146#define B230400 0010003
@@ -155,10 +156,12 @@ struct ktermios {
155#define B3000000 0010015 156#define B3000000 0010015
156#define B3500000 0010016 157#define B3500000 0010016
157#define B4000000 0010017 158#define B4000000 0010017
158#define CIBAUD 002003600000 /* input baud rate (not used) */ 159#define CIBAUD 002003600000 /* input baud rate */
159#define CMSPAR 010000000000 /* mark or space (stick) parity */ 160#define CMSPAR 010000000000 /* mark or space (stick) parity */
160#define CRTSCTS 020000000000 /* flow control */ 161#define CRTSCTS 020000000000 /* flow control */
161 162
163#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
164
162/* c_lflag bits */ 165/* c_lflag bits */
163#define ISIG 0000001 166#define ISIG 0000001
164#define ICANON 0000002 167#define ICANON 0000002
diff --git a/include/asm-sh/termios.h b/include/asm-sh/termios.h
index e7c8f86ef890..0a8c793c76f2 100644
--- a/include/asm-sh/termios.h
+++ b/include/asm-sh/termios.h
@@ -80,8 +80,10 @@ struct termio {
80 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ 80 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
81}) 81})
82 82
83#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) 83#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
84#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) 84#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
85#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
86#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
85 87
86#endif /* __KERNEL__ */ 88#endif /* __KERNEL__ */
87 89
diff --git a/include/asm-sh/tlb.h b/include/asm-sh/tlb.h
index 56ad1fb888a2..88ff1ae8a6b8 100644
--- a/include/asm-sh/tlb.h
+++ b/include/asm-sh/tlb.h
@@ -20,6 +20,7 @@
20 */ 20 */
21#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) 21#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
22 22
23#include <linux/pagemap.h>
23#include <asm-generic/tlb.h> 24#include <asm-generic/tlb.h>
24 25
25#endif /* __ASSEMBLY__ */ 26#endif /* __ASSEMBLY__ */
diff --git a/include/asm-sh/uaccess.h b/include/asm-sh/uaccess.h
index ff24ce95b238..b3440c305b5d 100644
--- a/include/asm-sh/uaccess.h
+++ b/include/asm-sh/uaccess.h
@@ -1,5 +1,34 @@
1#ifndef __ASM_SH_UACCESS_H
2#define __ASM_SH_UACCESS_H
3
1#ifdef CONFIG_SUPERH32 4#ifdef CONFIG_SUPERH32
2# include "uaccess_32.h" 5# include "uaccess_32.h"
3#else 6#else
4# include "uaccess_64.h" 7# include "uaccess_64.h"
5#endif 8#endif
9
10static inline unsigned long
11copy_from_user(void *to, const void __user *from, unsigned long n)
12{
13 unsigned long __copy_from = (unsigned long) from;
14 __kernel_size_t __copy_size = (__kernel_size_t) n;
15
16 if (__copy_size && __access_ok(__copy_from, __copy_size))
17 return __copy_user(to, from, __copy_size);
18
19 return __copy_size;
20}
21
22static inline unsigned long
23copy_to_user(void __user *to, const void *from, unsigned long n)
24{
25 unsigned long __copy_to = (unsigned long) to;
26 __kernel_size_t __copy_size = (__kernel_size_t) n;
27
28 if (__copy_size && __access_ok(__copy_to, __copy_size))
29 return __copy_user(to, from, __copy_size);
30
31 return __copy_size;
32}
33
34#endif /* __ASM_SH_UACCESS_H */
diff --git a/include/asm-sh/uaccess_32.h b/include/asm-sh/uaccess_32.h
index b6082f3c1dc4..c0318b608893 100644
--- a/include/asm-sh/uaccess_32.h
+++ b/include/asm-sh/uaccess_32.h
@@ -10,8 +10,8 @@
10 * Copyright (C) 1996, 1997, 1998 by Ralf Baechle 10 * Copyright (C) 1996, 1997, 1998 by Ralf Baechle
11 * and i386 version. 11 * and i386 version.
12 */ 12 */
13#ifndef __ASM_SH_UACCESS_H 13#ifndef __ASM_SH_UACCESS_32_H
14#define __ASM_SH_UACCESS_H 14#define __ASM_SH_UACCESS_32_H
15 15
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/sched.h> 17#include <linux/sched.h>
@@ -302,24 +302,6 @@ extern void __put_user_unknown(void);
302/* Return the number of bytes NOT copied */ 302/* Return the number of bytes NOT copied */
303__kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n); 303__kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n);
304 304
305#define copy_to_user(to,from,n) ({ \
306void *__copy_to = (void *) (to); \
307__kernel_size_t __copy_size = (__kernel_size_t) (n); \
308__kernel_size_t __copy_res; \
309if(__copy_size && __access_ok((unsigned long)__copy_to, __copy_size)) { \
310__copy_res = __copy_user(__copy_to, (void *) (from), __copy_size); \
311} else __copy_res = __copy_size; \
312__copy_res; })
313
314#define copy_from_user(to,from,n) ({ \
315void *__copy_to = (void *) (to); \
316void *__copy_from = (void *) (from); \
317__kernel_size_t __copy_size = (__kernel_size_t) (n); \
318__kernel_size_t __copy_res; \
319if(__copy_size && __access_ok((unsigned long)__copy_from, __copy_size)) { \
320__copy_res = __copy_user(__copy_to, __copy_from, __copy_size); \
321} else __copy_res = __copy_size; \
322__copy_res; })
323 305
324static __always_inline unsigned long 306static __always_inline unsigned long
325__copy_from_user(void *to, const void __user *from, unsigned long n) 307__copy_from_user(void *to, const void __user *from, unsigned long n)
@@ -507,4 +489,4 @@ struct exception_table_entry
507 489
508extern int fixup_exception(struct pt_regs *regs); 490extern int fixup_exception(struct pt_regs *regs);
509 491
510#endif /* __ASM_SH_UACCESS_H */ 492#endif /* __ASM_SH_UACCESS_32_H */
diff --git a/include/asm-sh/uaccess_64.h b/include/asm-sh/uaccess_64.h
index d54ec082d25a..f956b7b316c7 100644
--- a/include/asm-sh/uaccess_64.h
+++ b/include/asm-sh/uaccess_64.h
@@ -202,15 +202,6 @@ extern void __put_user_unknown(void);
202/* XXX: should be such that: 4byte and the rest. */ 202/* XXX: should be such that: 4byte and the rest. */
203extern __kernel_size_t __copy_user(void *__to, const void *__from, __kernel_size_t __n); 203extern __kernel_size_t __copy_user(void *__to, const void *__from, __kernel_size_t __n);
204 204
205#define copy_to_user(to,from,n) ({ \
206void *__copy_to = (void *) (to); \
207__kernel_size_t __copy_size = (__kernel_size_t) (n); \
208__kernel_size_t __copy_res; \
209if(__copy_size && __access_ok((unsigned long)__copy_to, __copy_size)) { \
210__copy_res = __copy_user(__copy_to, (void *) (from), __copy_size); \
211} else __copy_res = __copy_size; \
212__copy_res; })
213
214#define copy_to_user_ret(to,from,n,retval) ({ \ 205#define copy_to_user_ret(to,from,n,retval) ({ \
215if (copy_to_user(to,from,n)) \ 206if (copy_to_user(to,from,n)) \
216 return retval; \ 207 return retval; \
@@ -225,16 +216,6 @@ if (__copy_to_user(to,from,n)) \
225 return retval; \ 216 return retval; \
226}) 217})
227 218
228#define copy_from_user(to,from,n) ({ \
229void *__copy_to = (void *) (to); \
230void *__copy_from = (void *) (from); \
231__kernel_size_t __copy_size = (__kernel_size_t) (n); \
232__kernel_size_t __copy_res; \
233if(__copy_size && __access_ok((unsigned long)__copy_from, __copy_size)) { \
234__copy_res = __copy_user(__copy_to, __copy_from, __copy_size); \
235} else __copy_res = __copy_size; \
236__copy_res; })
237
238#define copy_from_user_ret(to,from,n,retval) ({ \ 219#define copy_from_user_ret(to,from,n,retval) ({ \
239if (copy_from_user(to,from,n)) \ 220if (copy_from_user(to,from,n)) \
240 return retval; \ 221 return retval; \
diff --git a/include/asm-sh/unistd_32.h b/include/asm-sh/unistd_32.h
index 433fd1b48fa2..0b07212ec659 100644
--- a/include/asm-sh/unistd_32.h
+++ b/include/asm-sh/unistd_32.h
@@ -330,11 +330,13 @@
330#define __NR_epoll_pwait 319 330#define __NR_epoll_pwait 319
331#define __NR_utimensat 320 331#define __NR_utimensat 320
332#define __NR_signalfd 321 332#define __NR_signalfd 321
333/* #define __NR_timerfd 322 removed */ 333#define __NR_timerfd_create 322
334#define __NR_eventfd 323 334#define __NR_eventfd 323
335#define __NR_fallocate 324 335#define __NR_fallocate 324
336#define __NR_timerfd_settime 325
337#define __NR_timerfd_gettime 326
336 338
337#define NR_syscalls 325 339#define NR_syscalls 327
338 340
339#ifdef __KERNEL__ 341#ifdef __KERNEL__
340 342
diff --git a/include/asm-sh/unistd_64.h b/include/asm-sh/unistd_64.h
index 108d2ba897fe..9d21eab52427 100644
--- a/include/asm-sh/unistd_64.h
+++ b/include/asm-sh/unistd_64.h
@@ -90,7 +90,7 @@
90#define __NR_sigpending 73 90#define __NR_sigpending 73
91#define __NR_sethostname 74 91#define __NR_sethostname 74
92#define __NR_setrlimit 75 92#define __NR_setrlimit 75
93#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ 93#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */
94#define __NR_getrusage 77 94#define __NR_getrusage 77
95#define __NR_gettimeofday 78 95#define __NR_gettimeofday 78
96#define __NR_settimeofday 79 96#define __NR_settimeofday 79
@@ -370,9 +370,11 @@
370#define __NR_epoll_pwait 347 370#define __NR_epoll_pwait 347
371#define __NR_utimensat 348 371#define __NR_utimensat 348
372#define __NR_signalfd 349 372#define __NR_signalfd 349
373/* #define __NR_timerfd 350 removed */ 373#define __NR_timerfd_create 350
374#define __NR_eventfd 351 374#define __NR_eventfd 351
375#define __NR_fallocate 352 375#define __NR_fallocate 352
376#define __NR_timerfd_settime 353
377#define __NR_timerfd_gettime 354
376 378
377#ifdef __KERNEL__ 379#ifdef __KERNEL__
378 380
diff --git a/include/asm-x86/cacheflush.h b/include/asm-x86/cacheflush.h
index 6a22212b4b20..5396c212d8c0 100644
--- a/include/asm-x86/cacheflush.h
+++ b/include/asm-x86/cacheflush.h
@@ -48,12 +48,15 @@ void cpa_init(void);
48 48
49#ifdef CONFIG_DEBUG_RODATA 49#ifdef CONFIG_DEBUG_RODATA
50void mark_rodata_ro(void); 50void mark_rodata_ro(void);
51extern const int rodata_test_data;
51#endif 52#endif
53
52#ifdef CONFIG_DEBUG_RODATA_TEST 54#ifdef CONFIG_DEBUG_RODATA_TEST
53void rodata_test(void); 55int rodata_test(void);
54#else 56#else
55static inline void rodata_test(void) 57static inline int rodata_test(void)
56{ 58{
59 return 0;
57} 60}
58#endif 61#endif
59 62
diff --git a/include/asm-x86/kdebug.h b/include/asm-x86/kdebug.h
index dd442a1632c0..99dcbafa1511 100644
--- a/include/asm-x86/kdebug.h
+++ b/include/asm-x86/kdebug.h
@@ -31,7 +31,6 @@ extern void show_trace(struct task_struct *t, struct pt_regs *regs,
31 unsigned long *sp, unsigned long bp); 31 unsigned long *sp, unsigned long bp);
32extern void __show_regs(struct pt_regs *regs); 32extern void __show_regs(struct pt_regs *regs);
33extern void show_regs(struct pt_regs *regs); 33extern void show_regs(struct pt_regs *regs);
34extern void dump_pagetable(unsigned long);
35extern unsigned long oops_begin(void); 34extern unsigned long oops_begin(void);
36extern void oops_end(unsigned long, struct pt_regs *, int signr); 35extern void oops_end(unsigned long, struct pt_regs *, int signr);
37 36
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index ddbe7efe590e..2c7e003356ac 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -203,6 +203,7 @@ extern bool wmi_has_guid(const char *guid);
203extern int acpi_blacklisted(void); 203extern int acpi_blacklisted(void);
204#ifdef CONFIG_DMI 204#ifdef CONFIG_DMI
205extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); 205extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d);
206extern int acpi_osi_setup(char *str);
206#endif 207#endif
207 208
208#ifdef CONFIG_ACPI_NUMA 209#ifdef CONFIG_ACPI_NUMA
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 97153027207a..2af9ec025015 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -534,8 +534,7 @@ extern void audit_log_n_untrustedstring(struct audit_buffer *ab,
534 const char *string); 534 const char *string);
535extern void audit_log_d_path(struct audit_buffer *ab, 535extern void audit_log_d_path(struct audit_buffer *ab,
536 const char *prefix, 536 const char *prefix,
537 struct dentry *dentry, 537 struct path *path);
538 struct vfsmount *vfsmnt);
539extern void audit_log_lost(const char *message); 538extern void audit_log_lost(const char *message);
540 /* Private API (for audit.c only) */ 539 /* Private API (for audit.c only) */
541extern int audit_filter_user(struct netlink_skb_parms *cb, int type); 540extern int audit_filter_user(struct netlink_skb_parms *cb, int type);
@@ -552,7 +551,7 @@ extern int audit_enabled;
552#define audit_log_hex(a,b,l) do { ; } while (0) 551#define audit_log_hex(a,b,l) do { ; } while (0)
553#define audit_log_untrustedstring(a,s) do { ; } while (0) 552#define audit_log_untrustedstring(a,s) do { ; } while (0)
554#define audit_log_n_untrustedstring(a,n,s) do { ; } while (0) 553#define audit_log_n_untrustedstring(a,n,s) do { ; } while (0)
555#define audit_log_d_path(b,p,d,v) do { ; } while (0) 554#define audit_log_d_path(b, p, d) do { ; } while (0)
556#define audit_enabled 0 555#define audit_enabled 0
557#endif 556#endif
558#endif 557#endif
diff --git a/include/linux/configfs.h b/include/linux/configfs.h
index 8c6967f3fb11..4b287ad9371a 100644
--- a/include/linux/configfs.h
+++ b/include/linux/configfs.h
@@ -37,6 +37,7 @@
37 37
38#ifdef __KERNEL__ 38#ifdef __KERNEL__
39 39
40#include <linux/kernel.h>
40#include <linux/types.h> 41#include <linux/types.h>
41#include <linux/list.h> 42#include <linux/list.h>
42#include <linux/kref.h> 43#include <linux/kref.h>
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 385d45b616db..6b72a4584086 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -19,6 +19,7 @@
19 19
20#define CPUIDLE_STATE_MAX 8 20#define CPUIDLE_STATE_MAX 8
21#define CPUIDLE_NAME_LEN 16 21#define CPUIDLE_NAME_LEN 16
22#define CPUIDLE_DESC_LEN 32
22 23
23struct cpuidle_device; 24struct cpuidle_device;
24 25
@@ -29,6 +30,7 @@ struct cpuidle_device;
29 30
30struct cpuidle_state { 31struct cpuidle_state {
31 char name[CPUIDLE_NAME_LEN]; 32 char name[CPUIDLE_NAME_LEN];
33 char desc[CPUIDLE_DESC_LEN];
32 void *driver_data; 34 void *driver_data;
33 35
34 unsigned int flags; 36 unsigned int flags;
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index c2c153f97e8f..6bd646096fa6 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -10,6 +10,7 @@
10#include <linux/rcupdate.h> 10#include <linux/rcupdate.h>
11 11
12struct nameidata; 12struct nameidata;
13struct path;
13struct vfsmount; 14struct vfsmount;
14 15
15/* 16/*
@@ -300,8 +301,8 @@ extern int d_validate(struct dentry *, struct dentry *);
300 */ 301 */
301extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); 302extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
302 303
303extern char * d_path(struct dentry *, struct vfsmount *, char *, int); 304extern char *d_path(struct path *, char *, int);
304 305
305/* Allocation counts.. */ 306/* Allocation counts.. */
306 307
307/** 308/**
diff --git a/include/linux/dcookies.h b/include/linux/dcookies.h
index 98c69ab80c84..24c806f12a6c 100644
--- a/include/linux/dcookies.h
+++ b/include/linux/dcookies.h
@@ -13,6 +13,7 @@
13#ifdef CONFIG_PROFILING 13#ifdef CONFIG_PROFILING
14 14
15#include <linux/dcache.h> 15#include <linux/dcache.h>
16#include <linux/path.h>
16#include <linux/types.h> 17#include <linux/types.h>
17 18
18struct dcookie_user; 19struct dcookie_user;
@@ -43,8 +44,7 @@ void dcookie_unregister(struct dcookie_user * user);
43 * 44 *
44 * Returns 0 on success, with *cookie filled in 45 * Returns 0 on success, with *cookie filled in
45 */ 46 */
46int get_dcookie(struct dentry * dentry, struct vfsmount * vfsmnt, 47int get_dcookie(struct path *path, unsigned long *cookie);
47 unsigned long * cookie);
48 48
49#else 49#else
50 50
@@ -57,13 +57,12 @@ static inline void dcookie_unregister(struct dcookie_user * user)
57{ 57{
58 return; 58 return;
59} 59}
60 60
61static inline int get_dcookie(struct dentry * dentry, 61static inline int get_dcookie(struct path *path, unsigned long *cookie)
62 struct vfsmount * vfsmnt, unsigned long * cookie)
63{ 62{
64 return -ENOSYS; 63 return -ENOSYS;
65} 64}
66 65
67#endif /* CONFIG_PROFILING */ 66#endif /* CONFIG_PROFILING */
68 67
69#endif /* DCOOKIES_H */ 68#endif /* DCOOKIES_H */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 18cfbf76ec5b..98ffb6ead434 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1284,8 +1284,10 @@ struct super_operations {
1284 * 1284 *
1285 * I_DIRTY_SYNC Inode is dirty, but doesn't have to be written on 1285 * I_DIRTY_SYNC Inode is dirty, but doesn't have to be written on
1286 * fdatasync(). i_atime is the usual cause. 1286 * fdatasync(). i_atime is the usual cause.
1287 * I_DIRTY_DATASYNC Inode is dirty and must be written on fdatasync(), f.e. 1287 * I_DIRTY_DATASYNC Data-related inode changes pending. We keep track of
1288 * because i_size changed. 1288 * these changes separately from I_DIRTY_SYNC so that we
1289 * don't have to write inode on fdatasync() when only
1290 * mtime has changed in it.
1289 * I_DIRTY_PAGES Inode has dirty pages. Inode itself may be clean. 1291 * I_DIRTY_PAGES Inode has dirty pages. Inode itself may be clean.
1290 * I_NEW get_new_inode() sets i_state to I_LOCK|I_NEW. Both 1292 * I_NEW get_new_inode() sets i_state to I_LOCK|I_NEW. Both
1291 * are cleared by unlock_new_inode(), called from iget(). 1293 * are cleared by unlock_new_inode(), called from iget().
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h
index 11a36ceddf73..282f54219129 100644
--- a/include/linux/fs_struct.h
+++ b/include/linux/fs_struct.h
@@ -1,15 +1,13 @@
1#ifndef _LINUX_FS_STRUCT_H 1#ifndef _LINUX_FS_STRUCT_H
2#define _LINUX_FS_STRUCT_H 2#define _LINUX_FS_STRUCT_H
3 3
4struct dentry; 4#include <linux/path.h>
5struct vfsmount;
6 5
7struct fs_struct { 6struct fs_struct {
8 atomic_t count; 7 atomic_t count;
9 rwlock_t lock; 8 rwlock_t lock;
10 int umask; 9 int umask;
11 struct dentry * root, * pwd, * altroot; 10 struct path root, pwd, altroot;
12 struct vfsmount * rootmnt, * pwdmnt, * altrootmnt;
13}; 11};
14 12
15#define INIT_FS { \ 13#define INIT_FS { \
@@ -22,8 +20,8 @@ extern struct kmem_cache *fs_cachep;
22 20
23extern void exit_fs(struct task_struct *); 21extern void exit_fs(struct task_struct *);
24extern void set_fs_altroot(void); 22extern void set_fs_altroot(void);
25extern void set_fs_root(struct fs_struct *, struct vfsmount *, struct dentry *); 23extern void set_fs_root(struct fs_struct *, struct path *);
26extern void set_fs_pwd(struct fs_struct *, struct vfsmount *, struct dentry *); 24extern void set_fs_pwd(struct fs_struct *, struct path *);
27extern struct fs_struct *copy_fs_struct(struct fs_struct *); 25extern struct fs_struct *copy_fs_struct(struct fs_struct *);
28extern void put_fs_struct(struct fs_struct *); 26extern void put_fs_struct(struct fs_struct *);
29 27
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 3902690647b0..74ff57596eb1 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -528,7 +528,7 @@ int hid_set_field(struct hid_field *, unsigned, __s32);
528int hid_input_report(struct hid_device *, int type, u8 *, int, int); 528int hid_input_report(struct hid_device *, int type, u8 *, int, int);
529int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field); 529int hidinput_find_field(struct hid_device *hid, unsigned int type, unsigned int code, struct hid_field **field);
530int hidinput_mapping_quirks(struct hid_usage *, struct input_dev *, unsigned long **, int *); 530int hidinput_mapping_quirks(struct hid_usage *, struct input_dev *, unsigned long **, int *);
531void hidinput_event_quirks(struct hid_device *, struct hid_field *, struct hid_usage *, __s32); 531int hidinput_event_quirks(struct hid_device *, struct hid_field *, struct hid_usage *, __s32);
532int hidinput_apple_event(struct hid_device *, struct input_dev *, struct hid_usage *, __s32); 532int hidinput_apple_event(struct hid_device *, struct input_dev *, struct hid_usage *, __s32);
533void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt); 533void hid_input_field(struct hid_device *hid, struct hid_field *field, __u8 *data, int interrupt);
534void hid_output_report(struct hid_report *report, __u8 *data); 534void hid_output_report(struct hid_report *report, __u8 *data);
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index 36c542b70c6d..2cd7fa73d1af 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -310,6 +310,8 @@ static inline ktime_t ktime_sub_us(const ktime_t kt, const u64 usec)
310 return ktime_sub_ns(kt, usec * 1000); 310 return ktime_sub_ns(kt, usec * 1000);
311} 311}
312 312
313extern ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs);
314
313/* 315/*
314 * The resolution of the clocks. The resolution value is returned in 316 * The resolution of the clocks. The resolution value is returned in
315 * the clock_getres() system call to give application programmers an 317 * the clock_getres() system call to give application programmers an
diff --git a/include/linux/maple.h b/include/linux/maple.h
index bad9a7b319de..3f01e2bae1a1 100644
--- a/include/linux/maple.h
+++ b/include/linux/maple.h
@@ -7,74 +7,74 @@ extern struct bus_type maple_bus_type;
7 7
8/* Maple Bus command and response codes */ 8/* Maple Bus command and response codes */
9enum maple_code { 9enum maple_code {
10 MAPLE_RESPONSE_FILEERR = -5, 10 MAPLE_RESPONSE_FILEERR = -5,
11 MAPLE_RESPONSE_AGAIN = -4, /* request should be retransmitted */ 11 MAPLE_RESPONSE_AGAIN = -4, /* request should be retransmitted */
12 MAPLE_RESPONSE_BADCMD = -3, 12 MAPLE_RESPONSE_BADCMD = -3,
13 MAPLE_RESPONSE_BADFUNC = -2, 13 MAPLE_RESPONSE_BADFUNC = -2,
14 MAPLE_RESPONSE_NONE = -1, /* unit didn't respond at all */ 14 MAPLE_RESPONSE_NONE = -1, /* unit didn't respond at all */
15 MAPLE_COMMAND_DEVINFO = 1, 15 MAPLE_COMMAND_DEVINFO = 1,
16 MAPLE_COMMAND_ALLINFO = 2, 16 MAPLE_COMMAND_ALLINFO = 2,
17 MAPLE_COMMAND_RESET = 3, 17 MAPLE_COMMAND_RESET = 3,
18 MAPLE_COMMAND_KILL = 4, 18 MAPLE_COMMAND_KILL = 4,
19 MAPLE_RESPONSE_DEVINFO = 5, 19 MAPLE_RESPONSE_DEVINFO = 5,
20 MAPLE_RESPONSE_ALLINFO = 6, 20 MAPLE_RESPONSE_ALLINFO = 6,
21 MAPLE_RESPONSE_OK = 7, 21 MAPLE_RESPONSE_OK = 7,
22 MAPLE_RESPONSE_DATATRF = 8, 22 MAPLE_RESPONSE_DATATRF = 8,
23 MAPLE_COMMAND_GETCOND = 9, 23 MAPLE_COMMAND_GETCOND = 9,
24 MAPLE_COMMAND_GETMINFO = 10, 24 MAPLE_COMMAND_GETMINFO = 10,
25 MAPLE_COMMAND_BREAD = 11, 25 MAPLE_COMMAND_BREAD = 11,
26 MAPLE_COMMAND_BWRITE = 12, 26 MAPLE_COMMAND_BWRITE = 12,
27 MAPLE_COMMAND_SETCOND = 14 27 MAPLE_COMMAND_SETCOND = 14
28}; 28};
29 29
30struct mapleq { 30struct mapleq {
31 struct list_head list; 31 struct list_head list;
32 struct maple_device *dev; 32 struct maple_device *dev;
33 void *sendbuf, *recvbuf, *recvbufdcsp; 33 void *sendbuf, *recvbuf, *recvbufdcsp;
34 unsigned char length; 34 unsigned char length;
35 enum maple_code command; 35 enum maple_code command;
36}; 36};
37 37
38struct maple_devinfo { 38struct maple_devinfo {
39 unsigned long function; 39 unsigned long function;
40 unsigned long function_data[3]; 40 unsigned long function_data[3];
41 unsigned char area_code; 41 unsigned char area_code;
42 unsigned char connector_directon; 42 unsigned char connector_direction;
43 char product_name[31]; 43 char product_name[31];
44 char product_licence[61]; 44 char product_licence[61];
45 unsigned short standby_power; 45 unsigned short standby_power;
46 unsigned short max_power; 46 unsigned short max_power;
47}; 47};
48 48
49struct maple_device { 49struct maple_device {
50 struct maple_driver *driver; 50 struct maple_driver *driver;
51 struct mapleq *mq; 51 struct mapleq *mq;
52 void *private_data; 52 void *private_data;
53 void (*callback) (struct mapleq * mq); 53 void (*callback) (struct mapleq * mq);
54 unsigned long when, interval, function; 54 unsigned long when, interval, function;
55 struct maple_devinfo devinfo; 55 struct maple_devinfo devinfo;
56 unsigned char port, unit; 56 unsigned char port, unit;
57 char product_name[32]; 57 char product_name[32];
58 char product_licence[64]; 58 char product_licence[64];
59 int registered; 59 struct device dev;
60 struct device dev;
61}; 60};
62 61
63struct maple_driver { 62struct maple_driver {
64 unsigned long function; 63 unsigned long function;
65 int (*connect) (struct maple_device * dev); 64 int (*connect) (struct maple_device * dev);
66 void (*disconnect) (struct maple_device * dev); 65 void (*disconnect) (struct maple_device * dev);
67 struct device_driver drv; 66 struct device_driver drv;
67 int registered;
68}; 68};
69 69
70void maple_getcond_callback(struct maple_device *dev, 70void maple_getcond_callback(struct maple_device *dev,
71 void (*callback) (struct mapleq * mq), 71 void (*callback) (struct mapleq * mq),
72 unsigned long interval, 72 unsigned long interval,
73 unsigned long function); 73 unsigned long function);
74int maple_driver_register(struct device_driver *drv); 74int maple_driver_register(struct device_driver *drv);
75void maple_add_packet(struct mapleq *mq); 75void maple_add_packet(struct mapleq *mq);
76 76
77#define to_maple_dev(n) container_of(n, struct maple_device, dev) 77#define to_maple_dev(n) container_of(n, struct maple_device, dev)
78#define to_maple_driver(n) container_of(n, struct maple_driver, drv) 78#define to_maple_driver(n) container_of(n, struct maple_driver, drv)
79 79
80#endif /* __LINUX_MAPLE_H */ 80#endif /* __LINUX_MAPLE_H */
diff --git a/include/linux/module.h b/include/linux/module.h
index 330bec08c2c4..819c4e889bf1 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -567,8 +567,7 @@ static inline void print_modules(void)
567{ 567{
568} 568}
569 569
570static inline void module_update_markers(struct module *probe_module, 570static inline void module_update_markers(void)
571 int *refcount)
572{ 571{
573} 572}
574 573
diff --git a/include/linux/namei.h b/include/linux/namei.h
index c13e411491f4..24d88e98a626 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -3,6 +3,7 @@
3 3
4#include <linux/dcache.h> 4#include <linux/dcache.h>
5#include <linux/linkage.h> 5#include <linux/linkage.h>
6#include <linux/path.h>
6 7
7struct vfsmount; 8struct vfsmount;
8 9
@@ -15,8 +16,7 @@ struct open_intent {
15enum { MAX_NESTED_LINKS = 8 }; 16enum { MAX_NESTED_LINKS = 8 };
16 17
17struct nameidata { 18struct nameidata {
18 struct dentry *dentry; 19 struct path path;
19 struct vfsmount *mnt;
20 struct qstr last; 20 struct qstr last;
21 unsigned int flags; 21 unsigned int flags;
22 int last_type; 22 int last_type;
@@ -29,11 +29,6 @@ struct nameidata {
29 } intent; 29 } intent;
30}; 30};
31 31
32struct path {
33 struct vfsmount *mnt;
34 struct dentry *dentry;
35};
36
37/* 32/*
38 * Type of the last component on LOOKUP_PARENT 33 * Type of the last component on LOOKUP_PARENT
39 */ 34 */
@@ -71,8 +66,6 @@ extern int __user_walk_fd(int dfd, const char __user *, unsigned, struct nameida
71extern int path_lookup(const char *, unsigned, struct nameidata *); 66extern int path_lookup(const char *, unsigned, struct nameidata *);
72extern int vfs_path_lookup(struct dentry *, struct vfsmount *, 67extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
73 const char *, unsigned int, struct nameidata *); 68 const char *, unsigned int, struct nameidata *);
74extern void path_release(struct nameidata *);
75extern void path_release_on_umount(struct nameidata *);
76 69
77extern int __user_path_lookup_open(const char __user *, unsigned lookup_flags, struct nameidata *nd, int open_flags); 70extern int __user_path_lookup_open(const char __user *, unsigned lookup_flags, struct nameidata *nd, int open_flags);
78extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags); 71extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags);
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
index 3a1687251367..5431512b2757 100644
--- a/include/linux/nfsd/export.h
+++ b/include/linux/nfsd/export.h
@@ -84,9 +84,8 @@ struct svc_export {
84 struct cache_head h; 84 struct cache_head h;
85 struct auth_domain * ex_client; 85 struct auth_domain * ex_client;
86 int ex_flags; 86 int ex_flags;
87 struct vfsmount * ex_mnt; 87 struct path ex_path;
88 struct dentry * ex_dentry; 88 char *ex_pathname;
89 char * ex_path;
90 uid_t ex_anon_uid; 89 uid_t ex_anon_uid;
91 gid_t ex_anon_gid; 90 gid_t ex_anon_gid;
92 int ex_fsid; 91 int ex_fsid;
@@ -107,8 +106,7 @@ struct svc_expkey {
107 int ek_fsidtype; 106 int ek_fsidtype;
108 u32 ek_fsid[6]; 107 u32 ek_fsid[6];
109 108
110 struct vfsmount * ek_mnt; 109 struct path ek_path;
111 struct dentry * ek_dentry;
112}; 110};
113 111
114#define EX_SECURE(exp) (!((exp)->ex_flags & NFSEXP_INSECURE_PORT)) 112#define EX_SECURE(exp) (!((exp)->ex_flags & NFSEXP_INSECURE_PORT))
diff --git a/include/linux/path.h b/include/linux/path.h
new file mode 100644
index 000000000000..915e0c382a51
--- /dev/null
+++ b/include/linux/path.h
@@ -0,0 +1,15 @@
1#ifndef _LINUX_PATH_H
2#define _LINUX_PATH_H
3
4struct dentry;
5struct vfsmount;
6
7struct path {
8 struct vfsmount *mnt;
9 struct dentry *dentry;
10};
11
12extern void path_get(struct path *);
13extern void path_put(struct path *);
14
15#endif /* _LINUX_PATH_H */
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index d6a4f69bdc92..d9a9e718ad19 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -269,7 +269,7 @@ extern void kclist_add(struct kcore_list *, void *, size_t);
269#endif 269#endif
270 270
271union proc_op { 271union proc_op {
272 int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **); 272 int (*proc_get_link)(struct inode *, struct path *);
273 int (*proc_read)(struct task_struct *task, char *page); 273 int (*proc_read)(struct task_struct *task, char *page);
274 int (*proc_show)(struct seq_file *m, 274 int (*proc_show)(struct seq_file *m,
275 struct pid_namespace *ns, struct pid *pid, 275 struct pid_namespace *ns, struct pid *pid,
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index 648dfeb444db..67c2563961f3 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -8,8 +8,7 @@
8 8
9struct seq_operations; 9struct seq_operations;
10struct file; 10struct file;
11struct vfsmount; 11struct path;
12struct dentry;
13struct inode; 12struct inode;
14 13
15struct seq_file { 14struct seq_file {
@@ -42,7 +41,7 @@ int seq_puts(struct seq_file *m, const char *s);
42int seq_printf(struct seq_file *, const char *, ...) 41int seq_printf(struct seq_file *, const char *, ...)
43 __attribute__ ((format (printf,2,3))); 42 __attribute__ ((format (printf,2,3)));
44 43
45int seq_path(struct seq_file *, struct vfsmount *, struct dentry *, char *); 44int seq_path(struct seq_file *, struct path *, char *);
46 45
47int single_open(struct file *, int (*)(struct seq_file *, void *), void *); 46int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
48int single_release(struct inode *, struct file *); 47int single_release(struct inode *, struct file *);
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index 5e6d3d634d5b..57deecc79d52 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -71,6 +71,7 @@ struct kmem_cache {
71 71
72 /* Allocation and freeing of slabs */ 72 /* Allocation and freeing of slabs */
73 int objects; /* Number of objects in slab */ 73 int objects; /* Number of objects in slab */
74 gfp_t allocflags; /* gfp flags to use on each alloc */
74 int refcount; /* Refcount for slab cache destroy */ 75 int refcount; /* Refcount for slab cache destroy */
75 void (*ctor)(struct kmem_cache *, void *); 76 void (*ctor)(struct kmem_cache *, void *);
76 int inuse; /* Offset to metadata */ 77 int inuse; /* Offset to metadata */
@@ -110,7 +111,7 @@ struct kmem_cache {
110 * We keep the general caches in an array of slab caches that are used for 111 * We keep the general caches in an array of slab caches that are used for
111 * 2^x bytes of allocations. 112 * 2^x bytes of allocations.
112 */ 113 */
113extern struct kmem_cache kmalloc_caches[PAGE_SHIFT]; 114extern struct kmem_cache kmalloc_caches[PAGE_SHIFT + 1];
114 115
115/* 116/*
116 * Sorry that the following has to be that ugly but some versions of GCC 117 * Sorry that the following has to be that ugly but some versions of GCC
@@ -188,12 +189,16 @@ static __always_inline struct kmem_cache *kmalloc_slab(size_t size)
188void *kmem_cache_alloc(struct kmem_cache *, gfp_t); 189void *kmem_cache_alloc(struct kmem_cache *, gfp_t);
189void *__kmalloc(size_t size, gfp_t flags); 190void *__kmalloc(size_t size, gfp_t flags);
190 191
192static __always_inline void *kmalloc_large(size_t size, gfp_t flags)
193{
194 return (void *)__get_free_pages(flags | __GFP_COMP, get_order(size));
195}
196
191static __always_inline void *kmalloc(size_t size, gfp_t flags) 197static __always_inline void *kmalloc(size_t size, gfp_t flags)
192{ 198{
193 if (__builtin_constant_p(size)) { 199 if (__builtin_constant_p(size)) {
194 if (size > PAGE_SIZE / 2) 200 if (size > PAGE_SIZE)
195 return (void *)__get_free_pages(flags | __GFP_COMP, 201 return kmalloc_large(size, flags);
196 get_order(size));
197 202
198 if (!(flags & SLUB_DMA)) { 203 if (!(flags & SLUB_DMA)) {
199 struct kmem_cache *s = kmalloc_slab(size); 204 struct kmem_cache *s = kmalloc_slab(size);
@@ -214,7 +219,7 @@ void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node);
214static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) 219static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node)
215{ 220{
216 if (__builtin_constant_p(size) && 221 if (__builtin_constant_p(size) &&
217 size <= PAGE_SIZE / 2 && !(flags & SLUB_DMA)) { 222 size <= PAGE_SIZE && !(flags & SLUB_DMA)) {
218 struct kmem_cache *s = kmalloc_slab(size); 223 struct kmem_cache *s = kmalloc_slab(size);
219 224
220 if (!s) 225 if (!s)