diff options
author | James Morris <jmorris@namei.org> | 2008-11-18 02:52:37 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-11-18 02:52:37 -0500 |
commit | f3a5c547012a09f38f7c27b17a8e3150b69cd259 (patch) | |
tree | 4d1d47382a4a445fc7ef7431bcf5d06b7cca8539 /arch | |
parent | e50a906e0200084f04f8f3b7c3a14b0442d1347f (diff) | |
parent | 4e14e833ac3b97a4aa8803eea49f899adc5bb5f4 (diff) |
Merge branch 'master' into next
Conflicts:
fs/cifs/misc.c
Merge to resolve above, per the patch below.
Signed-off-by: James Morris <jmorris@namei.org>
diff --cc fs/cifs/misc.c
index ec36410,addd1dc..0000000
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@@ -347,13 -338,13 +338,13 @@@ header_assemble(struct smb_hdr *buffer
/* BB Add support for establishing new tCon and SMB Session */
/* with userid/password pairs found on the smb session */
/* for other target tcp/ip addresses BB */
- if (current->fsuid != treeCon->ses->linux_uid) {
+ if (current_fsuid() != treeCon->ses->linux_uid) {
cFYI(1, ("Multiuser mode and UID "
"did not match tcon uid"));
- read_lock(&GlobalSMBSeslock);
- list_for_each(temp_item, &GlobalSMBSessionList) {
- ses = list_entry(temp_item, struct cifsSesInfo, cifsSessionList);
+ read_lock(&cifs_tcp_ses_lock);
+ list_for_each(temp_item, &treeCon->ses->server->smb_ses_list) {
+ ses = list_entry(temp_item, struct cifsSesInfo, smb_ses_list);
- if (ses->linux_uid == current->fsuid) {
+ if (ses->linux_uid == current_fsuid()) {
if (ses->server == treeCon->ses->server) {
cFYI(1, ("found matching uid substitute right smb_uid"));
buffer->Uid = ses->Suid;
Diffstat (limited to 'arch')
-rw-r--r-- | arch/m68k/kernel/ints.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/entry.S | 20 | ||||
-rw-r--r-- | arch/s390/kernel/entry64.S | 11 | ||||
-rw-r--r-- | arch/s390/kernel/process.c | 3 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 4 | ||||
-rw-r--r-- | arch/s390/kernel/sys_s390.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/topology.c | 11 | ||||
-rw-r--r-- | arch/sh/include/asm/io.h | 4 | ||||
-rw-r--r-- | arch/sh/include/asm/pgtable.h | 6 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 6 | ||||
-rw-r--r-- | arch/sh/kernel/early_printk.c | 3 | ||||
-rw-r--r-- | arch/sh/kernel/timers/timer-tmu.c | 2 | ||||
-rw-r--r-- | arch/sh/lib/copy_page.S | 11 | ||||
-rw-r--r-- | arch/sh/mm/Makefile_32 | 2 | ||||
-rw-r--r-- | arch/sh/mm/Makefile_64 | 2 | ||||
-rw-r--r-- | arch/sh/mm/init.c | 12 | ||||
-rw-r--r-- | arch/sh/mm/mmap.c | 31 | ||||
-rw-r--r-- | arch/sh/mm/pg-sh4.c | 17 | ||||
-rw-r--r-- | arch/sparc/include/asm/termbits.h | 11 | ||||
-rw-r--r-- | arch/sparc/kernel/of_device.c | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/iommu.h | 1 | ||||
-rw-r--r-- | arch/x86/kernel/early-quirks.c | 18 |
22 files changed, 124 insertions, 59 deletions
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c index 7e8a0d394e61..761ee0440c99 100644 --- a/arch/m68k/kernel/ints.c +++ b/arch/m68k/kernel/ints.c | |||
@@ -133,7 +133,7 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, | |||
133 | { | 133 | { |
134 | int i; | 134 | int i; |
135 | 135 | ||
136 | BUG_ON(IRQ_USER + cnt >= NR_IRQS); | 136 | BUG_ON(IRQ_USER + cnt > NR_IRQS); |
137 | m68k_first_user_vec = vec; | 137 | m68k_first_user_vec = vec; |
138 | for (i = 0; i < cnt; i++) | 138 | for (i = 0; i < cnt; i++) |
139 | irq_controller[IRQ_USER + i] = &user_irq_controller; | 139 | irq_controller[IRQ_USER + i] = &user_irq_controller; |
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index ed500ef799b7..08844fc24a2e 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -61,22 +61,25 @@ STACK_SIZE = 1 << STACK_SHIFT | |||
61 | 61 | ||
62 | #ifdef CONFIG_TRACE_IRQFLAGS | 62 | #ifdef CONFIG_TRACE_IRQFLAGS |
63 | .macro TRACE_IRQS_ON | 63 | .macro TRACE_IRQS_ON |
64 | l %r1,BASED(.Ltrace_irq_on) | 64 | basr %r2,%r0 |
65 | l %r1,BASED(.Ltrace_irq_on_caller) | ||
65 | basr %r14,%r1 | 66 | basr %r14,%r1 |
66 | .endm | 67 | .endm |
67 | 68 | ||
68 | .macro TRACE_IRQS_OFF | 69 | .macro TRACE_IRQS_OFF |
69 | l %r1,BASED(.Ltrace_irq_off) | 70 | basr %r2,%r0 |
71 | l %r1,BASED(.Ltrace_irq_off_caller) | ||
70 | basr %r14,%r1 | 72 | basr %r14,%r1 |
71 | .endm | 73 | .endm |
72 | 74 | ||
73 | .macro TRACE_IRQS_CHECK | 75 | .macro TRACE_IRQS_CHECK |
76 | basr %r2,%r0 | ||
74 | tm SP_PSW(%r15),0x03 # irqs enabled? | 77 | tm SP_PSW(%r15),0x03 # irqs enabled? |
75 | jz 0f | 78 | jz 0f |
76 | l %r1,BASED(.Ltrace_irq_on) | 79 | l %r1,BASED(.Ltrace_irq_on_caller) |
77 | basr %r14,%r1 | 80 | basr %r14,%r1 |
78 | j 1f | 81 | j 1f |
79 | 0: l %r1,BASED(.Ltrace_irq_off) | 82 | 0: l %r1,BASED(.Ltrace_irq_off_caller) |
80 | basr %r14,%r1 | 83 | basr %r14,%r1 |
81 | 1: | 84 | 1: |
82 | .endm | 85 | .endm |
@@ -1113,9 +1116,12 @@ cleanup_io_leave_insn: | |||
1113 | .Lschedtail: .long schedule_tail | 1116 | .Lschedtail: .long schedule_tail |
1114 | .Lsysc_table: .long sys_call_table | 1117 | .Lsysc_table: .long sys_call_table |
1115 | #ifdef CONFIG_TRACE_IRQFLAGS | 1118 | #ifdef CONFIG_TRACE_IRQFLAGS |
1116 | .Ltrace_irq_on: .long trace_hardirqs_on | 1119 | .Ltrace_irq_on_caller: |
1117 | .Ltrace_irq_off: | 1120 | .long trace_hardirqs_on_caller |
1118 | .long trace_hardirqs_off | 1121 | .Ltrace_irq_off_caller: |
1122 | .long trace_hardirqs_off_caller | ||
1123 | #endif | ||
1124 | #ifdef CONFIG_LOCKDEP | ||
1119 | .Llockdep_sys_exit: | 1125 | .Llockdep_sys_exit: |
1120 | .long lockdep_sys_exit | 1126 | .long lockdep_sys_exit |
1121 | #endif | 1127 | #endif |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index d7ce150453f2..41aca06682aa 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -61,19 +61,22 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME | _TIF_NEED_RESCHED | \ | |||
61 | 61 | ||
62 | #ifdef CONFIG_TRACE_IRQFLAGS | 62 | #ifdef CONFIG_TRACE_IRQFLAGS |
63 | .macro TRACE_IRQS_ON | 63 | .macro TRACE_IRQS_ON |
64 | brasl %r14,trace_hardirqs_on | 64 | basr %r2,%r0 |
65 | brasl %r14,trace_hardirqs_on_caller | ||
65 | .endm | 66 | .endm |
66 | 67 | ||
67 | .macro TRACE_IRQS_OFF | 68 | .macro TRACE_IRQS_OFF |
68 | brasl %r14,trace_hardirqs_off | 69 | basr %r2,%r0 |
70 | brasl %r14,trace_hardirqs_off_caller | ||
69 | .endm | 71 | .endm |
70 | 72 | ||
71 | .macro TRACE_IRQS_CHECK | 73 | .macro TRACE_IRQS_CHECK |
74 | basr %r2,%r0 | ||
72 | tm SP_PSW(%r15),0x03 # irqs enabled? | 75 | tm SP_PSW(%r15),0x03 # irqs enabled? |
73 | jz 0f | 76 | jz 0f |
74 | brasl %r14,trace_hardirqs_on | 77 | brasl %r14,trace_hardirqs_on_caller |
75 | j 1f | 78 | j 1f |
76 | 0: brasl %r14,trace_hardirqs_off | 79 | 0: brasl %r14,trace_hardirqs_off_caller |
77 | 1: | 80 | 1: |
78 | .endm | 81 | .endm |
79 | #else | 82 | #else |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 3e2c05cb6a87..04f8c67a6101 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -136,9 +136,12 @@ static void default_idle(void) | |||
136 | return; | 136 | return; |
137 | } | 137 | } |
138 | trace_hardirqs_on(); | 138 | trace_hardirqs_on(); |
139 | /* Don't trace preempt off for idle. */ | ||
140 | stop_critical_timings(); | ||
139 | /* Wait for external, I/O or machine check interrupt. */ | 141 | /* Wait for external, I/O or machine check interrupt. */ |
140 | __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT | | 142 | __load_psw_mask(psw_kernel_bits | PSW_MASK_WAIT | |
141 | PSW_MASK_IO | PSW_MASK_EXT); | 143 | PSW_MASK_IO | PSW_MASK_EXT); |
144 | start_critical_timings(); | ||
142 | } | 145 | } |
143 | 146 | ||
144 | void cpu_idle(void) | 147 | void cpu_idle(void) |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 62122bad1e33..400b040df7fa 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -604,13 +604,13 @@ setup_memory(void) | |||
604 | if (memory_chunk[i].type != CHUNK_READ_WRITE) | 604 | if (memory_chunk[i].type != CHUNK_READ_WRITE) |
605 | continue; | 605 | continue; |
606 | start_chunk = PFN_DOWN(memory_chunk[i].addr); | 606 | start_chunk = PFN_DOWN(memory_chunk[i].addr); |
607 | end_chunk = start_chunk + PFN_DOWN(memory_chunk[i].size) - 1; | 607 | end_chunk = start_chunk + PFN_DOWN(memory_chunk[i].size); |
608 | end_chunk = min(end_chunk, end_pfn); | 608 | end_chunk = min(end_chunk, end_pfn); |
609 | if (start_chunk >= end_chunk) | 609 | if (start_chunk >= end_chunk) |
610 | continue; | 610 | continue; |
611 | add_active_range(0, start_chunk, end_chunk); | 611 | add_active_range(0, start_chunk, end_chunk); |
612 | pfn = max(start_chunk, start_pfn); | 612 | pfn = max(start_chunk, start_pfn); |
613 | for (; pfn <= end_chunk; pfn++) | 613 | for (; pfn < end_chunk; pfn++) |
614 | page_set_storage_key(PFN_PHYS(pfn), PAGE_DEFAULT_KEY); | 614 | page_set_storage_key(PFN_PHYS(pfn), PAGE_DEFAULT_KEY); |
615 | } | 615 | } |
616 | 616 | ||
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c index 5fdb799062b7..4fe952e557ac 100644 --- a/arch/s390/kernel/sys_s390.c +++ b/arch/s390/kernel/sys_s390.c | |||
@@ -198,7 +198,7 @@ asmlinkage long s390x_newuname(struct new_utsname __user *name) | |||
198 | { | 198 | { |
199 | int ret = sys_newuname(name); | 199 | int ret = sys_newuname(name); |
200 | 200 | ||
201 | if (current->personality == PER_LINUX32 && !ret) { | 201 | if (personality(current->personality) == PER_LINUX32 && !ret) { |
202 | ret = copy_to_user(name->machine, "s390\0\0\0\0", 8); | 202 | ret = copy_to_user(name->machine, "s390\0\0\0\0", 8); |
203 | if (ret) ret = -EFAULT; | 203 | if (ret) ret = -EFAULT; |
204 | } | 204 | } |
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 632b13e10053..a947899dcba1 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c | |||
@@ -65,18 +65,21 @@ static int machine_has_topology_irq; | |||
65 | static struct timer_list topology_timer; | 65 | static struct timer_list topology_timer; |
66 | static void set_topology_timer(void); | 66 | static void set_topology_timer(void); |
67 | static DECLARE_WORK(topology_work, topology_work_fn); | 67 | static DECLARE_WORK(topology_work, topology_work_fn); |
68 | /* topology_lock protects the core linked list */ | ||
69 | static DEFINE_SPINLOCK(topology_lock); | ||
68 | 70 | ||
69 | cpumask_t cpu_core_map[NR_CPUS]; | 71 | cpumask_t cpu_core_map[NR_CPUS]; |
70 | 72 | ||
71 | cpumask_t cpu_coregroup_map(unsigned int cpu) | 73 | cpumask_t cpu_coregroup_map(unsigned int cpu) |
72 | { | 74 | { |
73 | struct core_info *core = &core_info; | 75 | struct core_info *core = &core_info; |
76 | unsigned long flags; | ||
74 | cpumask_t mask; | 77 | cpumask_t mask; |
75 | 78 | ||
76 | cpus_clear(mask); | 79 | cpus_clear(mask); |
77 | if (!machine_has_topology) | 80 | if (!machine_has_topology) |
78 | return cpu_present_map; | 81 | return cpu_present_map; |
79 | mutex_lock(&smp_cpu_state_mutex); | 82 | spin_lock_irqsave(&topology_lock, flags); |
80 | while (core) { | 83 | while (core) { |
81 | if (cpu_isset(cpu, core->mask)) { | 84 | if (cpu_isset(cpu, core->mask)) { |
82 | mask = core->mask; | 85 | mask = core->mask; |
@@ -84,7 +87,7 @@ cpumask_t cpu_coregroup_map(unsigned int cpu) | |||
84 | } | 87 | } |
85 | core = core->next; | 88 | core = core->next; |
86 | } | 89 | } |
87 | mutex_unlock(&smp_cpu_state_mutex); | 90 | spin_unlock_irqrestore(&topology_lock, flags); |
88 | if (cpus_empty(mask)) | 91 | if (cpus_empty(mask)) |
89 | mask = cpumask_of_cpu(cpu); | 92 | mask = cpumask_of_cpu(cpu); |
90 | return mask; | 93 | return mask; |
@@ -133,7 +136,7 @@ static void tl_to_cores(struct tl_info *info) | |||
133 | union tl_entry *tle, *end; | 136 | union tl_entry *tle, *end; |
134 | struct core_info *core = &core_info; | 137 | struct core_info *core = &core_info; |
135 | 138 | ||
136 | mutex_lock(&smp_cpu_state_mutex); | 139 | spin_lock_irq(&topology_lock); |
137 | clear_cores(); | 140 | clear_cores(); |
138 | tle = info->tle; | 141 | tle = info->tle; |
139 | end = (union tl_entry *)((unsigned long)info + info->length); | 142 | end = (union tl_entry *)((unsigned long)info + info->length); |
@@ -157,7 +160,7 @@ static void tl_to_cores(struct tl_info *info) | |||
157 | } | 160 | } |
158 | tle = next_tle(tle); | 161 | tle = next_tle(tle); |
159 | } | 162 | } |
160 | mutex_unlock(&smp_cpu_state_mutex); | 163 | spin_unlock_irq(&topology_lock); |
161 | } | 164 | } |
162 | 165 | ||
163 | static void topology_update_polarization_simple(void) | 166 | static void topology_update_polarization_simple(void) |
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 436c28539577..65eaae34e753 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h | |||
@@ -293,6 +293,10 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) | |||
293 | */ | 293 | */ |
294 | #define xlate_dev_kmem_ptr(p) p | 294 | #define xlate_dev_kmem_ptr(p) p |
295 | 295 | ||
296 | #define ARCH_HAS_VALID_PHYS_ADDR_RANGE | ||
297 | int valid_phys_addr_range(unsigned long addr, size_t size); | ||
298 | int valid_mmap_phys_addr_range(unsigned long pfn, size_t size); | ||
299 | |||
296 | #endif /* __KERNEL__ */ | 300 | #endif /* __KERNEL__ */ |
297 | 301 | ||
298 | #endif /* __ASM_SH_IO_H */ | 302 | #endif /* __ASM_SH_IO_H */ |
diff --git a/arch/sh/include/asm/pgtable.h b/arch/sh/include/asm/pgtable.h index 52220d70a096..b517ae08b9c0 100644 --- a/arch/sh/include/asm/pgtable.h +++ b/arch/sh/include/asm/pgtable.h | |||
@@ -148,6 +148,12 @@ extern void paging_init(void); | |||
148 | extern void page_table_range_init(unsigned long start, unsigned long end, | 148 | extern void page_table_range_init(unsigned long start, unsigned long end, |
149 | pgd_t *pgd); | 149 | pgd_t *pgd); |
150 | 150 | ||
151 | #if !defined(CONFIG_CACHE_OFF) && defined(CONFIG_CPU_SH4) && defined(CONFIG_MMU) | ||
152 | extern void kmap_coherent_init(void); | ||
153 | #else | ||
154 | #define kmap_coherent_init() do { } while (0) | ||
155 | #endif | ||
156 | |||
151 | #include <asm-generic/pgtable.h> | 157 | #include <asm-generic/pgtable.h> |
152 | 158 | ||
153 | #endif /* __ASM_SH_PGTABLE_H */ | 159 | #endif /* __ASM_SH_PGTABLE_H */ |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index a7412cede534..6d9e6972cfc9 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c | |||
@@ -119,17 +119,17 @@ static struct plat_sci_port sci_platform_data[] = { | |||
119 | },{ | 119 | },{ |
120 | .mapbase = 0xa4e30000, | 120 | .mapbase = 0xa4e30000, |
121 | .flags = UPF_BOOT_AUTOCONF, | 121 | .flags = UPF_BOOT_AUTOCONF, |
122 | .type = PORT_SCI, | 122 | .type = PORT_SCIFA, |
123 | .irqs = { 56, 56, 56, 56 }, | 123 | .irqs = { 56, 56, 56, 56 }, |
124 | },{ | 124 | },{ |
125 | .mapbase = 0xa4e40000, | 125 | .mapbase = 0xa4e40000, |
126 | .flags = UPF_BOOT_AUTOCONF, | 126 | .flags = UPF_BOOT_AUTOCONF, |
127 | .type = PORT_SCI, | 127 | .type = PORT_SCIFA, |
128 | .irqs = { 88, 88, 88, 88 }, | 128 | .irqs = { 88, 88, 88, 88 }, |
129 | },{ | 129 | },{ |
130 | .mapbase = 0xa4e50000, | 130 | .mapbase = 0xa4e50000, |
131 | .flags = UPF_BOOT_AUTOCONF, | 131 | .flags = UPF_BOOT_AUTOCONF, |
132 | .type = PORT_SCI, | 132 | .type = PORT_SCIFA, |
133 | .irqs = { 109, 109, 109, 109 }, | 133 | .irqs = { 109, 109, 109, 109 }, |
134 | }, { | 134 | }, { |
135 | .flags = 0, | 135 | .flags = 0, |
diff --git a/arch/sh/kernel/early_printk.c b/arch/sh/kernel/early_printk.c index 6b7d166694e2..a952dcf9999d 100644 --- a/arch/sh/kernel/early_printk.c +++ b/arch/sh/kernel/early_printk.c | |||
@@ -75,6 +75,7 @@ static struct console bios_console = { | |||
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | static struct uart_port scif_port = { | 77 | static struct uart_port scif_port = { |
78 | .type = PORT_SCIF, | ||
78 | .mapbase = CONFIG_EARLY_SCIF_CONSOLE_PORT, | 79 | .mapbase = CONFIG_EARLY_SCIF_CONSOLE_PORT, |
79 | .membase = (char __iomem *)CONFIG_EARLY_SCIF_CONSOLE_PORT, | 80 | .membase = (char __iomem *)CONFIG_EARLY_SCIF_CONSOLE_PORT, |
80 | }; | 81 | }; |
@@ -84,9 +85,9 @@ static void scif_sercon_putc(int c) | |||
84 | while (((sci_in(&scif_port, SCFDR) & EPK_FIFO_BITS) >= EPK_FIFO_SIZE)) | 85 | while (((sci_in(&scif_port, SCFDR) & EPK_FIFO_BITS) >= EPK_FIFO_SIZE)) |
85 | ; | 86 | ; |
86 | 87 | ||
87 | sci_out(&scif_port, SCxTDR, c); | ||
88 | sci_in(&scif_port, SCxSR); | 88 | sci_in(&scif_port, SCxSR); |
89 | sci_out(&scif_port, SCxSR, 0xf3 & ~(0x20 | 0x40)); | 89 | sci_out(&scif_port, SCxSR, 0xf3 & ~(0x20 | 0x40)); |
90 | sci_out(&scif_port, SCxTDR, c); | ||
90 | 91 | ||
91 | while ((sci_in(&scif_port, SCxSR) & 0x40) == 0) | 92 | while ((sci_in(&scif_port, SCxSR) & 0x40) == 0) |
92 | ; | 93 | ; |
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c index aaaf90d06b85..3c61ddd4d43e 100644 --- a/arch/sh/kernel/timers/timer-tmu.c +++ b/arch/sh/kernel/timers/timer-tmu.c | |||
@@ -120,7 +120,7 @@ static void tmu_set_mode(enum clock_event_mode mode, | |||
120 | { | 120 | { |
121 | switch (mode) { | 121 | switch (mode) { |
122 | case CLOCK_EVT_MODE_PERIODIC: | 122 | case CLOCK_EVT_MODE_PERIODIC: |
123 | ctrl_outl(ctrl_inl(TMU0_TCNT), TMU0_TCOR); | 123 | ctrl_outl(tmu_latest_interval[TMU0], TMU0_TCOR); |
124 | break; | 124 | break; |
125 | case CLOCK_EVT_MODE_ONESHOT: | 125 | case CLOCK_EVT_MODE_ONESHOT: |
126 | ctrl_outl(0, TMU0_TCOR); | 126 | ctrl_outl(0, TMU0_TCOR); |
diff --git a/arch/sh/lib/copy_page.S b/arch/sh/lib/copy_page.S index 5d12e657be34..43de7e8e4e17 100644 --- a/arch/sh/lib/copy_page.S +++ b/arch/sh/lib/copy_page.S | |||
@@ -80,6 +80,11 @@ ENTRY(copy_page) | |||
80 | .section __ex_table, "a"; \ | 80 | .section __ex_table, "a"; \ |
81 | .long 9999b, 6000f ; \ | 81 | .long 9999b, 6000f ; \ |
82 | .previous | 82 | .previous |
83 | #define EX_NO_POP(...) \ | ||
84 | 9999: __VA_ARGS__ ; \ | ||
85 | .section __ex_table, "a"; \ | ||
86 | .long 9999b, 6005f ; \ | ||
87 | .previous | ||
83 | ENTRY(__copy_user) | 88 | ENTRY(__copy_user) |
84 | ! Check if small number of bytes | 89 | ! Check if small number of bytes |
85 | mov #11,r0 | 90 | mov #11,r0 |
@@ -139,9 +144,9 @@ EX( mov.b r1,@r4 ) | |||
139 | bt 1f | 144 | bt 1f |
140 | 145 | ||
141 | 2: | 146 | 2: |
142 | EX( mov.b @r5+,r0 ) | 147 | EX_NO_POP( mov.b @r5+,r0 ) |
143 | dt r6 | 148 | dt r6 |
144 | EX( mov.b r0,@r4 ) | 149 | EX_NO_POP( mov.b r0,@r4 ) |
145 | bf/s 2b | 150 | bf/s 2b |
146 | add #1,r4 | 151 | add #1,r4 |
147 | 152 | ||
@@ -150,7 +155,7 @@ EX( mov.b r0,@r4 ) | |||
150 | 155 | ||
151 | # Exception handler: | 156 | # Exception handler: |
152 | .section .fixup, "ax" | 157 | .section .fixup, "ax" |
153 | 6000: | 158 | 6005: |
154 | mov.l 8000f,r1 | 159 | mov.l 8000f,r1 |
155 | mov r3,r0 | 160 | mov r3,r0 |
156 | jmp @r1 | 161 | jmp @r1 |
diff --git a/arch/sh/mm/Makefile_32 b/arch/sh/mm/Makefile_32 index 70e0906023cc..f066e76da204 100644 --- a/arch/sh/mm/Makefile_32 +++ b/arch/sh/mm/Makefile_32 | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the Linux SuperH-specific parts of the memory manager. | 2 | # Makefile for the Linux SuperH-specific parts of the memory manager. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := init.o extable_32.o consistent.o | 5 | obj-y := init.o extable_32.o consistent.o mmap.o |
6 | 6 | ||
7 | ifndef CONFIG_CACHE_OFF | 7 | ifndef CONFIG_CACHE_OFF |
8 | cache-$(CONFIG_CPU_SH2) := cache-sh2.o | 8 | cache-$(CONFIG_CPU_SH2) := cache-sh2.o |
diff --git a/arch/sh/mm/Makefile_64 b/arch/sh/mm/Makefile_64 index 0d92a8a3ac9a..9481d0f54efd 100644 --- a/arch/sh/mm/Makefile_64 +++ b/arch/sh/mm/Makefile_64 | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the Linux SuperH-specific parts of the memory manager. | 2 | # Makefile for the Linux SuperH-specific parts of the memory manager. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := init.o consistent.o | 5 | obj-y := init.o consistent.o mmap.o |
6 | 6 | ||
7 | mmu-y := tlb-nommu.o pg-nommu.o extable_32.o | 7 | mmu-y := tlb-nommu.o pg-nommu.o extable_32.o |
8 | mmu-$(CONFIG_MMU) := fault_64.o ioremap_64.o tlbflush_64.o tlb-sh5.o \ | 8 | mmu-$(CONFIG_MMU) := fault_64.o ioremap_64.o tlbflush_64.o tlb-sh5.o \ |
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 4abf00031dae..6cbef8caeb56 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -137,6 +137,7 @@ void __init page_table_range_init(unsigned long start, unsigned long end, | |||
137 | void __init paging_init(void) | 137 | void __init paging_init(void) |
138 | { | 138 | { |
139 | unsigned long max_zone_pfns[MAX_NR_ZONES]; | 139 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |
140 | unsigned long vaddr; | ||
140 | int nid; | 141 | int nid; |
141 | 142 | ||
142 | /* We don't need to map the kernel through the TLB, as | 143 | /* We don't need to map the kernel through the TLB, as |
@@ -148,10 +149,15 @@ void __init paging_init(void) | |||
148 | * check for a null value. */ | 149 | * check for a null value. */ |
149 | set_TTB(swapper_pg_dir); | 150 | set_TTB(swapper_pg_dir); |
150 | 151 | ||
151 | /* Populate the relevant portions of swapper_pg_dir so that | 152 | /* |
153 | * Populate the relevant portions of swapper_pg_dir so that | ||
152 | * we can use the fixmap entries without calling kmalloc. | 154 | * we can use the fixmap entries without calling kmalloc. |
153 | * pte's will be filled in by __set_fixmap(). */ | 155 | * pte's will be filled in by __set_fixmap(). |
154 | page_table_range_init(FIXADDR_START, FIXADDR_TOP, swapper_pg_dir); | 156 | */ |
157 | vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK; | ||
158 | page_table_range_init(vaddr, 0, swapper_pg_dir); | ||
159 | |||
160 | kmap_coherent_init(); | ||
155 | 161 | ||
156 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | 162 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
157 | 163 | ||
diff --git a/arch/sh/mm/mmap.c b/arch/sh/mm/mmap.c new file mode 100644 index 000000000000..8837d511710a --- /dev/null +++ b/arch/sh/mm/mmap.c | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * arch/sh/mm/mmap.c | ||
3 | * | ||
4 | * Copyright (C) 2008 Paul Mundt | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | #include <linux/io.h> | ||
11 | #include <linux/mm.h> | ||
12 | #include <asm/page.h> | ||
13 | |||
14 | /* | ||
15 | * You really shouldn't be using read() or write() on /dev/mem. This | ||
16 | * might go away in the future. | ||
17 | */ | ||
18 | int valid_phys_addr_range(unsigned long addr, size_t count) | ||
19 | { | ||
20 | if (addr < __MEMORY_START) | ||
21 | return 0; | ||
22 | if (addr + count > __pa(high_memory)) | ||
23 | return 0; | ||
24 | |||
25 | return 1; | ||
26 | } | ||
27 | |||
28 | int valid_mmap_phys_addr_range(unsigned long pfn, size_t size) | ||
29 | { | ||
30 | return 1; | ||
31 | } | ||
diff --git a/arch/sh/mm/pg-sh4.c b/arch/sh/mm/pg-sh4.c index 38870e0fc182..2fe14da1f839 100644 --- a/arch/sh/mm/pg-sh4.c +++ b/arch/sh/mm/pg-sh4.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Released under the terms of the GNU GPL v2.0. | 7 | * Released under the terms of the GNU GPL v2.0. |
8 | */ | 8 | */ |
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | #include <linux/init.h> | ||
10 | #include <linux/mutex.h> | 11 | #include <linux/mutex.h> |
11 | #include <linux/fs.h> | 12 | #include <linux/fs.h> |
12 | #include <linux/highmem.h> | 13 | #include <linux/highmem.h> |
@@ -16,6 +17,20 @@ | |||
16 | 17 | ||
17 | #define CACHE_ALIAS (current_cpu_data.dcache.alias_mask) | 18 | #define CACHE_ALIAS (current_cpu_data.dcache.alias_mask) |
18 | 19 | ||
20 | #define kmap_get_fixmap_pte(vaddr) \ | ||
21 | pte_offset_kernel(pmd_offset(pud_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr)), (vaddr)) | ||
22 | |||
23 | static pte_t *kmap_coherent_pte; | ||
24 | |||
25 | void __init kmap_coherent_init(void) | ||
26 | { | ||
27 | unsigned long vaddr; | ||
28 | |||
29 | /* cache the first coherent kmap pte */ | ||
30 | vaddr = __fix_to_virt(FIX_CMAP_BEGIN); | ||
31 | kmap_coherent_pte = kmap_get_fixmap_pte(vaddr); | ||
32 | } | ||
33 | |||
19 | static inline void *kmap_coherent(struct page *page, unsigned long addr) | 34 | static inline void *kmap_coherent(struct page *page, unsigned long addr) |
20 | { | 35 | { |
21 | enum fixed_addresses idx; | 36 | enum fixed_addresses idx; |
@@ -34,6 +49,8 @@ static inline void *kmap_coherent(struct page *page, unsigned long addr) | |||
34 | 49 | ||
35 | update_mmu_cache(NULL, vaddr, pte); | 50 | update_mmu_cache(NULL, vaddr, pte); |
36 | 51 | ||
52 | set_pte(kmap_coherent_pte - (FIX_CMAP_END - idx), pte); | ||
53 | |||
37 | return (void *)vaddr; | 54 | return (void *)vaddr; |
38 | } | 55 | } |
39 | 56 | ||
diff --git a/arch/sparc/include/asm/termbits.h b/arch/sparc/include/asm/termbits.h index d6ca3e2754f5..d72dfed1f9d7 100644 --- a/arch/sparc/include/asm/termbits.h +++ b/arch/sparc/include/asm/termbits.h | |||
@@ -29,10 +29,11 @@ struct termios { | |||
29 | tcflag_t c_cflag; /* control mode flags */ | 29 | tcflag_t c_cflag; /* control mode flags */ |
30 | tcflag_t c_lflag; /* local mode flags */ | 30 | tcflag_t c_lflag; /* local mode flags */ |
31 | cc_t c_line; /* line discipline */ | 31 | cc_t c_line; /* line discipline */ |
32 | #ifndef __KERNEL__ | ||
32 | cc_t c_cc[NCCS]; /* control characters */ | 33 | cc_t c_cc[NCCS]; /* control characters */ |
33 | #ifdef __KERNEL__ | 34 | #else |
35 | cc_t c_cc[NCCS+2]; /* kernel needs 2 more to hold vmin/vtime */ | ||
34 | #define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t)) | 36 | #define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t)) |
35 | cc_t _x_cc[2]; /* We need them to hold vmin/vtime */ | ||
36 | #endif | 37 | #endif |
37 | }; | 38 | }; |
38 | 39 | ||
@@ -42,8 +43,7 @@ struct termios2 { | |||
42 | tcflag_t c_cflag; /* control mode flags */ | 43 | tcflag_t c_cflag; /* control mode flags */ |
43 | tcflag_t c_lflag; /* local mode flags */ | 44 | tcflag_t c_lflag; /* local mode flags */ |
44 | cc_t c_line; /* line discipline */ | 45 | cc_t c_line; /* line discipline */ |
45 | cc_t c_cc[NCCS]; /* control characters */ | 46 | cc_t c_cc[NCCS+2]; /* control characters */ |
46 | cc_t _x_cc[2]; /* padding to match ktermios */ | ||
47 | speed_t c_ispeed; /* input speed */ | 47 | speed_t c_ispeed; /* input speed */ |
48 | speed_t c_ospeed; /* output speed */ | 48 | speed_t c_ospeed; /* output speed */ |
49 | }; | 49 | }; |
@@ -54,8 +54,7 @@ struct ktermios { | |||
54 | tcflag_t c_cflag; /* control mode flags */ | 54 | tcflag_t c_cflag; /* control mode flags */ |
55 | tcflag_t c_lflag; /* local mode flags */ | 55 | tcflag_t c_lflag; /* local mode flags */ |
56 | cc_t c_line; /* line discipline */ | 56 | cc_t c_line; /* line discipline */ |
57 | cc_t c_cc[NCCS]; /* control characters */ | 57 | cc_t c_cc[NCCS+2]; /* control characters */ |
58 | cc_t _x_cc[2]; /* We need them to hold vmin/vtime */ | ||
59 | speed_t c_ispeed; /* input speed */ | 58 | speed_t c_ispeed; /* input speed */ |
60 | speed_t c_ospeed; /* output speed */ | 59 | speed_t c_ospeed; /* output speed */ |
61 | }; | 60 | }; |
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c index 0837bd52e28f..0a83bd737654 100644 --- a/arch/sparc/kernel/of_device.c +++ b/arch/sparc/kernel/of_device.c | |||
@@ -563,9 +563,9 @@ build_resources: | |||
563 | op->dev.parent = parent; | 563 | op->dev.parent = parent; |
564 | op->dev.bus = &of_platform_bus_type; | 564 | op->dev.bus = &of_platform_bus_type; |
565 | if (!parent) | 565 | if (!parent) |
566 | strcpy(op->dev.bus_id, "root"); | 566 | dev_set_name(&op->dev, "root"); |
567 | else | 567 | else |
568 | sprintf(op->dev.bus_id, "%08x", dp->node); | 568 | dev_set_name(&op->dev, "%08x", dp->node); |
569 | 569 | ||
570 | if (of_device_register(op)) { | 570 | if (of_device_register(op)) { |
571 | printk("%s: Could not register of device.\n", | 571 | printk("%s: Could not register of device.\n", |
diff --git a/arch/x86/include/asm/iommu.h b/arch/x86/include/asm/iommu.h index e4a552d44465..0b500c5b6446 100644 --- a/arch/x86/include/asm/iommu.h +++ b/arch/x86/include/asm/iommu.h | |||
@@ -6,7 +6,6 @@ extern void no_iommu_init(void); | |||
6 | extern struct dma_mapping_ops nommu_dma_ops; | 6 | extern struct dma_mapping_ops nommu_dma_ops; |
7 | extern int force_iommu, no_iommu; | 7 | extern int force_iommu, no_iommu; |
8 | extern int iommu_detected; | 8 | extern int iommu_detected; |
9 | extern int dmar_disabled; | ||
10 | 9 | ||
11 | extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len); | 10 | extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len); |
12 | 11 | ||
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index 3ce029ffaa55..1b894b72c0f5 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c | |||
@@ -188,20 +188,6 @@ static void __init ati_bugs_contd(int num, int slot, int func) | |||
188 | } | 188 | } |
189 | #endif | 189 | #endif |
190 | 190 | ||
191 | #ifdef CONFIG_DMAR | ||
192 | static void __init intel_g33_dmar(int num, int slot, int func) | ||
193 | { | ||
194 | struct acpi_table_header *dmar_tbl; | ||
195 | acpi_status status; | ||
196 | |||
197 | status = acpi_get_table(ACPI_SIG_DMAR, 0, &dmar_tbl); | ||
198 | if (ACPI_SUCCESS(status)) { | ||
199 | printk(KERN_INFO "BIOS BUG: DMAR advertised on Intel G31/G33 chipset -- ignoring\n"); | ||
200 | dmar_disabled = 1; | ||
201 | } | ||
202 | } | ||
203 | #endif | ||
204 | |||
205 | #define QFLAG_APPLY_ONCE 0x1 | 191 | #define QFLAG_APPLY_ONCE 0x1 |
206 | #define QFLAG_APPLIED 0x2 | 192 | #define QFLAG_APPLIED 0x2 |
207 | #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED) | 193 | #define QFLAG_DONE (QFLAG_APPLY_ONCE|QFLAG_APPLIED) |
@@ -225,10 +211,6 @@ static struct chipset early_qrk[] __initdata = { | |||
225 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs }, | 211 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs }, |
226 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, | 212 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS, |
227 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd }, | 213 | PCI_CLASS_SERIAL_SMBUS, PCI_ANY_ID, 0, ati_bugs_contd }, |
228 | #ifdef CONFIG_DMAR | ||
229 | { PCI_VENDOR_ID_INTEL, 0x29c0, | ||
230 | PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, intel_g33_dmar }, | ||
231 | #endif | ||
232 | {} | 214 | {} |
233 | }; | 215 | }; |
234 | 216 | ||