diff options
69 files changed, 1159 insertions, 387 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index cdd5b934f43e..e07c432c731f 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -398,9 +398,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
398 | cio_ignore= [S390] | 398 | cio_ignore= [S390] |
399 | See Documentation/s390/CommonIO for details. | 399 | See Documentation/s390/CommonIO for details. |
400 | 400 | ||
401 | cio_msg= [S390] | ||
402 | See Documentation/s390/CommonIO for details. | ||
403 | |||
404 | clock= [BUGS=X86-32, HW] gettimeofday clocksource override. | 401 | clock= [BUGS=X86-32, HW] gettimeofday clocksource override. |
405 | [Deprecated] | 402 | [Deprecated] |
406 | Forces specified clocksource (if available) to be used | 403 | Forces specified clocksource (if available) to be used |
@@ -689,6 +686,12 @@ and is between 256 and 4096 characters. It is defined in the file | |||
689 | floppy= [HW] | 686 | floppy= [HW] |
690 | See Documentation/floppy.txt. | 687 | See Documentation/floppy.txt. |
691 | 688 | ||
689 | force_pal_cache_flush | ||
690 | [IA-64] Avoid check_sal_cache_flush which may hang on | ||
691 | buggy SAL_CACHE_FLUSH implementations. Using this | ||
692 | parameter will force ia64_sal_cache_flush to call | ||
693 | ia64_pal_cache_flush instead of SAL_CACHE_FLUSH. | ||
694 | |||
692 | gamecon.map[2|3]= | 695 | gamecon.map[2|3]= |
693 | [HW,JOY] Multisystem joystick and NES/SNES/PSX pad | 696 | [HW,JOY] Multisystem joystick and NES/SNES/PSX pad |
694 | support via parallel port (up to 5 devices per port) | 697 | support via parallel port (up to 5 devices per port) |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 0df5f6f75edf..16be41446b5b 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -135,6 +135,7 @@ config IA64_GENERIC | |||
135 | HP-zx1/sx1000 For HP systems | 135 | HP-zx1/sx1000 For HP systems |
136 | HP-zx1/sx1000+swiotlb For HP systems with (broken) DMA-constrained devices. | 136 | HP-zx1/sx1000+swiotlb For HP systems with (broken) DMA-constrained devices. |
137 | SGI-SN2 For SGI Altix systems | 137 | SGI-SN2 For SGI Altix systems |
138 | SGI-UV For SGI UV systems | ||
138 | Ski-simulator For the HP simulator <http://www.hpl.hp.com/research/linux/ski/> | 139 | Ski-simulator For the HP simulator <http://www.hpl.hp.com/research/linux/ski/> |
139 | 140 | ||
140 | If you don't know what to do, choose "generic". | 141 | If you don't know what to do, choose "generic". |
@@ -170,6 +171,18 @@ config IA64_SGI_SN2 | |||
170 | to select this option. If in doubt, select ia64 generic support | 171 | to select this option. If in doubt, select ia64 generic support |
171 | instead. | 172 | instead. |
172 | 173 | ||
174 | config IA64_SGI_UV` | ||
175 | bool "SGI-UV`" | ||
176 | select NUMA | ||
177 | select ACPI_NUMA | ||
178 | select SWIOTLB | ||
179 | help | ||
180 | Selecting this option will optimize the kernel for use on UV based | ||
181 | systems, but the resulting kernel binary will not run on other | ||
182 | types of ia64 systems. If you have an SGI UV system, it's safe | ||
183 | to select this option. If in doubt, select ia64 generic support | ||
184 | instead. | ||
185 | |||
173 | config IA64_HP_SIM | 186 | config IA64_HP_SIM |
174 | bool "Ski-simulator" | 187 | bool "Ski-simulator" |
175 | select SWIOTLB | 188 | select SWIOTLB |
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile index ec4cca477f49..88f1a55c6c94 100644 --- a/arch/ia64/Makefile +++ b/arch/ia64/Makefile | |||
@@ -63,7 +63,7 @@ drivers-$(CONFIG_PCI) += arch/ia64/pci/ | |||
63 | drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/ | 63 | drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/ |
64 | drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ | 64 | drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ |
65 | drivers-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ | 65 | drivers-$(CONFIG_IA64_HP_ZX1_SWIOTLB) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ |
66 | drivers-$(CONFIG_IA64_GENERIC) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/ arch/ia64/sn/ | 66 | drivers-$(CONFIG_IA64_GENERIC) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ arch/ia64/hp/sim/ arch/ia64/sn/ arch/ia64/uv/ |
67 | drivers-$(CONFIG_OPROFILE) += arch/ia64/oprofile/ | 67 | drivers-$(CONFIG_OPROFILE) += arch/ia64/oprofile/ |
68 | 68 | ||
69 | boot := arch/ia64/hp/sim/boot | 69 | boot := arch/ia64/hp/sim/boot |
diff --git a/arch/ia64/ia32/ia32_support.c b/arch/ia64/ia32/ia32_support.c index 896b1ebbfb26..a6965ddafc46 100644 --- a/arch/ia64/ia32/ia32_support.c +++ b/arch/ia64/ia32/ia32_support.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/personality.h> | ||
19 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
20 | 19 | ||
21 | #include <asm/intrinsics.h> | 20 | #include <asm/intrinsics.h> |
@@ -29,7 +28,6 @@ | |||
29 | 28 | ||
30 | extern int die_if_kernel (char *str, struct pt_regs *regs, long err); | 29 | extern int die_if_kernel (char *str, struct pt_regs *regs, long err); |
31 | 30 | ||
32 | struct exec_domain ia32_exec_domain; | ||
33 | struct page *ia32_shared_page[NR_CPUS]; | 31 | struct page *ia32_shared_page[NR_CPUS]; |
34 | unsigned long *ia32_boot_gdt; | 32 | unsigned long *ia32_boot_gdt; |
35 | unsigned long *cpu_gdt_table[NR_CPUS]; | 33 | unsigned long *cpu_gdt_table[NR_CPUS]; |
@@ -240,14 +238,6 @@ ia32_cpu_init (void) | |||
240 | static int __init | 238 | static int __init |
241 | ia32_init (void) | 239 | ia32_init (void) |
242 | { | 240 | { |
243 | ia32_exec_domain.name = "Linux/x86"; | ||
244 | ia32_exec_domain.handler = NULL; | ||
245 | ia32_exec_domain.pers_low = PER_LINUX32; | ||
246 | ia32_exec_domain.pers_high = PER_LINUX32; | ||
247 | ia32_exec_domain.signal_map = default_exec_domain.signal_map; | ||
248 | ia32_exec_domain.signal_invmap = default_exec_domain.signal_invmap; | ||
249 | register_exec_domain(&ia32_exec_domain); | ||
250 | |||
251 | #if PAGE_SHIFT > IA32_PAGE_SHIFT | 241 | #if PAGE_SHIFT > IA32_PAGE_SHIFT |
252 | { | 242 | { |
253 | extern struct kmem_cache *ia64_partial_page_cachep; | 243 | extern struct kmem_cache *ia64_partial_page_cachep; |
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 19709a079635..853d1f11be00 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -117,7 +117,10 @@ acpi_get_sysname(void) | |||
117 | if (!strcmp(hdr->oem_id, "HP")) { | 117 | if (!strcmp(hdr->oem_id, "HP")) { |
118 | return "hpzx1"; | 118 | return "hpzx1"; |
119 | } else if (!strcmp(hdr->oem_id, "SGI")) { | 119 | } else if (!strcmp(hdr->oem_id, "SGI")) { |
120 | return "sn2"; | 120 | if (!strcmp(hdr->oem_table_id + 4, "UV")) |
121 | return "uv"; | ||
122 | else | ||
123 | return "sn2"; | ||
121 | } | 124 | } |
122 | 125 | ||
123 | return "dig"; | 126 | return "dig"; |
@@ -130,6 +133,8 @@ acpi_get_sysname(void) | |||
130 | return "hpzx1_swiotlb"; | 133 | return "hpzx1_swiotlb"; |
131 | # elif defined (CONFIG_IA64_SGI_SN2) | 134 | # elif defined (CONFIG_IA64_SGI_SN2) |
132 | return "sn2"; | 135 | return "sn2"; |
136 | # elif defined (CONFIG_IA64_SGI_UV) | ||
137 | return "uv"; | ||
133 | # elif defined (CONFIG_IA64_DIG) | 138 | # elif defined (CONFIG_IA64_DIG) |
134 | return "dig"; | 139 | return "dig"; |
135 | # else | 140 | # else |
@@ -622,6 +627,9 @@ void acpi_unregister_gsi(u32 gsi) | |||
622 | if (acpi_irq_model == ACPI_IRQ_MODEL_PLATFORM) | 627 | if (acpi_irq_model == ACPI_IRQ_MODEL_PLATFORM) |
623 | return; | 628 | return; |
624 | 629 | ||
630 | if (has_8259 && gsi < 16) | ||
631 | return; | ||
632 | |||
625 | iosapic_unregister_intr(gsi); | 633 | iosapic_unregister_intr(gsi); |
626 | } | 634 | } |
627 | 635 | ||
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index e49ad8c5dc69..ca2bb95726de 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -1156,6 +1156,9 @@ skip_rbs_switch: | |||
1156 | * r31 = current->thread_info->flags | 1156 | * r31 = current->thread_info->flags |
1157 | * On exit: | 1157 | * On exit: |
1158 | * p6 = TRUE if work-pending-check needs to be redone | 1158 | * p6 = TRUE if work-pending-check needs to be redone |
1159 | * | ||
1160 | * Interrupts are disabled on entry, reenabled depend on work, and | ||
1161 | * disabled on exit. | ||
1159 | */ | 1162 | */ |
1160 | .work_pending_syscall: | 1163 | .work_pending_syscall: |
1161 | add r2=-8,r2 | 1164 | add r2=-8,r2 |
@@ -1164,16 +1167,16 @@ skip_rbs_switch: | |||
1164 | st8 [r2]=r8 | 1167 | st8 [r2]=r8 |
1165 | st8 [r3]=r10 | 1168 | st8 [r3]=r10 |
1166 | .work_pending: | 1169 | .work_pending: |
1167 | tbit.z p6,p0=r31,TIF_NEED_RESCHED // current_thread_info()->need_resched==0? | 1170 | tbit.z p6,p0=r31,TIF_NEED_RESCHED // is resched not needed? |
1168 | (p6) br.cond.sptk.few .notify | 1171 | (p6) br.cond.sptk.few .notify |
1169 | #ifdef CONFIG_PREEMPT | 1172 | #ifdef CONFIG_PREEMPT |
1170 | (pKStk) dep r21=-1,r0,PREEMPT_ACTIVE_BIT,1 | 1173 | (pKStk) dep r21=-1,r0,PREEMPT_ACTIVE_BIT,1 |
1171 | ;; | 1174 | ;; |
1172 | (pKStk) st4 [r20]=r21 | 1175 | (pKStk) st4 [r20]=r21 |
1173 | ssm psr.i // enable interrupts | ||
1174 | #endif | 1176 | #endif |
1177 | ssm psr.i // enable interrupts | ||
1175 | br.call.spnt.many rp=schedule | 1178 | br.call.spnt.many rp=schedule |
1176 | .ret9: cmp.eq p6,p0=r0,r0 // p6 <- 1 | 1179 | .ret9: cmp.eq p6,p0=r0,r0 // p6 <- 1 (re-check) |
1177 | rsm psr.i // disable interrupts | 1180 | rsm psr.i // disable interrupts |
1178 | ;; | 1181 | ;; |
1179 | #ifdef CONFIG_PREEMPT | 1182 | #ifdef CONFIG_PREEMPT |
@@ -1182,13 +1185,13 @@ skip_rbs_switch: | |||
1182 | (pKStk) st4 [r20]=r0 // preempt_count() <- 0 | 1185 | (pKStk) st4 [r20]=r0 // preempt_count() <- 0 |
1183 | #endif | 1186 | #endif |
1184 | (pLvSys)br.cond.sptk.few .work_pending_syscall_end | 1187 | (pLvSys)br.cond.sptk.few .work_pending_syscall_end |
1185 | br.cond.sptk.many .work_processed_kernel // re-check | 1188 | br.cond.sptk.many .work_processed_kernel |
1186 | 1189 | ||
1187 | .notify: | 1190 | .notify: |
1188 | (pUStk) br.call.spnt.many rp=notify_resume_user | 1191 | (pUStk) br.call.spnt.many rp=notify_resume_user |
1189 | .ret10: cmp.ne p6,p0=r0,r0 // p6 <- 0 | 1192 | .ret10: cmp.ne p6,p0=r0,r0 // p6 <- 0 (don't re-check) |
1190 | (pLvSys)br.cond.sptk.few .work_pending_syscall_end | 1193 | (pLvSys)br.cond.sptk.few .work_pending_syscall_end |
1191 | br.cond.sptk.many .work_processed_kernel // don't re-check | 1194 | br.cond.sptk.many .work_processed_kernel |
1192 | 1195 | ||
1193 | .work_pending_syscall_end: | 1196 | .work_pending_syscall_end: |
1194 | adds r2=PT(R8)+16,r12 | 1197 | adds r2=PT(R8)+16,r12 |
@@ -1196,7 +1199,7 @@ skip_rbs_switch: | |||
1196 | ;; | 1199 | ;; |
1197 | ld8 r8=[r2] | 1200 | ld8 r8=[r2] |
1198 | ld8 r10=[r3] | 1201 | ld8 r10=[r3] |
1199 | br.cond.sptk.many .work_processed_syscall // re-check | 1202 | br.cond.sptk.many .work_processed_syscall |
1200 | 1203 | ||
1201 | END(ia64_leave_kernel) | 1204 | END(ia64_leave_kernel) |
1202 | 1205 | ||
@@ -1234,9 +1237,12 @@ GLOBAL_ENTRY(ia64_invoke_schedule_tail) | |||
1234 | END(ia64_invoke_schedule_tail) | 1237 | END(ia64_invoke_schedule_tail) |
1235 | 1238 | ||
1236 | /* | 1239 | /* |
1237 | * Setup stack and call do_notify_resume_user(). Note that pSys and pNonSys need to | 1240 | * Setup stack and call do_notify_resume_user(), keeping interrupts |
1238 | * be set up by the caller. We declare 8 input registers so the system call | 1241 | * disabled. |
1239 | * args get preserved, in case we need to restart a system call. | 1242 | * |
1243 | * Note that pSys and pNonSys need to be set up by the caller. | ||
1244 | * We declare 8 input registers so the system call args get preserved, | ||
1245 | * in case we need to restart a system call. | ||
1240 | */ | 1246 | */ |
1241 | ENTRY(notify_resume_user) | 1247 | ENTRY(notify_resume_user) |
1242 | .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8) | 1248 | .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8) |
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c index 4547a2092af9..9dc00f7fe10e 100644 --- a/arch/ia64/kernel/palinfo.c +++ b/arch/ia64/kernel/palinfo.c | |||
@@ -900,12 +900,6 @@ static void | |||
900 | palinfo_smp_call(void *info) | 900 | palinfo_smp_call(void *info) |
901 | { | 901 | { |
902 | palinfo_smp_data_t *data = (palinfo_smp_data_t *)info; | 902 | palinfo_smp_data_t *data = (palinfo_smp_data_t *)info; |
903 | if (data == NULL) { | ||
904 | printk(KERN_ERR "palinfo: data pointer is NULL\n"); | ||
905 | data->ret = 0; /* no output */ | ||
906 | return; | ||
907 | } | ||
908 | /* does this actual call */ | ||
909 | data->ret = (*data->func)(data->page); | 903 | data->ret = (*data->func)(data->page); |
910 | } | 904 | } |
911 | 905 | ||
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index c1ad27de2dd2..71d05133f556 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -5013,12 +5013,13 @@ pfm_context_force_terminate(pfm_context_t *ctx, struct pt_regs *regs) | |||
5013 | } | 5013 | } |
5014 | 5014 | ||
5015 | static int pfm_ovfl_notify_user(pfm_context_t *ctx, unsigned long ovfl_pmds); | 5015 | static int pfm_ovfl_notify_user(pfm_context_t *ctx, unsigned long ovfl_pmds); |
5016 | |||
5016 | /* | 5017 | /* |
5017 | * pfm_handle_work() can be called with interrupts enabled | 5018 | * pfm_handle_work() can be called with interrupts enabled |
5018 | * (TIF_NEED_RESCHED) or disabled. The down_interruptible | 5019 | * (TIF_NEED_RESCHED) or disabled. The down_interruptible |
5019 | * call may sleep, therefore we must re-enable interrupts | 5020 | * call may sleep, therefore we must re-enable interrupts |
5020 | * to avoid deadlocks. It is safe to do so because this function | 5021 | * to avoid deadlocks. It is safe to do so because this function |
5021 | * is called ONLY when returning to user level (PUStk=1), in which case | 5022 | * is called ONLY when returning to user level (pUStk=1), in which case |
5022 | * there is no risk of kernel stack overflow due to deep | 5023 | * there is no risk of kernel stack overflow due to deep |
5023 | * interrupt nesting. | 5024 | * interrupt nesting. |
5024 | */ | 5025 | */ |
@@ -5034,7 +5035,8 @@ pfm_handle_work(void) | |||
5034 | 5035 | ||
5035 | ctx = PFM_GET_CTX(current); | 5036 | ctx = PFM_GET_CTX(current); |
5036 | if (ctx == NULL) { | 5037 | if (ctx == NULL) { |
5037 | printk(KERN_ERR "perfmon: [%d] has no PFM context\n", task_pid_nr(current)); | 5038 | printk(KERN_ERR "perfmon: [%d] has no PFM context\n", |
5039 | task_pid_nr(current)); | ||
5038 | return; | 5040 | return; |
5039 | } | 5041 | } |
5040 | 5042 | ||
@@ -5058,11 +5060,12 @@ pfm_handle_work(void) | |||
5058 | /* | 5060 | /* |
5059 | * must be done before we check for simple-reset mode | 5061 | * must be done before we check for simple-reset mode |
5060 | */ | 5062 | */ |
5061 | if (ctx->ctx_fl_going_zombie || ctx->ctx_state == PFM_CTX_ZOMBIE) goto do_zombie; | 5063 | if (ctx->ctx_fl_going_zombie || ctx->ctx_state == PFM_CTX_ZOMBIE) |
5062 | 5064 | goto do_zombie; | |
5063 | 5065 | ||
5064 | //if (CTX_OVFL_NOBLOCK(ctx)) goto skip_blocking; | 5066 | //if (CTX_OVFL_NOBLOCK(ctx)) goto skip_blocking; |
5065 | if (reason == PFM_TRAP_REASON_RESET) goto skip_blocking; | 5067 | if (reason == PFM_TRAP_REASON_RESET) |
5068 | goto skip_blocking; | ||
5066 | 5069 | ||
5067 | /* | 5070 | /* |
5068 | * restore interrupt mask to what it was on entry. | 5071 | * restore interrupt mask to what it was on entry. |
@@ -5110,7 +5113,8 @@ do_zombie: | |||
5110 | /* | 5113 | /* |
5111 | * in case of interruption of down() we don't restart anything | 5114 | * in case of interruption of down() we don't restart anything |
5112 | */ | 5115 | */ |
5113 | if (ret < 0) goto nothing_to_do; | 5116 | if (ret < 0) |
5117 | goto nothing_to_do; | ||
5114 | 5118 | ||
5115 | skip_blocking: | 5119 | skip_blocking: |
5116 | pfm_resume_after_ovfl(ctx, ovfl_regs, regs); | 5120 | pfm_resume_after_ovfl(ctx, ovfl_regs, regs); |
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 58dcfac5ea88..a3a34b4eb038 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -167,11 +167,18 @@ void tsk_clear_notify_resume(struct task_struct *tsk) | |||
167 | clear_ti_thread_flag(task_thread_info(tsk), TIF_NOTIFY_RESUME); | 167 | clear_ti_thread_flag(task_thread_info(tsk), TIF_NOTIFY_RESUME); |
168 | } | 168 | } |
169 | 169 | ||
170 | /* | ||
171 | * do_notify_resume_user(): | ||
172 | * Called from notify_resume_user at entry.S, with interrupts disabled. | ||
173 | */ | ||
170 | void | 174 | void |
171 | do_notify_resume_user (sigset_t *unused, struct sigscratch *scr, long in_syscall) | 175 | do_notify_resume_user(sigset_t *unused, struct sigscratch *scr, long in_syscall) |
172 | { | 176 | { |
173 | if (fsys_mode(current, &scr->pt)) { | 177 | if (fsys_mode(current, &scr->pt)) { |
174 | /* defer signal-handling etc. until we return to privilege-level 0. */ | 178 | /* |
179 | * defer signal-handling etc. until we return to | ||
180 | * privilege-level 0. | ||
181 | */ | ||
175 | if (!ia64_psr(&scr->pt)->lp) | 182 | if (!ia64_psr(&scr->pt)->lp) |
176 | ia64_psr(&scr->pt)->lp = 1; | 183 | ia64_psr(&scr->pt)->lp = 1; |
177 | return; | 184 | return; |
@@ -179,16 +186,26 @@ do_notify_resume_user (sigset_t *unused, struct sigscratch *scr, long in_syscall | |||
179 | 186 | ||
180 | #ifdef CONFIG_PERFMON | 187 | #ifdef CONFIG_PERFMON |
181 | if (current->thread.pfm_needs_checking) | 188 | if (current->thread.pfm_needs_checking) |
189 | /* | ||
190 | * Note: pfm_handle_work() allow us to call it with interrupts | ||
191 | * disabled, and may enable interrupts within the function. | ||
192 | */ | ||
182 | pfm_handle_work(); | 193 | pfm_handle_work(); |
183 | #endif | 194 | #endif |
184 | 195 | ||
185 | /* deal with pending signal delivery */ | 196 | /* deal with pending signal delivery */ |
186 | if (test_thread_flag(TIF_SIGPENDING)) | 197 | if (test_thread_flag(TIF_SIGPENDING)) { |
198 | local_irq_enable(); /* force interrupt enable */ | ||
187 | ia64_do_signal(scr, in_syscall); | 199 | ia64_do_signal(scr, in_syscall); |
200 | } | ||
188 | 201 | ||
189 | /* copy user rbs to kernel rbs */ | 202 | /* copy user rbs to kernel rbs */ |
190 | if (unlikely(test_thread_flag(TIF_RESTORE_RSE))) | 203 | if (unlikely(test_thread_flag(TIF_RESTORE_RSE))) { |
204 | local_irq_enable(); /* force interrupt enable */ | ||
191 | ia64_sync_krbs(); | 205 | ia64_sync_krbs(); |
206 | } | ||
207 | |||
208 | local_irq_disable(); /* force interrupt disable */ | ||
192 | } | 209 | } |
193 | 210 | ||
194 | static int pal_halt = 1; | 211 | static int pal_halt = 1; |
diff --git a/arch/ia64/kernel/sal.c b/arch/ia64/kernel/sal.c index a3022dc48ef8..7e0259709c04 100644 --- a/arch/ia64/kernel/sal.c +++ b/arch/ia64/kernel/sal.c | |||
@@ -229,6 +229,14 @@ static void __init sal_desc_ap_wakeup(void *p) { } | |||
229 | */ | 229 | */ |
230 | static int sal_cache_flush_drops_interrupts; | 230 | static int sal_cache_flush_drops_interrupts; |
231 | 231 | ||
232 | static int __init | ||
233 | force_pal_cache_flush(char *str) | ||
234 | { | ||
235 | sal_cache_flush_drops_interrupts = 1; | ||
236 | return 0; | ||
237 | } | ||
238 | early_param("force_pal_cache_flush", force_pal_cache_flush); | ||
239 | |||
232 | void __init | 240 | void __init |
233 | check_sal_cache_flush (void) | 241 | check_sal_cache_flush (void) |
234 | { | 242 | { |
@@ -237,6 +245,9 @@ check_sal_cache_flush (void) | |||
237 | u64 vector, cache_type = 3; | 245 | u64 vector, cache_type = 3; |
238 | struct ia64_sal_retval isrv; | 246 | struct ia64_sal_retval isrv; |
239 | 247 | ||
248 | if (sal_cache_flush_drops_interrupts) | ||
249 | return; | ||
250 | |||
240 | cpu = get_cpu(); | 251 | cpu = get_cpu(); |
241 | local_irq_save(flags); | 252 | local_irq_save(flags); |
242 | 253 | ||
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 5015ca1275ca..e9596cd0cdab 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -239,6 +239,25 @@ __initcall(register_memory); | |||
239 | 239 | ||
240 | 240 | ||
241 | #ifdef CONFIG_KEXEC | 241 | #ifdef CONFIG_KEXEC |
242 | |||
243 | /* | ||
244 | * This function checks if the reserved crashkernel is allowed on the specific | ||
245 | * IA64 machine flavour. Machines without an IO TLB use swiotlb and require | ||
246 | * some memory below 4 GB (i.e. in 32 bit area), see the implementation of | ||
247 | * lib/swiotlb.c. The hpzx1 architecture has an IO TLB but cannot use that | ||
248 | * in kdump case. See the comment in sba_init() in sba_iommu.c. | ||
249 | * | ||
250 | * So, the only machvec that really supports loading the kdump kernel | ||
251 | * over 4 GB is "sn2". | ||
252 | */ | ||
253 | static int __init check_crashkernel_memory(unsigned long pbase, size_t size) | ||
254 | { | ||
255 | if (ia64_platform_is("sn2") || ia64_platform_is("uv")) | ||
256 | return 1; | ||
257 | else | ||
258 | return pbase < (1UL << 32); | ||
259 | } | ||
260 | |||
242 | static void __init setup_crashkernel(unsigned long total, int *n) | 261 | static void __init setup_crashkernel(unsigned long total, int *n) |
243 | { | 262 | { |
244 | unsigned long long base = 0, size = 0; | 263 | unsigned long long base = 0, size = 0; |
@@ -252,6 +271,16 @@ static void __init setup_crashkernel(unsigned long total, int *n) | |||
252 | base = kdump_find_rsvd_region(size, | 271 | base = kdump_find_rsvd_region(size, |
253 | rsvd_region, *n); | 272 | rsvd_region, *n); |
254 | } | 273 | } |
274 | |||
275 | if (!check_crashkernel_memory(base, size)) { | ||
276 | pr_warning("crashkernel: There would be kdump memory " | ||
277 | "at %ld GB but this is unusable because it " | ||
278 | "must\nbe below 4 GB. Change the memory " | ||
279 | "configuration of the machine.\n", | ||
280 | (unsigned long)(base >> 30)); | ||
281 | return; | ||
282 | } | ||
283 | |||
255 | if (base != ~0UL) { | 284 | if (base != ~0UL) { |
256 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " | 285 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " |
257 | "for crashkernel (System RAM: %ldMB)\n", | 286 | "for crashkernel (System RAM: %ldMB)\n", |
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index fc6c6636ffda..200100ea7610 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -719,3 +719,28 @@ out: | |||
719 | EXPORT_SYMBOL_GPL(remove_memory); | 719 | EXPORT_SYMBOL_GPL(remove_memory); |
720 | #endif /* CONFIG_MEMORY_HOTREMOVE */ | 720 | #endif /* CONFIG_MEMORY_HOTREMOVE */ |
721 | #endif | 721 | #endif |
722 | |||
723 | /* | ||
724 | * Even when CONFIG_IA32_SUPPORT is not enabled it is | ||
725 | * useful to have the Linux/x86 domain registered to | ||
726 | * avoid an attempted module load when emulators call | ||
727 | * personality(PER_LINUX32). This saves several milliseconds | ||
728 | * on each such call. | ||
729 | */ | ||
730 | static struct exec_domain ia32_exec_domain; | ||
731 | |||
732 | static int __init | ||
733 | per_linux32_init(void) | ||
734 | { | ||
735 | ia32_exec_domain.name = "Linux/x86"; | ||
736 | ia32_exec_domain.handler = NULL; | ||
737 | ia32_exec_domain.pers_low = PER_LINUX32; | ||
738 | ia32_exec_domain.pers_high = PER_LINUX32; | ||
739 | ia32_exec_domain.signal_map = default_exec_domain.signal_map; | ||
740 | ia32_exec_domain.signal_invmap = default_exec_domain.signal_invmap; | ||
741 | register_exec_domain(&ia32_exec_domain); | ||
742 | |||
743 | return 0; | ||
744 | } | ||
745 | |||
746 | __initcall(per_linux32_init); | ||
diff --git a/arch/ia64/uv/Makefile b/arch/ia64/uv/Makefile new file mode 100644 index 000000000000..aa9f91947c49 --- /dev/null +++ b/arch/ia64/uv/Makefile | |||
@@ -0,0 +1,12 @@ | |||
1 | # arch/ia64/uv/Makefile | ||
2 | # | ||
3 | # This file is subject to the terms and conditions of the GNU General Public | ||
4 | # License. See the file "COPYING" in the main directory of this archive | ||
5 | # for more details. | ||
6 | # | ||
7 | # Copyright (C) 2008 Silicon Graphics, Inc. All Rights Reserved. | ||
8 | # | ||
9 | # Makefile for the sn uv subplatform | ||
10 | # | ||
11 | |||
12 | obj-y += kernel/ | ||
diff --git a/arch/ia64/uv/kernel/Makefile b/arch/ia64/uv/kernel/Makefile new file mode 100644 index 000000000000..8d92b4684d8e --- /dev/null +++ b/arch/ia64/uv/kernel/Makefile | |||
@@ -0,0 +1,13 @@ | |||
1 | # arch/ia64/uv/kernel/Makefile | ||
2 | # | ||
3 | # This file is subject to the terms and conditions of the GNU General Public | ||
4 | # License. See the file "COPYING" in the main directory of this archive | ||
5 | # for more details. | ||
6 | # | ||
7 | # Copyright (C) 2008 Silicon Graphics, Inc. All Rights Reserved. | ||
8 | # | ||
9 | |||
10 | EXTRA_CFLAGS += -Iarch/ia64/sn/include | ||
11 | |||
12 | obj-y += setup.o | ||
13 | obj-$(CONFIG_IA64_GENERIC) += machvec.o | ||
diff --git a/arch/ia64/uv/kernel/machvec.c b/arch/ia64/uv/kernel/machvec.c new file mode 100644 index 000000000000..50737a9dca74 --- /dev/null +++ b/arch/ia64/uv/kernel/machvec.c | |||
@@ -0,0 +1,11 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved. | ||
7 | */ | ||
8 | |||
9 | #define MACHVEC_PLATFORM_NAME uv | ||
10 | #define MACHVEC_PLATFORM_HEADER <asm/machvec_uv.h> | ||
11 | #include <asm/machvec_init.h> | ||
diff --git a/arch/ia64/uv/kernel/setup.c b/arch/ia64/uv/kernel/setup.c new file mode 100644 index 000000000000..9aa743203c3c --- /dev/null +++ b/arch/ia64/uv/kernel/setup.c | |||
@@ -0,0 +1,98 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * SGI UV Core Functions | ||
7 | * | ||
8 | * Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved. | ||
9 | */ | ||
10 | |||
11 | #include <linux/module.h> | ||
12 | #include <linux/percpu.h> | ||
13 | #include <asm/sn/simulator.h> | ||
14 | #include <asm/uv/uv_mmrs.h> | ||
15 | #include <asm/uv/uv_hub.h> | ||
16 | |||
17 | DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info); | ||
18 | EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info); | ||
19 | |||
20 | |||
21 | struct redir_addr { | ||
22 | unsigned long redirect; | ||
23 | unsigned long alias; | ||
24 | }; | ||
25 | |||
26 | #define DEST_SHIFT UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR_DEST_BASE_SHFT | ||
27 | |||
28 | static __initdata struct redir_addr redir_addrs[] = { | ||
29 | {UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR, UVH_SI_ALIAS0_OVERLAY_CONFIG}, | ||
30 | {UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR, UVH_SI_ALIAS1_OVERLAY_CONFIG}, | ||
31 | {UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR, UVH_SI_ALIAS2_OVERLAY_CONFIG}, | ||
32 | }; | ||
33 | |||
34 | static __init void get_lowmem_redirect(unsigned long *base, unsigned long *size) | ||
35 | { | ||
36 | union uvh_si_alias0_overlay_config_u alias; | ||
37 | union uvh_rh_gam_alias210_redirect_config_2_mmr_u redirect; | ||
38 | int i; | ||
39 | |||
40 | for (i = 0; i < ARRAY_SIZE(redir_addrs); i++) { | ||
41 | alias.v = uv_read_local_mmr(redir_addrs[i].alias); | ||
42 | if (alias.s.base == 0) { | ||
43 | *size = (1UL << alias.s.m_alias); | ||
44 | redirect.v = uv_read_local_mmr(redir_addrs[i].redirect); | ||
45 | *base = (unsigned long)redirect.s.dest_base << DEST_SHIFT; | ||
46 | return; | ||
47 | } | ||
48 | } | ||
49 | BUG(); | ||
50 | } | ||
51 | |||
52 | void __init uv_setup(char **cmdline_p) | ||
53 | { | ||
54 | union uvh_si_addr_map_config_u m_n_config; | ||
55 | union uvh_node_id_u node_id; | ||
56 | unsigned long gnode_upper; | ||
57 | int nid, cpu, m_val, n_val; | ||
58 | unsigned long mmr_base, lowmem_redir_base, lowmem_redir_size; | ||
59 | |||
60 | if (IS_MEDUSA()) { | ||
61 | lowmem_redir_base = 0; | ||
62 | lowmem_redir_size = 0; | ||
63 | node_id.v = 0; | ||
64 | m_n_config.s.m_skt = 37; | ||
65 | m_n_config.s.n_skt = 0; | ||
66 | mmr_base = 0; | ||
67 | } else { | ||
68 | get_lowmem_redirect(&lowmem_redir_base, &lowmem_redir_size); | ||
69 | node_id.v = uv_read_local_mmr(UVH_NODE_ID); | ||
70 | m_n_config.v = uv_read_local_mmr(UVH_SI_ADDR_MAP_CONFIG); | ||
71 | mmr_base = | ||
72 | uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR) & | ||
73 | ~UV_MMR_ENABLE; | ||
74 | } | ||
75 | |||
76 | m_val = m_n_config.s.m_skt; | ||
77 | n_val = m_n_config.s.n_skt; | ||
78 | printk(KERN_DEBUG "UV: global MMR base 0x%lx\n", mmr_base); | ||
79 | |||
80 | gnode_upper = (((unsigned long)node_id.s.node_id) & | ||
81 | ~((1 << n_val) - 1)) << m_val; | ||
82 | |||
83 | for_each_present_cpu(cpu) { | ||
84 | nid = cpu_to_node(cpu); | ||
85 | uv_cpu_hub_info(cpu)->lowmem_remap_base = lowmem_redir_base; | ||
86 | uv_cpu_hub_info(cpu)->lowmem_remap_top = | ||
87 | lowmem_redir_base + lowmem_redir_size; | ||
88 | uv_cpu_hub_info(cpu)->m_val = m_val; | ||
89 | uv_cpu_hub_info(cpu)->n_val = m_val; | ||
90 | uv_cpu_hub_info(cpu)->pnode_mask = (1 << n_val) -1; | ||
91 | uv_cpu_hub_info(cpu)->gpa_mask = (1 << (m_val + n_val)) - 1; | ||
92 | uv_cpu_hub_info(cpu)->gnode_upper = gnode_upper; | ||
93 | uv_cpu_hub_info(cpu)->global_mmr_base = mmr_base; | ||
94 | uv_cpu_hub_info(cpu)->coherency_domain_number = 0;/* ZZZ */ | ||
95 | printk(KERN_DEBUG "UV cpu %d, nid %d\n", cpu, nid); | ||
96 | } | ||
97 | } | ||
98 | |||
diff --git a/arch/parisc/hpux/gate.S b/arch/parisc/hpux/gate.S index 38a1c1b8d4e8..f0b18ce89842 100644 --- a/arch/parisc/hpux/gate.S +++ b/arch/parisc/hpux/gate.S | |||
@@ -13,9 +13,10 @@ | |||
13 | #include <asm/unistd.h> | 13 | #include <asm/unistd.h> |
14 | #include <asm/errno.h> | 14 | #include <asm/errno.h> |
15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
16 | #include <linux/init.h> | ||
16 | 17 | ||
17 | .level LEVEL | 18 | .level LEVEL |
18 | .text | 19 | __HEAD |
19 | 20 | ||
20 | .import hpux_call_table | 21 | .import hpux_call_table |
21 | .import hpux_syscall_exit,code | 22 | .import hpux_syscall_exit,code |
diff --git a/arch/parisc/hpux/wrappers.S b/arch/parisc/hpux/wrappers.S index 58c53c879c02..ccd3a50c0995 100644 --- a/arch/parisc/hpux/wrappers.S +++ b/arch/parisc/hpux/wrappers.S | |||
@@ -28,9 +28,10 @@ | |||
28 | #include <asm/assembly.h> | 28 | #include <asm/assembly.h> |
29 | #include <asm/signal.h> | 29 | #include <asm/signal.h> |
30 | #include <linux/linkage.h> | 30 | #include <linux/linkage.h> |
31 | #include <linux/init.h> | ||
31 | 32 | ||
32 | .level LEVEL | 33 | .level LEVEL |
33 | .text | 34 | __HEAD |
34 | 35 | ||
35 | /* These should probably go in a header file somewhere. | 36 | /* These should probably go in a header file somewhere. |
36 | * They are duplicated in kernel/wrappers.S | 37 | * They are duplicated in kernel/wrappers.S |
diff --git a/arch/parisc/kernel/Makefile b/arch/parisc/kernel/Makefile index 1f6585a56f97..016d3fc4111c 100644 --- a/arch/parisc/kernel/Makefile +++ b/arch/parisc/kernel/Makefile | |||
@@ -4,9 +4,6 @@ | |||
4 | 4 | ||
5 | extra-y := init_task.o head.o vmlinux.lds | 5 | extra-y := init_task.o head.o vmlinux.lds |
6 | 6 | ||
7 | AFLAGS_entry.o := -traditional | ||
8 | AFLAGS_pacache.o := -traditional | ||
9 | |||
10 | obj-y := cache.o pacache.o setup.o traps.o time.o irq.o \ | 7 | obj-y := cache.o pacache.o setup.o traps.o time.o irq.o \ |
11 | pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \ | 8 | pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \ |
12 | ptrace.o hardware.o inventory.o drivers.o \ | 9 | ptrace.o hardware.o inventory.o drivers.o \ |
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index 111d47284eac..5d0837458c19 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -38,18 +38,11 @@ | |||
38 | #include <asm/thread_info.h> | 38 | #include <asm/thread_info.h> |
39 | 39 | ||
40 | #include <linux/linkage.h> | 40 | #include <linux/linkage.h> |
41 | #include <linux/init.h> | ||
41 | 42 | ||
42 | #ifdef CONFIG_64BIT | 43 | #ifdef CONFIG_64BIT |
43 | #define CMPIB cmpib,* | ||
44 | #define CMPB cmpb,* | ||
45 | #define COND(x) *x | ||
46 | |||
47 | .level 2.0w | 44 | .level 2.0w |
48 | #else | 45 | #else |
49 | #define CMPIB cmpib, | ||
50 | #define CMPB cmpb, | ||
51 | #define COND(x) x | ||
52 | |||
53 | .level 2.0 | 46 | .level 2.0 |
54 | #endif | 47 | #endif |
55 | 48 | ||
@@ -629,7 +622,7 @@ | |||
629 | * the static part of the kernel address space. | 622 | * the static part of the kernel address space. |
630 | */ | 623 | */ |
631 | 624 | ||
632 | .text | 625 | __HEAD |
633 | 626 | ||
634 | .align PAGE_SIZE | 627 | .align PAGE_SIZE |
635 | 628 | ||
@@ -957,9 +950,9 @@ intr_check_sig: | |||
957 | * Only do signals if we are returning to user space | 950 | * Only do signals if we are returning to user space |
958 | */ | 951 | */ |
959 | LDREG PT_IASQ0(%r16), %r20 | 952 | LDREG PT_IASQ0(%r16), %r20 |
960 | CMPIB=,n 0,%r20,intr_restore /* backward */ | 953 | cmpib,COND(=),n 0,%r20,intr_restore /* backward */ |
961 | LDREG PT_IASQ1(%r16), %r20 | 954 | LDREG PT_IASQ1(%r16), %r20 |
962 | CMPIB=,n 0,%r20,intr_restore /* backward */ | 955 | cmpib,COND(=),n 0,%r20,intr_restore /* backward */ |
963 | 956 | ||
964 | copy %r0, %r25 /* long in_syscall = 0 */ | 957 | copy %r0, %r25 /* long in_syscall = 0 */ |
965 | #ifdef CONFIG_64BIT | 958 | #ifdef CONFIG_64BIT |
@@ -1013,10 +1006,10 @@ intr_do_resched: | |||
1013 | * we jump back to intr_restore. | 1006 | * we jump back to intr_restore. |
1014 | */ | 1007 | */ |
1015 | LDREG PT_IASQ0(%r16), %r20 | 1008 | LDREG PT_IASQ0(%r16), %r20 |
1016 | CMPIB= 0, %r20, intr_do_preempt | 1009 | cmpib,COND(=) 0, %r20, intr_do_preempt |
1017 | nop | 1010 | nop |
1018 | LDREG PT_IASQ1(%r16), %r20 | 1011 | LDREG PT_IASQ1(%r16), %r20 |
1019 | CMPIB= 0, %r20, intr_do_preempt | 1012 | cmpib,COND(=) 0, %r20, intr_do_preempt |
1020 | nop | 1013 | nop |
1021 | 1014 | ||
1022 | #ifdef CONFIG_64BIT | 1015 | #ifdef CONFIG_64BIT |
@@ -1045,7 +1038,7 @@ intr_do_preempt: | |||
1045 | /* current_thread_info()->preempt_count */ | 1038 | /* current_thread_info()->preempt_count */ |
1046 | mfctl %cr30, %r1 | 1039 | mfctl %cr30, %r1 |
1047 | LDREG TI_PRE_COUNT(%r1), %r19 | 1040 | LDREG TI_PRE_COUNT(%r1), %r19 |
1048 | CMPIB<> 0, %r19, intr_restore /* if preempt_count > 0 */ | 1041 | cmpib,COND(<>) 0, %r19, intr_restore /* if preempt_count > 0 */ |
1049 | nop /* prev insn branched backwards */ | 1042 | nop /* prev insn branched backwards */ |
1050 | 1043 | ||
1051 | /* check if we interrupted a critical path */ | 1044 | /* check if we interrupted a critical path */ |
@@ -1064,7 +1057,7 @@ intr_do_preempt: | |||
1064 | */ | 1057 | */ |
1065 | 1058 | ||
1066 | intr_extint: | 1059 | intr_extint: |
1067 | CMPIB=,n 0,%r16,1f | 1060 | cmpib,COND(=),n 0,%r16,1f |
1068 | 1061 | ||
1069 | get_stack_use_cr30 | 1062 | get_stack_use_cr30 |
1070 | b,n 2f | 1063 | b,n 2f |
@@ -1099,7 +1092,7 @@ ENDPROC(syscall_exit_rfi) | |||
1099 | 1092 | ||
1100 | ENTRY(intr_save) /* for os_hpmc */ | 1093 | ENTRY(intr_save) /* for os_hpmc */ |
1101 | mfsp %sr7,%r16 | 1094 | mfsp %sr7,%r16 |
1102 | CMPIB=,n 0,%r16,1f | 1095 | cmpib,COND(=),n 0,%r16,1f |
1103 | get_stack_use_cr30 | 1096 | get_stack_use_cr30 |
1104 | b 2f | 1097 | b 2f |
1105 | copy %r8,%r26 | 1098 | copy %r8,%r26 |
@@ -1121,7 +1114,7 @@ ENTRY(intr_save) /* for os_hpmc */ | |||
1121 | * adjust isr/ior below. | 1114 | * adjust isr/ior below. |
1122 | */ | 1115 | */ |
1123 | 1116 | ||
1124 | CMPIB=,n 6,%r26,skip_save_ior | 1117 | cmpib,COND(=),n 6,%r26,skip_save_ior |
1125 | 1118 | ||
1126 | 1119 | ||
1127 | mfctl %cr20, %r16 /* isr */ | 1120 | mfctl %cr20, %r16 /* isr */ |
@@ -1450,11 +1443,11 @@ nadtlb_emulate: | |||
1450 | bb,>=,n %r9,26,nadtlb_nullify /* m bit not set, just nullify */ | 1443 | bb,>=,n %r9,26,nadtlb_nullify /* m bit not set, just nullify */ |
1451 | BL get_register,%r25 | 1444 | BL get_register,%r25 |
1452 | extrw,u %r9,15,5,%r8 /* Get index register # */ | 1445 | extrw,u %r9,15,5,%r8 /* Get index register # */ |
1453 | CMPIB=,n -1,%r1,nadtlb_fault /* have to use slow path */ | 1446 | cmpib,COND(=),n -1,%r1,nadtlb_fault /* have to use slow path */ |
1454 | copy %r1,%r24 | 1447 | copy %r1,%r24 |
1455 | BL get_register,%r25 | 1448 | BL get_register,%r25 |
1456 | extrw,u %r9,10,5,%r8 /* Get base register # */ | 1449 | extrw,u %r9,10,5,%r8 /* Get base register # */ |
1457 | CMPIB=,n -1,%r1,nadtlb_fault /* have to use slow path */ | 1450 | cmpib,COND(=),n -1,%r1,nadtlb_fault /* have to use slow path */ |
1458 | BL set_register,%r25 | 1451 | BL set_register,%r25 |
1459 | add,l %r1,%r24,%r1 /* doesn't affect c/b bits */ | 1452 | add,l %r1,%r24,%r1 /* doesn't affect c/b bits */ |
1460 | 1453 | ||
@@ -1486,7 +1479,7 @@ nadtlb_probe_check: | |||
1486 | cmpb,<>,n %r16,%r17,nadtlb_fault /* Must be probe,[rw]*/ | 1479 | cmpb,<>,n %r16,%r17,nadtlb_fault /* Must be probe,[rw]*/ |
1487 | BL get_register,%r25 /* Find the target register */ | 1480 | BL get_register,%r25 /* Find the target register */ |
1488 | extrw,u %r9,31,5,%r8 /* Get target register */ | 1481 | extrw,u %r9,31,5,%r8 /* Get target register */ |
1489 | CMPIB=,n -1,%r1,nadtlb_fault /* have to use slow path */ | 1482 | cmpib,COND(=),n -1,%r1,nadtlb_fault /* have to use slow path */ |
1490 | BL set_register,%r25 | 1483 | BL set_register,%r25 |
1491 | copy %r0,%r1 /* Write zero to target register */ | 1484 | copy %r0,%r1 /* Write zero to target register */ |
1492 | b nadtlb_nullify /* Nullify return insn */ | 1485 | b nadtlb_nullify /* Nullify return insn */ |
@@ -1570,12 +1563,12 @@ dbit_trap_20w: | |||
1570 | L3_ptep ptp,pte,t0,va,dbit_fault | 1563 | L3_ptep ptp,pte,t0,va,dbit_fault |
1571 | 1564 | ||
1572 | #ifdef CONFIG_SMP | 1565 | #ifdef CONFIG_SMP |
1573 | CMPIB=,n 0,spc,dbit_nolock_20w | 1566 | cmpib,COND(=),n 0,spc,dbit_nolock_20w |
1574 | load32 PA(pa_dbit_lock),t0 | 1567 | load32 PA(pa_dbit_lock),t0 |
1575 | 1568 | ||
1576 | dbit_spin_20w: | 1569 | dbit_spin_20w: |
1577 | LDCW 0(t0),t1 | 1570 | LDCW 0(t0),t1 |
1578 | cmpib,= 0,t1,dbit_spin_20w | 1571 | cmpib,COND(=) 0,t1,dbit_spin_20w |
1579 | nop | 1572 | nop |
1580 | 1573 | ||
1581 | dbit_nolock_20w: | 1574 | dbit_nolock_20w: |
@@ -1586,7 +1579,7 @@ dbit_nolock_20w: | |||
1586 | 1579 | ||
1587 | idtlbt pte,prot | 1580 | idtlbt pte,prot |
1588 | #ifdef CONFIG_SMP | 1581 | #ifdef CONFIG_SMP |
1589 | CMPIB=,n 0,spc,dbit_nounlock_20w | 1582 | cmpib,COND(=),n 0,spc,dbit_nounlock_20w |
1590 | ldi 1,t1 | 1583 | ldi 1,t1 |
1591 | stw t1,0(t0) | 1584 | stw t1,0(t0) |
1592 | 1585 | ||
@@ -1606,7 +1599,7 @@ dbit_trap_11: | |||
1606 | L2_ptep ptp,pte,t0,va,dbit_fault | 1599 | L2_ptep ptp,pte,t0,va,dbit_fault |
1607 | 1600 | ||
1608 | #ifdef CONFIG_SMP | 1601 | #ifdef CONFIG_SMP |
1609 | CMPIB=,n 0,spc,dbit_nolock_11 | 1602 | cmpib,COND(=),n 0,spc,dbit_nolock_11 |
1610 | load32 PA(pa_dbit_lock),t0 | 1603 | load32 PA(pa_dbit_lock),t0 |
1611 | 1604 | ||
1612 | dbit_spin_11: | 1605 | dbit_spin_11: |
@@ -1628,7 +1621,7 @@ dbit_nolock_11: | |||
1628 | 1621 | ||
1629 | mtsp t1, %sr1 /* Restore sr1 */ | 1622 | mtsp t1, %sr1 /* Restore sr1 */ |
1630 | #ifdef CONFIG_SMP | 1623 | #ifdef CONFIG_SMP |
1631 | CMPIB=,n 0,spc,dbit_nounlock_11 | 1624 | cmpib,COND(=),n 0,spc,dbit_nounlock_11 |
1632 | ldi 1,t1 | 1625 | ldi 1,t1 |
1633 | stw t1,0(t0) | 1626 | stw t1,0(t0) |
1634 | 1627 | ||
@@ -1646,7 +1639,7 @@ dbit_trap_20: | |||
1646 | L2_ptep ptp,pte,t0,va,dbit_fault | 1639 | L2_ptep ptp,pte,t0,va,dbit_fault |
1647 | 1640 | ||
1648 | #ifdef CONFIG_SMP | 1641 | #ifdef CONFIG_SMP |
1649 | CMPIB=,n 0,spc,dbit_nolock_20 | 1642 | cmpib,COND(=),n 0,spc,dbit_nolock_20 |
1650 | load32 PA(pa_dbit_lock),t0 | 1643 | load32 PA(pa_dbit_lock),t0 |
1651 | 1644 | ||
1652 | dbit_spin_20: | 1645 | dbit_spin_20: |
@@ -1665,7 +1658,7 @@ dbit_nolock_20: | |||
1665 | idtlbt pte,prot | 1658 | idtlbt pte,prot |
1666 | 1659 | ||
1667 | #ifdef CONFIG_SMP | 1660 | #ifdef CONFIG_SMP |
1668 | CMPIB=,n 0,spc,dbit_nounlock_20 | 1661 | cmpib,COND(=),n 0,spc,dbit_nounlock_20 |
1669 | ldi 1,t1 | 1662 | ldi 1,t1 |
1670 | stw t1,0(t0) | 1663 | stw t1,0(t0) |
1671 | 1664 | ||
@@ -1994,7 +1987,7 @@ ENTRY(syscall_exit) | |||
1994 | 1987 | ||
1995 | /* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */ | 1988 | /* We can't use "CMPIB<> PER_HPUX" since "im5" field is sign extended */ |
1996 | ldo -PER_HPUX(%r19), %r19 | 1989 | ldo -PER_HPUX(%r19), %r19 |
1997 | CMPIB<>,n 0,%r19,1f | 1990 | cmpib,COND(<>),n 0,%r19,1f |
1998 | 1991 | ||
1999 | /* Save other hpux returns if personality is PER_HPUX */ | 1992 | /* Save other hpux returns if personality is PER_HPUX */ |
2000 | STREG %r22,TASK_PT_GR22(%r1) | 1993 | STREG %r22,TASK_PT_GR22(%r1) |
diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S index ec2482dc1beb..5680a2c3b13d 100644 --- a/arch/parisc/kernel/head.S +++ b/arch/parisc/kernel/head.S | |||
@@ -32,7 +32,7 @@ ENTRY(boot_args) | |||
32 | .word 0 /* arg3 */ | 32 | .word 0 /* arg3 */ |
33 | END(boot_args) | 33 | END(boot_args) |
34 | 34 | ||
35 | .section .text.head | 35 | __HEAD |
36 | .align 4 | 36 | .align 4 |
37 | .import init_thread_union,data | 37 | .import init_thread_union,data |
38 | .import fault_vector_20,code /* IVA parisc 2.0 32 bit */ | 38 | .import fault_vector_20,code /* IVA parisc 2.0 32 bit */ |
diff --git a/arch/parisc/kernel/hpmc.S b/arch/parisc/kernel/hpmc.S index 2cbf13b3ef11..068322eb8c9b 100644 --- a/arch/parisc/kernel/hpmc.S +++ b/arch/parisc/kernel/hpmc.S | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <asm/pdc.h> | 47 | #include <asm/pdc.h> |
48 | 48 | ||
49 | #include <linux/linkage.h> | 49 | #include <linux/linkage.h> |
50 | #include <linux/init.h> | ||
50 | 51 | ||
51 | /* | 52 | /* |
52 | * stack for os_hpmc, the HPMC handler. | 53 | * stack for os_hpmc, the HPMC handler. |
@@ -76,7 +77,7 @@ ENTRY(hpmc_pim_data) | |||
76 | .block HPMC_PIM_DATA_SIZE | 77 | .block HPMC_PIM_DATA_SIZE |
77 | END(hpmc_pim_data) | 78 | END(hpmc_pim_data) |
78 | 79 | ||
79 | .text | 80 | __HEAD |
80 | 81 | ||
81 | .import intr_save, code | 82 | .import intr_save, code |
82 | ENTRY(os_hpmc) | 83 | ENTRY(os_hpmc) |
diff --git a/arch/parisc/kernel/inventory.c b/arch/parisc/kernel/inventory.c index 4845a6444633..bd1f7f1ff74e 100644 --- a/arch/parisc/kernel/inventory.c +++ b/arch/parisc/kernel/inventory.c | |||
@@ -499,7 +499,7 @@ add_system_map_addresses(struct parisc_device *dev, int num_addrs, | |||
499 | dev->addr = kmalloc(num_addrs * sizeof(unsigned long), GFP_KERNEL); | 499 | dev->addr = kmalloc(num_addrs * sizeof(unsigned long), GFP_KERNEL); |
500 | if(!dev->addr) { | 500 | if(!dev->addr) { |
501 | printk(KERN_ERR "%s %s(): memory allocation failure\n", | 501 | printk(KERN_ERR "%s %s(): memory allocation failure\n", |
502 | __FILE__, __FUNCTION__); | 502 | __FILE__, __func__); |
503 | return; | 503 | return; |
504 | } | 504 | } |
505 | 505 | ||
diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S index 5901092e0196..e3246a5ca74f 100644 --- a/arch/parisc/kernel/pacache.S +++ b/arch/parisc/kernel/pacache.S | |||
@@ -37,8 +37,9 @@ | |||
37 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
38 | #include <asm/cache.h> | 38 | #include <asm/cache.h> |
39 | #include <linux/linkage.h> | 39 | #include <linux/linkage.h> |
40 | #include <linux/init.h> | ||
40 | 41 | ||
41 | .text | 42 | __HEAD |
42 | .align 128 | 43 | .align 128 |
43 | 44 | ||
44 | ENTRY(flush_tlb_all_local) | 45 | ENTRY(flush_tlb_all_local) |
@@ -85,7 +86,7 @@ ENTRY(flush_tlb_all_local) | |||
85 | LDREG ITLB_OFF_COUNT(%r1), %arg2 | 86 | LDREG ITLB_OFF_COUNT(%r1), %arg2 |
86 | LDREG ITLB_LOOP(%r1), %arg3 | 87 | LDREG ITLB_LOOP(%r1), %arg3 |
87 | 88 | ||
88 | ADDIB= -1, %arg3, fitoneloop /* Preadjust and test */ | 89 | addib,COND(=) -1, %arg3, fitoneloop /* Preadjust and test */ |
89 | movb,<,n %arg3, %r31, fitdone /* If loop < 0, skip */ | 90 | movb,<,n %arg3, %r31, fitdone /* If loop < 0, skip */ |
90 | copy %arg0, %r28 /* Init base addr */ | 91 | copy %arg0, %r28 /* Init base addr */ |
91 | 92 | ||
@@ -95,14 +96,14 @@ fitmanyloop: /* Loop if LOOP >= 2 */ | |||
95 | copy %arg2, %r29 /* Init middle loop count */ | 96 | copy %arg2, %r29 /* Init middle loop count */ |
96 | 97 | ||
97 | fitmanymiddle: /* Loop if LOOP >= 2 */ | 98 | fitmanymiddle: /* Loop if LOOP >= 2 */ |
98 | ADDIB> -1, %r31, fitmanymiddle /* Adjusted inner loop decr */ | 99 | addib,COND(>) -1, %r31, fitmanymiddle /* Adjusted inner loop decr */ |
99 | pitlbe 0(%sr1, %r28) | 100 | pitlbe 0(%sr1, %r28) |
100 | pitlbe,m %arg1(%sr1, %r28) /* Last pitlbe and addr adjust */ | 101 | pitlbe,m %arg1(%sr1, %r28) /* Last pitlbe and addr adjust */ |
101 | ADDIB> -1, %r29, fitmanymiddle /* Middle loop decr */ | 102 | addib,COND(>) -1, %r29, fitmanymiddle /* Middle loop decr */ |
102 | copy %arg3, %r31 /* Re-init inner loop count */ | 103 | copy %arg3, %r31 /* Re-init inner loop count */ |
103 | 104 | ||
104 | movb,tr %arg0, %r28, fitmanyloop /* Re-init base addr */ | 105 | movb,tr %arg0, %r28, fitmanyloop /* Re-init base addr */ |
105 | ADDIB<=,n -1, %r22, fitdone /* Outer loop count decr */ | 106 | addib,COND(<=),n -1, %r22, fitdone /* Outer loop count decr */ |
106 | 107 | ||
107 | fitoneloop: /* Loop if LOOP = 1 */ | 108 | fitoneloop: /* Loop if LOOP = 1 */ |
108 | mtsp %r20, %sr1 | 109 | mtsp %r20, %sr1 |
@@ -110,10 +111,10 @@ fitoneloop: /* Loop if LOOP = 1 */ | |||
110 | copy %arg2, %r29 /* init middle loop count */ | 111 | copy %arg2, %r29 /* init middle loop count */ |
111 | 112 | ||
112 | fitonemiddle: /* Loop if LOOP = 1 */ | 113 | fitonemiddle: /* Loop if LOOP = 1 */ |
113 | ADDIB> -1, %r29, fitonemiddle /* Middle loop count decr */ | 114 | addib,COND(>) -1, %r29, fitonemiddle /* Middle loop count decr */ |
114 | pitlbe,m %arg1(%sr1, %r28) /* pitlbe for one loop */ | 115 | pitlbe,m %arg1(%sr1, %r28) /* pitlbe for one loop */ |
115 | 116 | ||
116 | ADDIB> -1, %r22, fitoneloop /* Outer loop count decr */ | 117 | addib,COND(>) -1, %r22, fitoneloop /* Outer loop count decr */ |
117 | add %r21, %r20, %r20 /* increment space */ | 118 | add %r21, %r20, %r20 /* increment space */ |
118 | 119 | ||
119 | fitdone: | 120 | fitdone: |
@@ -128,7 +129,7 @@ fitdone: | |||
128 | LDREG DTLB_OFF_COUNT(%r1), %arg2 | 129 | LDREG DTLB_OFF_COUNT(%r1), %arg2 |
129 | LDREG DTLB_LOOP(%r1), %arg3 | 130 | LDREG DTLB_LOOP(%r1), %arg3 |
130 | 131 | ||
131 | ADDIB= -1, %arg3, fdtoneloop /* Preadjust and test */ | 132 | addib,COND(=) -1, %arg3, fdtoneloop /* Preadjust and test */ |
132 | movb,<,n %arg3, %r31, fdtdone /* If loop < 0, skip */ | 133 | movb,<,n %arg3, %r31, fdtdone /* If loop < 0, skip */ |
133 | copy %arg0, %r28 /* Init base addr */ | 134 | copy %arg0, %r28 /* Init base addr */ |
134 | 135 | ||
@@ -138,14 +139,14 @@ fdtmanyloop: /* Loop if LOOP >= 2 */ | |||
138 | copy %arg2, %r29 /* Init middle loop count */ | 139 | copy %arg2, %r29 /* Init middle loop count */ |
139 | 140 | ||
140 | fdtmanymiddle: /* Loop if LOOP >= 2 */ | 141 | fdtmanymiddle: /* Loop if LOOP >= 2 */ |
141 | ADDIB> -1, %r31, fdtmanymiddle /* Adjusted inner loop decr */ | 142 | addib,COND(>) -1, %r31, fdtmanymiddle /* Adjusted inner loop decr */ |
142 | pdtlbe 0(%sr1, %r28) | 143 | pdtlbe 0(%sr1, %r28) |
143 | pdtlbe,m %arg1(%sr1, %r28) /* Last pdtlbe and addr adjust */ | 144 | pdtlbe,m %arg1(%sr1, %r28) /* Last pdtlbe and addr adjust */ |
144 | ADDIB> -1, %r29, fdtmanymiddle /* Middle loop decr */ | 145 | addib,COND(>) -1, %r29, fdtmanymiddle /* Middle loop decr */ |
145 | copy %arg3, %r31 /* Re-init inner loop count */ | 146 | copy %arg3, %r31 /* Re-init inner loop count */ |
146 | 147 | ||
147 | movb,tr %arg0, %r28, fdtmanyloop /* Re-init base addr */ | 148 | movb,tr %arg0, %r28, fdtmanyloop /* Re-init base addr */ |
148 | ADDIB<=,n -1, %r22,fdtdone /* Outer loop count decr */ | 149 | addib,COND(<=),n -1, %r22,fdtdone /* Outer loop count decr */ |
149 | 150 | ||
150 | fdtoneloop: /* Loop if LOOP = 1 */ | 151 | fdtoneloop: /* Loop if LOOP = 1 */ |
151 | mtsp %r20, %sr1 | 152 | mtsp %r20, %sr1 |
@@ -153,10 +154,10 @@ fdtoneloop: /* Loop if LOOP = 1 */ | |||
153 | copy %arg2, %r29 /* init middle loop count */ | 154 | copy %arg2, %r29 /* init middle loop count */ |
154 | 155 | ||
155 | fdtonemiddle: /* Loop if LOOP = 1 */ | 156 | fdtonemiddle: /* Loop if LOOP = 1 */ |
156 | ADDIB> -1, %r29, fdtonemiddle /* Middle loop count decr */ | 157 | addib,COND(>) -1, %r29, fdtonemiddle /* Middle loop count decr */ |
157 | pdtlbe,m %arg1(%sr1, %r28) /* pdtlbe for one loop */ | 158 | pdtlbe,m %arg1(%sr1, %r28) /* pdtlbe for one loop */ |
158 | 159 | ||
159 | ADDIB> -1, %r22, fdtoneloop /* Outer loop count decr */ | 160 | addib,COND(>) -1, %r22, fdtoneloop /* Outer loop count decr */ |
160 | add %r21, %r20, %r20 /* increment space */ | 161 | add %r21, %r20, %r20 /* increment space */ |
161 | 162 | ||
162 | 163 | ||
@@ -209,18 +210,18 @@ ENTRY(flush_instruction_cache_local) | |||
209 | LDREG ICACHE_COUNT(%r1), %arg2 | 210 | LDREG ICACHE_COUNT(%r1), %arg2 |
210 | LDREG ICACHE_LOOP(%r1), %arg3 | 211 | LDREG ICACHE_LOOP(%r1), %arg3 |
211 | rsm PSW_SM_I, %r22 /* No mmgt ops during loop*/ | 212 | rsm PSW_SM_I, %r22 /* No mmgt ops during loop*/ |
212 | ADDIB= -1, %arg3, fioneloop /* Preadjust and test */ | 213 | addib,COND(=) -1, %arg3, fioneloop /* Preadjust and test */ |
213 | movb,<,n %arg3, %r31, fisync /* If loop < 0, do sync */ | 214 | movb,<,n %arg3, %r31, fisync /* If loop < 0, do sync */ |
214 | 215 | ||
215 | fimanyloop: /* Loop if LOOP >= 2 */ | 216 | fimanyloop: /* Loop if LOOP >= 2 */ |
216 | ADDIB> -1, %r31, fimanyloop /* Adjusted inner loop decr */ | 217 | addib,COND(>) -1, %r31, fimanyloop /* Adjusted inner loop decr */ |
217 | fice %r0(%sr1, %arg0) | 218 | fice %r0(%sr1, %arg0) |
218 | fice,m %arg1(%sr1, %arg0) /* Last fice and addr adjust */ | 219 | fice,m %arg1(%sr1, %arg0) /* Last fice and addr adjust */ |
219 | movb,tr %arg3, %r31, fimanyloop /* Re-init inner loop count */ | 220 | movb,tr %arg3, %r31, fimanyloop /* Re-init inner loop count */ |
220 | ADDIB<=,n -1, %arg2, fisync /* Outer loop decr */ | 221 | addib,COND(<=),n -1, %arg2, fisync /* Outer loop decr */ |
221 | 222 | ||
222 | fioneloop: /* Loop if LOOP = 1 */ | 223 | fioneloop: /* Loop if LOOP = 1 */ |
223 | ADDIB> -1, %arg2, fioneloop /* Outer loop count decr */ | 224 | addib,COND(>) -1, %arg2, fioneloop /* Outer loop count decr */ |
224 | fice,m %arg1(%sr1, %arg0) /* Fice for one loop */ | 225 | fice,m %arg1(%sr1, %arg0) /* Fice for one loop */ |
225 | 226 | ||
226 | fisync: | 227 | fisync: |
@@ -250,18 +251,18 @@ ENTRY(flush_data_cache_local) | |||
250 | LDREG DCACHE_COUNT(%r1), %arg2 | 251 | LDREG DCACHE_COUNT(%r1), %arg2 |
251 | LDREG DCACHE_LOOP(%r1), %arg3 | 252 | LDREG DCACHE_LOOP(%r1), %arg3 |
252 | rsm PSW_SM_I, %r22 | 253 | rsm PSW_SM_I, %r22 |
253 | ADDIB= -1, %arg3, fdoneloop /* Preadjust and test */ | 254 | addib,COND(=) -1, %arg3, fdoneloop /* Preadjust and test */ |
254 | movb,<,n %arg3, %r31, fdsync /* If loop < 0, do sync */ | 255 | movb,<,n %arg3, %r31, fdsync /* If loop < 0, do sync */ |
255 | 256 | ||
256 | fdmanyloop: /* Loop if LOOP >= 2 */ | 257 | fdmanyloop: /* Loop if LOOP >= 2 */ |
257 | ADDIB> -1, %r31, fdmanyloop /* Adjusted inner loop decr */ | 258 | addib,COND(>) -1, %r31, fdmanyloop /* Adjusted inner loop decr */ |
258 | fdce %r0(%sr1, %arg0) | 259 | fdce %r0(%sr1, %arg0) |
259 | fdce,m %arg1(%sr1, %arg0) /* Last fdce and addr adjust */ | 260 | fdce,m %arg1(%sr1, %arg0) /* Last fdce and addr adjust */ |
260 | movb,tr %arg3, %r31, fdmanyloop /* Re-init inner loop count */ | 261 | movb,tr %arg3, %r31, fdmanyloop /* Re-init inner loop count */ |
261 | ADDIB<=,n -1, %arg2, fdsync /* Outer loop decr */ | 262 | addib,COND(<=),n -1, %arg2, fdsync /* Outer loop decr */ |
262 | 263 | ||
263 | fdoneloop: /* Loop if LOOP = 1 */ | 264 | fdoneloop: /* Loop if LOOP = 1 */ |
264 | ADDIB> -1, %arg2, fdoneloop /* Outer loop count decr */ | 265 | addib,COND(>) -1, %arg2, fdoneloop /* Outer loop count decr */ |
265 | fdce,m %arg1(%sr1, %arg0) /* Fdce for one loop */ | 266 | fdce,m %arg1(%sr1, %arg0) /* Fdce for one loop */ |
266 | 267 | ||
267 | fdsync: | 268 | fdsync: |
@@ -342,7 +343,7 @@ ENTRY(copy_user_page_asm) | |||
342 | * non-taken backward branch. Note that .+4 is a backwards branch. | 343 | * non-taken backward branch. Note that .+4 is a backwards branch. |
343 | * The ldd should only get executed if the branch is taken. | 344 | * The ldd should only get executed if the branch is taken. |
344 | */ | 345 | */ |
345 | ADDIB>,n -1, %r1, 1b /* bundle 10 */ | 346 | addib,COND(>),n -1, %r1, 1b /* bundle 10 */ |
346 | ldd 0(%r25), %r19 /* start next loads */ | 347 | ldd 0(%r25), %r19 /* start next loads */ |
347 | 348 | ||
348 | #else | 349 | #else |
@@ -391,7 +392,7 @@ ENTRY(copy_user_page_asm) | |||
391 | stw %r21, 56(%r26) | 392 | stw %r21, 56(%r26) |
392 | stw %r22, 60(%r26) | 393 | stw %r22, 60(%r26) |
393 | ldo 64(%r26), %r26 | 394 | ldo 64(%r26), %r26 |
394 | ADDIB>,n -1, %r1, 1b | 395 | addib,COND(>),n -1, %r1, 1b |
395 | ldw 0(%r25), %r19 | 396 | ldw 0(%r25), %r19 |
396 | #endif | 397 | #endif |
397 | bv %r0(%r2) | 398 | bv %r0(%r2) |
@@ -515,7 +516,7 @@ ENTRY(copy_user_page_asm) | |||
515 | stw %r21, 56(%r28) | 516 | stw %r21, 56(%r28) |
516 | stw %r22, 60(%r28) | 517 | stw %r22, 60(%r28) |
517 | ldo 64(%r28), %r28 | 518 | ldo 64(%r28), %r28 |
518 | ADDIB> -1, %r1,1b | 519 | addib,COND(>) -1, %r1,1b |
519 | ldo 64(%r29), %r29 | 520 | ldo 64(%r29), %r29 |
520 | 521 | ||
521 | bv %r0(%r2) | 522 | bv %r0(%r2) |
@@ -574,7 +575,7 @@ ENTRY(__clear_user_page_asm) | |||
574 | std %r0, 104(%r28) | 575 | std %r0, 104(%r28) |
575 | std %r0, 112(%r28) | 576 | std %r0, 112(%r28) |
576 | std %r0, 120(%r28) | 577 | std %r0, 120(%r28) |
577 | ADDIB> -1, %r1, 1b | 578 | addib,COND(>) -1, %r1, 1b |
578 | ldo 128(%r28), %r28 | 579 | ldo 128(%r28), %r28 |
579 | 580 | ||
580 | #else /* ! CONFIG_64BIT */ | 581 | #else /* ! CONFIG_64BIT */ |
@@ -597,7 +598,7 @@ ENTRY(__clear_user_page_asm) | |||
597 | stw %r0, 52(%r28) | 598 | stw %r0, 52(%r28) |
598 | stw %r0, 56(%r28) | 599 | stw %r0, 56(%r28) |
599 | stw %r0, 60(%r28) | 600 | stw %r0, 60(%r28) |
600 | ADDIB> -1, %r1, 1b | 601 | addib,COND(>) -1, %r1, 1b |
601 | ldo 64(%r28), %r28 | 602 | ldo 64(%r28), %r28 |
602 | #endif /* CONFIG_64BIT */ | 603 | #endif /* CONFIG_64BIT */ |
603 | 604 | ||
@@ -640,7 +641,7 @@ ENTRY(flush_kernel_dcache_page_asm) | |||
640 | fdc,m %r23(%r26) | 641 | fdc,m %r23(%r26) |
641 | fdc,m %r23(%r26) | 642 | fdc,m %r23(%r26) |
642 | fdc,m %r23(%r26) | 643 | fdc,m %r23(%r26) |
643 | CMPB<< %r26, %r25,1b | 644 | cmpb,COND(<<) %r26, %r25,1b |
644 | fdc,m %r23(%r26) | 645 | fdc,m %r23(%r26) |
645 | 646 | ||
646 | sync | 647 | sync |
@@ -683,7 +684,7 @@ ENTRY(flush_user_dcache_page) | |||
683 | fdc,m %r23(%sr3, %r26) | 684 | fdc,m %r23(%sr3, %r26) |
684 | fdc,m %r23(%sr3, %r26) | 685 | fdc,m %r23(%sr3, %r26) |
685 | fdc,m %r23(%sr3, %r26) | 686 | fdc,m %r23(%sr3, %r26) |
686 | CMPB<< %r26, %r25,1b | 687 | cmpb,COND(<<) %r26, %r25,1b |
687 | fdc,m %r23(%sr3, %r26) | 688 | fdc,m %r23(%sr3, %r26) |
688 | 689 | ||
689 | sync | 690 | sync |
@@ -726,7 +727,7 @@ ENTRY(flush_user_icache_page) | |||
726 | fic,m %r23(%sr3, %r26) | 727 | fic,m %r23(%sr3, %r26) |
727 | fic,m %r23(%sr3, %r26) | 728 | fic,m %r23(%sr3, %r26) |
728 | fic,m %r23(%sr3, %r26) | 729 | fic,m %r23(%sr3, %r26) |
729 | CMPB<< %r26, %r25,1b | 730 | cmpb,COND(<<) %r26, %r25,1b |
730 | fic,m %r23(%sr3, %r26) | 731 | fic,m %r23(%sr3, %r26) |
731 | 732 | ||
732 | sync | 733 | sync |
@@ -769,7 +770,7 @@ ENTRY(purge_kernel_dcache_page) | |||
769 | pdc,m %r23(%r26) | 770 | pdc,m %r23(%r26) |
770 | pdc,m %r23(%r26) | 771 | pdc,m %r23(%r26) |
771 | pdc,m %r23(%r26) | 772 | pdc,m %r23(%r26) |
772 | CMPB<< %r26, %r25, 1b | 773 | cmpb,COND(<<) %r26, %r25, 1b |
773 | pdc,m %r23(%r26) | 774 | pdc,m %r23(%r26) |
774 | 775 | ||
775 | sync | 776 | sync |
@@ -833,7 +834,7 @@ ENTRY(flush_alias_page) | |||
833 | fdc,m %r23(%r28) | 834 | fdc,m %r23(%r28) |
834 | fdc,m %r23(%r28) | 835 | fdc,m %r23(%r28) |
835 | fdc,m %r23(%r28) | 836 | fdc,m %r23(%r28) |
836 | CMPB<< %r28, %r29, 1b | 837 | cmpb,COND(<<) %r28, %r29, 1b |
837 | fdc,m %r23(%r28) | 838 | fdc,m %r23(%r28) |
838 | 839 | ||
839 | sync | 840 | sync |
@@ -856,7 +857,7 @@ flush_user_dcache_range_asm: | |||
856 | ldo -1(%r23), %r21 | 857 | ldo -1(%r23), %r21 |
857 | ANDCM %r26, %r21, %r26 | 858 | ANDCM %r26, %r21, %r26 |
858 | 859 | ||
859 | 1: CMPB<<,n %r26, %r25, 1b | 860 | 1: cmpb,COND(<<),n %r26, %r25, 1b |
860 | fdc,m %r23(%sr3, %r26) | 861 | fdc,m %r23(%sr3, %r26) |
861 | 862 | ||
862 | sync | 863 | sync |
@@ -877,7 +878,7 @@ ENTRY(flush_kernel_dcache_range_asm) | |||
877 | ldo -1(%r23), %r21 | 878 | ldo -1(%r23), %r21 |
878 | ANDCM %r26, %r21, %r26 | 879 | ANDCM %r26, %r21, %r26 |
879 | 880 | ||
880 | 1: CMPB<<,n %r26, %r25,1b | 881 | 1: cmpb,COND(<<),n %r26, %r25,1b |
881 | fdc,m %r23(%r26) | 882 | fdc,m %r23(%r26) |
882 | 883 | ||
883 | sync | 884 | sync |
@@ -899,7 +900,7 @@ ENTRY(flush_user_icache_range_asm) | |||
899 | ldo -1(%r23), %r21 | 900 | ldo -1(%r23), %r21 |
900 | ANDCM %r26, %r21, %r26 | 901 | ANDCM %r26, %r21, %r26 |
901 | 902 | ||
902 | 1: CMPB<<,n %r26, %r25,1b | 903 | 1: cmpb,COND(<<),n %r26, %r25,1b |
903 | fic,m %r23(%sr3, %r26) | 904 | fic,m %r23(%sr3, %r26) |
904 | 905 | ||
905 | sync | 906 | sync |
@@ -942,7 +943,7 @@ ENTRY(flush_kernel_icache_page) | |||
942 | fic,m %r23(%sr4, %r26) | 943 | fic,m %r23(%sr4, %r26) |
943 | fic,m %r23(%sr4, %r26) | 944 | fic,m %r23(%sr4, %r26) |
944 | fic,m %r23(%sr4, %r26) | 945 | fic,m %r23(%sr4, %r26) |
945 | CMPB<< %r26, %r25, 1b | 946 | cmpb,COND(<<) %r26, %r25, 1b |
946 | fic,m %r23(%sr4, %r26) | 947 | fic,m %r23(%sr4, %r26) |
947 | 948 | ||
948 | sync | 949 | sync |
@@ -963,7 +964,7 @@ ENTRY(flush_kernel_icache_range_asm) | |||
963 | ldo -1(%r23), %r21 | 964 | ldo -1(%r23), %r21 |
964 | ANDCM %r26, %r21, %r26 | 965 | ANDCM %r26, %r21, %r26 |
965 | 966 | ||
966 | 1: CMPB<<,n %r26, %r25, 1b | 967 | 1: cmpb,COND(<<),n %r26, %r25, 1b |
967 | fic,m %r23(%sr4, %r26) | 968 | fic,m %r23(%sr4, %r26) |
968 | 969 | ||
969 | sync | 970 | sync |
diff --git a/arch/parisc/kernel/perf_asm.S b/arch/parisc/kernel/perf_asm.S index 43874ca3ed67..d411dfb5b6d1 100644 --- a/arch/parisc/kernel/perf_asm.S +++ b/arch/parisc/kernel/perf_asm.S | |||
@@ -20,6 +20,8 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <asm/assembly.h> | 22 | #include <asm/assembly.h> |
23 | |||
24 | #include <linux/init.h> | ||
23 | #include <linux/linkage.h> | 25 | #include <linux/linkage.h> |
24 | 26 | ||
25 | #ifdef CONFIG_64BIT | 27 | #ifdef CONFIG_64BIT |
@@ -41,7 +43,7 @@ | |||
41 | ; The coprocessor only needs to be enabled when | 43 | ; The coprocessor only needs to be enabled when |
42 | ; starting/stopping the coprocessor with the pmenb/pmdis. | 44 | ; starting/stopping the coprocessor with the pmenb/pmdis. |
43 | ; | 45 | ; |
44 | .text | 46 | __HEAD |
45 | 47 | ||
46 | ENTRY(perf_intrigue_enable_perf_counters) | 48 | ENTRY(perf_intrigue_enable_perf_counters) |
47 | .proc | 49 | .proc |
diff --git a/arch/parisc/kernel/real2.S b/arch/parisc/kernel/real2.S index 7a92695d95a6..47fbdae6efd5 100644 --- a/arch/parisc/kernel/real2.S +++ b/arch/parisc/kernel/real2.S | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <asm/assembly.h> | 12 | #include <asm/assembly.h> |
13 | 13 | ||
14 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
15 | #include <linux/init.h> | ||
15 | 16 | ||
16 | .section .bss | 17 | .section .bss |
17 | .export real_stack | 18 | .export real_stack |
@@ -39,7 +40,7 @@ save_cr_end: | |||
39 | /************************ 32-bit real-mode calls ***********************/ | 40 | /************************ 32-bit real-mode calls ***********************/ |
40 | /* This can be called in both narrow and wide kernels */ | 41 | /* This can be called in both narrow and wide kernels */ |
41 | 42 | ||
42 | .text | 43 | __HEAD |
43 | 44 | ||
44 | /* unsigned long real32_call_asm(unsigned int *sp, | 45 | /* unsigned long real32_call_asm(unsigned int *sp, |
45 | * unsigned int *arg0p, | 46 | * unsigned int *arg0p, |
@@ -113,7 +114,7 @@ ENDPROC(real32_call_asm) | |||
113 | # define PUSH_CR(r, where) mfctl r, %r1 ! STREG,ma %r1, REG_SZ(where) | 114 | # define PUSH_CR(r, where) mfctl r, %r1 ! STREG,ma %r1, REG_SZ(where) |
114 | # define POP_CR(r, where) LDREG,mb -REG_SZ(where), %r1 ! mtctl %r1, r | 115 | # define POP_CR(r, where) LDREG,mb -REG_SZ(where), %r1 ! mtctl %r1, r |
115 | 116 | ||
116 | .text | 117 | __HEAD |
117 | save_control_regs: | 118 | save_control_regs: |
118 | load32 PA(save_cr_space), %r28 | 119 | load32 PA(save_cr_space), %r28 |
119 | PUSH_CR(%cr24, %r28) | 120 | PUSH_CR(%cr24, %r28) |
@@ -145,7 +146,7 @@ restore_control_regs: | |||
145 | /* rfi_virt2real() and rfi_real2virt() could perhaps be adapted for | 146 | /* rfi_virt2real() and rfi_real2virt() could perhaps be adapted for |
146 | * more general-purpose use by the several places which need RFIs | 147 | * more general-purpose use by the several places which need RFIs |
147 | */ | 148 | */ |
148 | .text | 149 | __HEAD |
149 | .align 128 | 150 | .align 128 |
150 | rfi_virt2real: | 151 | rfi_virt2real: |
151 | /* switch to real mode... */ | 152 | /* switch to real mode... */ |
@@ -180,7 +181,7 @@ rfi_v2r_1: | |||
180 | bv 0(%r2) | 181 | bv 0(%r2) |
181 | nop | 182 | nop |
182 | 183 | ||
183 | .text | 184 | __HEAD |
184 | .align 128 | 185 | .align 128 |
185 | rfi_real2virt: | 186 | rfi_real2virt: |
186 | rsm PSW_SM_I,%r0 | 187 | rsm PSW_SM_I,%r0 |
@@ -218,7 +219,7 @@ rfi_r2v_1: | |||
218 | 219 | ||
219 | /************************ 64-bit real-mode calls ***********************/ | 220 | /************************ 64-bit real-mode calls ***********************/ |
220 | /* This is only usable in wide kernels right now and will probably stay so */ | 221 | /* This is only usable in wide kernels right now and will probably stay so */ |
221 | .text | 222 | __HEAD |
222 | /* unsigned long real64_call_asm(unsigned long *sp, | 223 | /* unsigned long real64_call_asm(unsigned long *sp, |
223 | * unsigned long *arg0p, | 224 | * unsigned long *arg0p, |
224 | * unsigned long fn) | 225 | * unsigned long fn) |
@@ -276,7 +277,7 @@ ENDPROC(real64_call_asm) | |||
276 | 277 | ||
277 | #endif | 278 | #endif |
278 | 279 | ||
279 | .text | 280 | __HEAD |
280 | /* http://lists.parisc-linux.org/hypermail/parisc-linux/10916.html | 281 | /* http://lists.parisc-linux.org/hypermail/parisc-linux/10916.html |
281 | ** GCC 3.3 and later has a new function in libgcc.a for | 282 | ** GCC 3.3 and later has a new function in libgcc.a for |
282 | ** comparing function pointers. | 283 | ** comparing function pointers. |
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index 69b6eebc466e..ae509d8cd03f 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/processor.h> | 17 | #include <asm/processor.h> |
18 | 18 | ||
19 | #include <linux/linkage.h> | 19 | #include <linux/linkage.h> |
20 | #include <linux/init.h> | ||
20 | 21 | ||
21 | /* We fill the empty parts of the gateway page with | 22 | /* We fill the empty parts of the gateway page with |
22 | * something that will kill the kernel or a | 23 | * something that will kill the kernel or a |
@@ -26,7 +27,7 @@ | |||
26 | 27 | ||
27 | .level LEVEL | 28 | .level LEVEL |
28 | 29 | ||
29 | .text | 30 | __HEAD |
30 | 31 | ||
31 | .import syscall_exit,code | 32 | .import syscall_exit,code |
32 | .import syscall_exit_rfi,code | 33 | .import syscall_exit_rfi,code |
@@ -636,7 +637,7 @@ END(sys_call_table64) | |||
636 | All light-weight-syscall atomic operations | 637 | All light-weight-syscall atomic operations |
637 | will use this set of locks | 638 | will use this set of locks |
638 | */ | 639 | */ |
639 | .section .data | 640 | .section .data, "aw" |
640 | .align PAGE_SIZE | 641 | .align PAGE_SIZE |
641 | ENTRY(lws_lock_start) | 642 | ENTRY(lws_lock_start) |
642 | /* lws locks */ | 643 | /* lws locks */ |
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 9dc6dc42f9cf..675f1d098f05 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c | |||
@@ -275,7 +275,7 @@ KERN_CRIT " || ||\n"); | |||
275 | 275 | ||
276 | /* Wot's wrong wif bein' racy? */ | 276 | /* Wot's wrong wif bein' racy? */ |
277 | if (current->thread.flags & PARISC_KERNEL_DEATH) { | 277 | if (current->thread.flags & PARISC_KERNEL_DEATH) { |
278 | printk(KERN_CRIT "%s() recursion detected.\n", __FUNCTION__); | 278 | printk(KERN_CRIT "%s() recursion detected.\n", __func__); |
279 | local_irq_enable(); | 279 | local_irq_enable(); |
280 | while (1); | 280 | while (1); |
281 | } | 281 | } |
diff --git a/arch/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c index aebf3c168871..e6f4b7a4b7e3 100644 --- a/arch/parisc/kernel/unaligned.c +++ b/arch/parisc/kernel/unaligned.c | |||
@@ -30,7 +30,7 @@ | |||
30 | /* #define DEBUG_UNALIGNED 1 */ | 30 | /* #define DEBUG_UNALIGNED 1 */ |
31 | 31 | ||
32 | #ifdef DEBUG_UNALIGNED | 32 | #ifdef DEBUG_UNALIGNED |
33 | #define DPRINTF(fmt, args...) do { printk(KERN_DEBUG "%s:%d:%s ", __FILE__, __LINE__, __FUNCTION__ ); printk(KERN_DEBUG fmt, ##args ); } while (0) | 33 | #define DPRINTF(fmt, args...) do { printk(KERN_DEBUG "%s:%d:%s ", __FILE__, __LINE__, __func__ ); printk(KERN_DEBUG fmt, ##args ); } while (0) |
34 | #else | 34 | #else |
35 | #define DPRINTF(fmt, args...) | 35 | #define DPRINTF(fmt, args...) |
36 | #endif | 36 | #endif |
@@ -460,7 +460,8 @@ void handle_unaligned(struct pt_regs *regs) | |||
460 | goto force_sigbus; | 460 | goto force_sigbus; |
461 | } | 461 | } |
462 | 462 | ||
463 | if (unaligned_count > 5 && jiffies - last_time > 5*HZ) { | 463 | if (unaligned_count > 5 && |
464 | time_after(jiffies, last_time + 5 * HZ)) { | ||
464 | unaligned_count = 0; | 465 | unaligned_count = 0; |
465 | last_time = jiffies; | 466 | last_time = jiffies; |
466 | } | 467 | } |
diff --git a/arch/parisc/lib/fixup.S b/arch/parisc/lib/fixup.S index d172d4245cdc..4821ad6d5269 100644 --- a/arch/parisc/lib/fixup.S +++ b/arch/parisc/lib/fixup.S | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/assembly.h> | 23 | #include <asm/assembly.h> |
24 | #include <asm/errno.h> | 24 | #include <asm/errno.h> |
25 | #include <linux/linkage.h> | 25 | #include <linux/linkage.h> |
26 | #include <linux/init.h> | ||
26 | 27 | ||
27 | #ifdef CONFIG_SMP | 28 | #ifdef CONFIG_SMP |
28 | .macro get_fault_ip t1 t2 | 29 | .macro get_fault_ip t1 t2 |
@@ -55,7 +56,7 @@ | |||
55 | 56 | ||
56 | .level LEVEL | 57 | .level LEVEL |
57 | 58 | ||
58 | .text | 59 | __HEAD |
59 | .section .fixup, "ax" | 60 | .section .fixup, "ax" |
60 | 61 | ||
61 | /* get_user() fixups, store -EFAULT in r8, and 0 in r9 */ | 62 | /* get_user() fixups, store -EFAULT in r8, and 0 in r9 */ |
diff --git a/arch/parisc/lib/lusercopy.S b/arch/parisc/lib/lusercopy.S index 1bd23ccec17b..b0d885350846 100644 --- a/arch/parisc/lib/lusercopy.S +++ b/arch/parisc/lib/lusercopy.S | |||
@@ -33,11 +33,12 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | 35 | ||
36 | .text | ||
37 | |||
38 | #include <asm/assembly.h> | 36 | #include <asm/assembly.h> |
39 | #include <asm/errno.h> | 37 | #include <asm/errno.h> |
40 | #include <linux/linkage.h> | 38 | #include <linux/linkage.h> |
39 | #include <linux/init.h> | ||
40 | |||
41 | __HEAD | ||
41 | 42 | ||
42 | /* | 43 | /* |
43 | * get_sr gets the appropriate space value into | 44 | * get_sr gets the appropriate space value into |
diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c index d22042d33100..2d68431fc22e 100644 --- a/arch/parisc/lib/memcpy.c +++ b/arch/parisc/lib/memcpy.c | |||
@@ -91,7 +91,7 @@ DECLARE_PER_CPU(struct exception_data, exception_data); | |||
91 | #define THRESHOLD 16 | 91 | #define THRESHOLD 16 |
92 | 92 | ||
93 | #ifdef DEBUG_MEMCPY | 93 | #ifdef DEBUG_MEMCPY |
94 | #define DPRINTF(fmt, args...) do { printk(KERN_DEBUG "%s:%d:%s ", __FILE__, __LINE__, __FUNCTION__ ); printk(KERN_DEBUG fmt, ##args ); } while (0) | 94 | #define DPRINTF(fmt, args...) do { printk(KERN_DEBUG "%s:%d:%s ", __FILE__, __LINE__, __func__ ); printk(KERN_DEBUG fmt, ##args ); } while (0) |
95 | #else | 95 | #else |
96 | #define DPRINTF(fmt, args...) | 96 | #define DPRINTF(fmt, args...) |
97 | #endif | 97 | #endif |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index b0ed709d5743..78fe252b92c3 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -555,8 +555,6 @@ void show_mem(void) | |||
555 | 555 | ||
556 | printk(KERN_INFO "Mem-info:\n"); | 556 | printk(KERN_INFO "Mem-info:\n"); |
557 | show_free_areas(); | 557 | show_free_areas(); |
558 | printk(KERN_INFO "Free swap: %6ldkB\n", | ||
559 | nr_swap_pages<<(PAGE_SHIFT-10)); | ||
560 | #ifndef CONFIG_DISCONTIGMEM | 558 | #ifndef CONFIG_DISCONTIGMEM |
561 | i = max_mapnr; | 559 | i = max_mapnr; |
562 | while (i-- > 0) { | 560 | while (i-- > 0) { |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index dff0568e67ec..c93d1296cc0a 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -71,7 +71,7 @@ static ssize_t debug_input(struct file *file, const char __user *user_buf, | |||
71 | size_t user_len, loff_t * offset); | 71 | size_t user_len, loff_t * offset); |
72 | static int debug_open(struct inode *inode, struct file *file); | 72 | static int debug_open(struct inode *inode, struct file *file); |
73 | static int debug_close(struct inode *inode, struct file *file); | 73 | static int debug_close(struct inode *inode, struct file *file); |
74 | static debug_info_t* debug_info_create(char *name, int pages_per_area, | 74 | static debug_info_t *debug_info_create(const char *name, int pages_per_area, |
75 | int nr_areas, int buf_size, mode_t mode); | 75 | int nr_areas, int buf_size, mode_t mode); |
76 | static void debug_info_get(debug_info_t *); | 76 | static void debug_info_get(debug_info_t *); |
77 | static void debug_info_put(debug_info_t *); | 77 | static void debug_info_put(debug_info_t *); |
@@ -234,8 +234,8 @@ fail_malloc_areas: | |||
234 | */ | 234 | */ |
235 | 235 | ||
236 | static debug_info_t* | 236 | static debug_info_t* |
237 | debug_info_alloc(char *name, int pages_per_area, int nr_areas, int buf_size, | 237 | debug_info_alloc(const char *name, int pages_per_area, int nr_areas, |
238 | int level, int mode) | 238 | int buf_size, int level, int mode) |
239 | { | 239 | { |
240 | debug_info_t* rc; | 240 | debug_info_t* rc; |
241 | 241 | ||
@@ -326,8 +326,8 @@ debug_info_free(debug_info_t* db_info){ | |||
326 | */ | 326 | */ |
327 | 327 | ||
328 | static debug_info_t* | 328 | static debug_info_t* |
329 | debug_info_create(char *name, int pages_per_area, int nr_areas, int buf_size, | 329 | debug_info_create(const char *name, int pages_per_area, int nr_areas, |
330 | mode_t mode) | 330 | int buf_size, mode_t mode) |
331 | { | 331 | { |
332 | debug_info_t* rc; | 332 | debug_info_t* rc; |
333 | 333 | ||
@@ -684,9 +684,9 @@ debug_close(struct inode *inode, struct file *file) | |||
684 | * - Returns handle for debug area | 684 | * - Returns handle for debug area |
685 | */ | 685 | */ |
686 | 686 | ||
687 | debug_info_t *debug_register_mode(char *name, int pages_per_area, int nr_areas, | 687 | debug_info_t *debug_register_mode(const char *name, int pages_per_area, |
688 | int buf_size, mode_t mode, uid_t uid, | 688 | int nr_areas, int buf_size, mode_t mode, |
689 | gid_t gid) | 689 | uid_t uid, gid_t gid) |
690 | { | 690 | { |
691 | debug_info_t *rc = NULL; | 691 | debug_info_t *rc = NULL; |
692 | 692 | ||
@@ -722,8 +722,8 @@ EXPORT_SYMBOL(debug_register_mode); | |||
722 | * - returns handle for debug area | 722 | * - returns handle for debug area |
723 | */ | 723 | */ |
724 | 724 | ||
725 | debug_info_t *debug_register(char *name, int pages_per_area, int nr_areas, | 725 | debug_info_t *debug_register(const char *name, int pages_per_area, |
726 | int buf_size) | 726 | int nr_areas, int buf_size) |
727 | { | 727 | { |
728 | return debug_register_mode(name, pages_per_area, nr_areas, buf_size, | 728 | return debug_register_mode(name, pages_per_area, nr_areas, buf_size, |
729 | S_IRUSR | S_IWUSR, 0, 0); | 729 | S_IRUSR | S_IWUSR, 0, 0); |
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index c59a86dca584..e7c5bfb7c755 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c | |||
@@ -25,6 +25,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
25 | static const char *intrclass_names[] = { "EXT", "I/O", }; | 25 | static const char *intrclass_names[] = { "EXT", "I/O", }; |
26 | int i = *(loff_t *) v, j; | 26 | int i = *(loff_t *) v, j; |
27 | 27 | ||
28 | get_online_cpus(); | ||
28 | if (i == 0) { | 29 | if (i == 0) { |
29 | seq_puts(p, " "); | 30 | seq_puts(p, " "); |
30 | for_each_online_cpu(j) | 31 | for_each_online_cpu(j) |
@@ -43,7 +44,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
43 | seq_putc(p, '\n'); | 44 | seq_putc(p, '\n'); |
44 | 45 | ||
45 | } | 46 | } |
46 | 47 | put_online_cpus(); | |
47 | return 0; | 48 | return 0; |
48 | } | 49 | } |
49 | 50 | ||
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 0aeb290060d9..1f4228948dc4 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -139,7 +139,6 @@ static void __smp_call_function_map(void (*func) (void *info), void *info, | |||
139 | if (wait) | 139 | if (wait) |
140 | data.finished = CPU_MASK_NONE; | 140 | data.finished = CPU_MASK_NONE; |
141 | 141 | ||
142 | spin_lock(&call_lock); | ||
143 | call_data = &data; | 142 | call_data = &data; |
144 | 143 | ||
145 | for_each_cpu_mask(cpu, map) | 144 | for_each_cpu_mask(cpu, map) |
@@ -151,7 +150,6 @@ static void __smp_call_function_map(void (*func) (void *info), void *info, | |||
151 | if (wait) | 150 | if (wait) |
152 | while (!cpus_equal(map, data.finished)) | 151 | while (!cpus_equal(map, data.finished)) |
153 | cpu_relax(); | 152 | cpu_relax(); |
154 | spin_unlock(&call_lock); | ||
155 | out: | 153 | out: |
156 | if (local) { | 154 | if (local) { |
157 | local_irq_disable(); | 155 | local_irq_disable(); |
@@ -177,11 +175,11 @@ int smp_call_function(void (*func) (void *info), void *info, int nonatomic, | |||
177 | { | 175 | { |
178 | cpumask_t map; | 176 | cpumask_t map; |
179 | 177 | ||
180 | preempt_disable(); | 178 | spin_lock(&call_lock); |
181 | map = cpu_online_map; | 179 | map = cpu_online_map; |
182 | cpu_clear(smp_processor_id(), map); | 180 | cpu_clear(smp_processor_id(), map); |
183 | __smp_call_function_map(func, info, nonatomic, wait, map); | 181 | __smp_call_function_map(func, info, nonatomic, wait, map); |
184 | preempt_enable(); | 182 | spin_unlock(&call_lock); |
185 | return 0; | 183 | return 0; |
186 | } | 184 | } |
187 | EXPORT_SYMBOL(smp_call_function); | 185 | EXPORT_SYMBOL(smp_call_function); |
@@ -202,10 +200,10 @@ EXPORT_SYMBOL(smp_call_function); | |||
202 | int smp_call_function_single(int cpu, void (*func) (void *info), void *info, | 200 | int smp_call_function_single(int cpu, void (*func) (void *info), void *info, |
203 | int nonatomic, int wait) | 201 | int nonatomic, int wait) |
204 | { | 202 | { |
205 | preempt_disable(); | 203 | spin_lock(&call_lock); |
206 | __smp_call_function_map(func, info, nonatomic, wait, | 204 | __smp_call_function_map(func, info, nonatomic, wait, |
207 | cpumask_of_cpu(cpu)); | 205 | cpumask_of_cpu(cpu)); |
208 | preempt_enable(); | 206 | spin_unlock(&call_lock); |
209 | return 0; | 207 | return 0; |
210 | } | 208 | } |
211 | EXPORT_SYMBOL(smp_call_function_single); | 209 | EXPORT_SYMBOL(smp_call_function_single); |
@@ -228,10 +226,10 @@ EXPORT_SYMBOL(smp_call_function_single); | |||
228 | int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info, | 226 | int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info, |
229 | int wait) | 227 | int wait) |
230 | { | 228 | { |
231 | preempt_disable(); | 229 | spin_lock(&call_lock); |
232 | cpu_clear(smp_processor_id(), mask); | 230 | cpu_clear(smp_processor_id(), mask); |
233 | __smp_call_function_map(func, info, 0, wait, mask); | 231 | __smp_call_function_map(func, info, 0, wait, mask); |
234 | preempt_enable(); | 232 | spin_unlock(&call_lock); |
235 | return 0; | 233 | return 0; |
236 | } | 234 | } |
237 | EXPORT_SYMBOL(smp_call_function_mask); | 235 | EXPORT_SYMBOL(smp_call_function_mask); |
@@ -592,7 +590,9 @@ int __cpuinit start_secondary(void *cpuvoid) | |||
592 | pfault_init(); | 590 | pfault_init(); |
593 | 591 | ||
594 | /* Mark this cpu as online */ | 592 | /* Mark this cpu as online */ |
593 | spin_lock(&call_lock); | ||
595 | cpu_set(smp_processor_id(), cpu_online_map); | 594 | cpu_set(smp_processor_id(), cpu_online_map); |
595 | spin_unlock(&call_lock); | ||
596 | /* Switch on interrupts */ | 596 | /* Switch on interrupts */ |
597 | local_irq_enable(); | 597 | local_irq_enable(); |
598 | /* Print info about this processor */ | 598 | /* Print info about this processor */ |
diff --git a/arch/s390/mm/vmem.c b/arch/s390/mm/vmem.c index beccacf907f3..ea2804808f39 100644 --- a/arch/s390/mm/vmem.c +++ b/arch/s390/mm/vmem.c | |||
@@ -27,19 +27,12 @@ struct memory_segment { | |||
27 | 27 | ||
28 | static LIST_HEAD(mem_segs); | 28 | static LIST_HEAD(mem_segs); |
29 | 29 | ||
30 | static void __ref *vmem_alloc_pages(unsigned int order) | 30 | static pud_t *vmem_pud_alloc(void) |
31 | { | ||
32 | if (slab_is_available()) | ||
33 | return (void *)__get_free_pages(GFP_KERNEL, order); | ||
34 | return alloc_bootmem_pages((1 << order) * PAGE_SIZE); | ||
35 | } | ||
36 | |||
37 | static inline pud_t *vmem_pud_alloc(void) | ||
38 | { | 31 | { |
39 | pud_t *pud = NULL; | 32 | pud_t *pud = NULL; |
40 | 33 | ||
41 | #ifdef CONFIG_64BIT | 34 | #ifdef CONFIG_64BIT |
42 | pud = vmem_alloc_pages(2); | 35 | pud = vmemmap_alloc_block(PAGE_SIZE * 4, 0); |
43 | if (!pud) | 36 | if (!pud) |
44 | return NULL; | 37 | return NULL; |
45 | clear_table((unsigned long *) pud, _REGION3_ENTRY_EMPTY, PAGE_SIZE * 4); | 38 | clear_table((unsigned long *) pud, _REGION3_ENTRY_EMPTY, PAGE_SIZE * 4); |
@@ -47,12 +40,12 @@ static inline pud_t *vmem_pud_alloc(void) | |||
47 | return pud; | 40 | return pud; |
48 | } | 41 | } |
49 | 42 | ||
50 | static inline pmd_t *vmem_pmd_alloc(void) | 43 | static pmd_t *vmem_pmd_alloc(void) |
51 | { | 44 | { |
52 | pmd_t *pmd = NULL; | 45 | pmd_t *pmd = NULL; |
53 | 46 | ||
54 | #ifdef CONFIG_64BIT | 47 | #ifdef CONFIG_64BIT |
55 | pmd = vmem_alloc_pages(2); | 48 | pmd = vmemmap_alloc_block(PAGE_SIZE * 4, 0); |
56 | if (!pmd) | 49 | if (!pmd) |
57 | return NULL; | 50 | return NULL; |
58 | clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE * 4); | 51 | clear_table((unsigned long *) pmd, _SEGMENT_ENTRY_EMPTY, PAGE_SIZE * 4); |
@@ -60,7 +53,7 @@ static inline pmd_t *vmem_pmd_alloc(void) | |||
60 | return pmd; | 53 | return pmd; |
61 | } | 54 | } |
62 | 55 | ||
63 | static pte_t __init_refok *vmem_pte_alloc(void) | 56 | static pte_t __ref *vmem_pte_alloc(void) |
64 | { | 57 | { |
65 | pte_t *pte; | 58 | pte_t *pte; |
66 | 59 | ||
@@ -214,7 +207,7 @@ int __meminit vmemmap_populate(struct page *start, unsigned long nr, int node) | |||
214 | if (pte_none(*pt_dir)) { | 207 | if (pte_none(*pt_dir)) { |
215 | unsigned long new_page; | 208 | unsigned long new_page; |
216 | 209 | ||
217 | new_page =__pa(vmem_alloc_pages(0)); | 210 | new_page =__pa(vmemmap_alloc_block(PAGE_SIZE, 0)); |
218 | if (!new_page) | 211 | if (!new_page) |
219 | goto out; | 212 | goto out; |
220 | pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL); | 213 | pte = pfn_pte(new_page >> PAGE_SHIFT, PAGE_KERNEL); |
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 7b76fd3b93a4..45cc3d9eacb8 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
@@ -418,7 +418,7 @@ void __suspend_report_result(const char *function, void *fn, int ret) | |||
418 | { | 418 | { |
419 | if (ret) { | 419 | if (ret) { |
420 | printk(KERN_ERR "%s(): ", function); | 420 | printk(KERN_ERR "%s(): ", function); |
421 | print_fn_descriptor_symbol("%s() returns ", (unsigned long)fn); | 421 | print_fn_descriptor_symbol("%s returns ", fn); |
422 | printk("%d\n", ret); | 422 | printk("%d\n", ret); |
423 | } | 423 | } |
424 | } | 424 | } |
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c index 19105ec203f7..8096389b0dc2 100644 --- a/drivers/char/n_tty.c +++ b/drivers/char/n_tty.c | |||
@@ -282,16 +282,20 @@ static int opost(unsigned char c, struct tty_struct *tty) | |||
282 | if (O_ONLRET(tty)) | 282 | if (O_ONLRET(tty)) |
283 | tty->column = 0; | 283 | tty->column = 0; |
284 | if (O_ONLCR(tty)) { | 284 | if (O_ONLCR(tty)) { |
285 | if (space < 2) | 285 | if (space < 2) { |
286 | unlock_kernel(); | ||
286 | return -1; | 287 | return -1; |
288 | } | ||
287 | tty_put_char(tty, '\r'); | 289 | tty_put_char(tty, '\r'); |
288 | tty->column = 0; | 290 | tty->column = 0; |
289 | } | 291 | } |
290 | tty->canon_column = tty->column; | 292 | tty->canon_column = tty->column; |
291 | break; | 293 | break; |
292 | case '\r': | 294 | case '\r': |
293 | if (O_ONOCR(tty) && tty->column == 0) | 295 | if (O_ONOCR(tty) && tty->column == 0) { |
296 | unlock_kernel(); | ||
294 | return 0; | 297 | return 0; |
298 | } | ||
295 | if (O_OCRNL(tty)) { | 299 | if (O_OCRNL(tty)) { |
296 | c = '\n'; | 300 | c = '\n'; |
297 | if (O_ONLRET(tty)) | 301 | if (O_ONLRET(tty)) |
@@ -303,10 +307,13 @@ static int opost(unsigned char c, struct tty_struct *tty) | |||
303 | case '\t': | 307 | case '\t': |
304 | spaces = 8 - (tty->column & 7); | 308 | spaces = 8 - (tty->column & 7); |
305 | if (O_TABDLY(tty) == XTABS) { | 309 | if (O_TABDLY(tty) == XTABS) { |
306 | if (space < spaces) | 310 | if (space < spaces) { |
311 | unlock_kernel(); | ||
307 | return -1; | 312 | return -1; |
313 | } | ||
308 | tty->column += spaces; | 314 | tty->column += spaces; |
309 | tty->ops->write(tty, " ", spaces); | 315 | tty->ops->write(tty, " ", spaces); |
316 | unlock_kernel(); | ||
310 | return 0; | 317 | return 0; |
311 | } | 318 | } |
312 | tty->column += spaces; | 319 | tty->column += spaces; |
diff --git a/drivers/parisc/asp.c b/drivers/parisc/asp.c index 558420bc9f88..821369135369 100644 --- a/drivers/parisc/asp.c +++ b/drivers/parisc/asp.c | |||
@@ -88,7 +88,7 @@ asp_init_chip(struct parisc_device *dev) | |||
88 | ret = -EBUSY; | 88 | ret = -EBUSY; |
89 | dev->irq = gsc_claim_irq(&gsc_irq, ASP_GSC_IRQ); | 89 | dev->irq = gsc_claim_irq(&gsc_irq, ASP_GSC_IRQ); |
90 | if (dev->irq < 0) { | 90 | if (dev->irq < 0) { |
91 | printk(KERN_ERR "%s(): cannot get GSC irq\n", __FUNCTION__); | 91 | printk(KERN_ERR "%s(): cannot get GSC irq\n", __func__); |
92 | goto out; | 92 | goto out; |
93 | } | 93 | } |
94 | 94 | ||
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 07d2a8d4498f..b30e38f3a50d 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c | |||
@@ -359,7 +359,7 @@ ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size) | |||
359 | BUG_ON((pages_needed * IOVP_SIZE) > DMA_CHUNK_SIZE); | 359 | BUG_ON((pages_needed * IOVP_SIZE) > DMA_CHUNK_SIZE); |
360 | 360 | ||
361 | DBG_RES("%s() size: %d pages_needed %d\n", | 361 | DBG_RES("%s() size: %d pages_needed %d\n", |
362 | __FUNCTION__, size, pages_needed); | 362 | __func__, size, pages_needed); |
363 | 363 | ||
364 | /* | 364 | /* |
365 | ** "seek and ye shall find"...praying never hurts either... | 365 | ** "seek and ye shall find"...praying never hurts either... |
@@ -395,16 +395,16 @@ ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size) | |||
395 | #endif | 395 | #endif |
396 | } else { | 396 | } else { |
397 | panic("%s: %s() Too many pages to map. pages_needed: %u\n", | 397 | panic("%s: %s() Too many pages to map. pages_needed: %u\n", |
398 | __FILE__, __FUNCTION__, pages_needed); | 398 | __FILE__, __func__, pages_needed); |
399 | } | 399 | } |
400 | 400 | ||
401 | panic("%s: %s() I/O MMU is out of mapping resources.\n", __FILE__, | 401 | panic("%s: %s() I/O MMU is out of mapping resources.\n", __FILE__, |
402 | __FUNCTION__); | 402 | __func__); |
403 | 403 | ||
404 | resource_found: | 404 | resource_found: |
405 | 405 | ||
406 | DBG_RES("%s() res_idx %d res_hint: %d\n", | 406 | DBG_RES("%s() res_idx %d res_hint: %d\n", |
407 | __FUNCTION__, res_idx, ioc->res_hint); | 407 | __func__, res_idx, ioc->res_hint); |
408 | 408 | ||
409 | #ifdef CCIO_SEARCH_TIME | 409 | #ifdef CCIO_SEARCH_TIME |
410 | { | 410 | { |
@@ -450,7 +450,7 @@ ccio_free_range(struct ioc *ioc, dma_addr_t iova, unsigned long pages_mapped) | |||
450 | BUG_ON(pages_mapped > BITS_PER_LONG); | 450 | BUG_ON(pages_mapped > BITS_PER_LONG); |
451 | 451 | ||
452 | DBG_RES("%s(): res_idx: %d pages_mapped %d\n", | 452 | DBG_RES("%s(): res_idx: %d pages_mapped %d\n", |
453 | __FUNCTION__, res_idx, pages_mapped); | 453 | __func__, res_idx, pages_mapped); |
454 | 454 | ||
455 | #ifdef CCIO_MAP_STATS | 455 | #ifdef CCIO_MAP_STATS |
456 | ioc->used_pages -= pages_mapped; | 456 | ioc->used_pages -= pages_mapped; |
@@ -474,7 +474,7 @@ ccio_free_range(struct ioc *ioc, dma_addr_t iova, unsigned long pages_mapped) | |||
474 | #endif | 474 | #endif |
475 | } else { | 475 | } else { |
476 | panic("%s:%s() Too many pages to unmap.\n", __FILE__, | 476 | panic("%s:%s() Too many pages to unmap.\n", __FILE__, |
477 | __FUNCTION__); | 477 | __func__); |
478 | } | 478 | } |
479 | } | 479 | } |
480 | 480 | ||
@@ -775,7 +775,7 @@ ccio_map_single(struct device *dev, void *addr, size_t size, | |||
775 | pdir_start = &(ioc->pdir_base[idx]); | 775 | pdir_start = &(ioc->pdir_base[idx]); |
776 | 776 | ||
777 | DBG_RUN("%s() 0x%p -> 0x%lx size: %0x%x\n", | 777 | DBG_RUN("%s() 0x%p -> 0x%lx size: %0x%x\n", |
778 | __FUNCTION__, addr, (long)iovp | offset, size); | 778 | __func__, addr, (long)iovp | offset, size); |
779 | 779 | ||
780 | /* If not cacheline aligned, force SAFE_DMA on the whole mess */ | 780 | /* If not cacheline aligned, force SAFE_DMA on the whole mess */ |
781 | if((size % L1_CACHE_BYTES) || ((unsigned long)addr % L1_CACHE_BYTES)) | 781 | if((size % L1_CACHE_BYTES) || ((unsigned long)addr % L1_CACHE_BYTES)) |
@@ -820,7 +820,7 @@ ccio_unmap_single(struct device *dev, dma_addr_t iova, size_t size, | |||
820 | ioc = GET_IOC(dev); | 820 | ioc = GET_IOC(dev); |
821 | 821 | ||
822 | DBG_RUN("%s() iovp 0x%lx/%x\n", | 822 | DBG_RUN("%s() iovp 0x%lx/%x\n", |
823 | __FUNCTION__, (long)iova, size); | 823 | __func__, (long)iova, size); |
824 | 824 | ||
825 | iova ^= offset; /* clear offset bits */ | 825 | iova ^= offset; /* clear offset bits */ |
826 | size += offset; | 826 | size += offset; |
@@ -922,7 +922,7 @@ ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents, | |||
922 | BUG_ON(!dev); | 922 | BUG_ON(!dev); |
923 | ioc = GET_IOC(dev); | 923 | ioc = GET_IOC(dev); |
924 | 924 | ||
925 | DBG_RUN_SG("%s() START %d entries\n", __FUNCTION__, nents); | 925 | DBG_RUN_SG("%s() START %d entries\n", __func__, nents); |
926 | 926 | ||
927 | /* Fast path single entry scatterlists. */ | 927 | /* Fast path single entry scatterlists. */ |
928 | if (nents == 1) { | 928 | if (nents == 1) { |
@@ -966,7 +966,7 @@ ccio_map_sg(struct device *dev, struct scatterlist *sglist, int nents, | |||
966 | 966 | ||
967 | BUG_ON(coalesced != filled); | 967 | BUG_ON(coalesced != filled); |
968 | 968 | ||
969 | DBG_RUN_SG("%s() DONE %d mappings\n", __FUNCTION__, filled); | 969 | DBG_RUN_SG("%s() DONE %d mappings\n", __func__, filled); |
970 | 970 | ||
971 | for (i = 0; i < filled; i++) | 971 | for (i = 0; i < filled; i++) |
972 | current_len += sg_dma_len(sglist + i); | 972 | current_len += sg_dma_len(sglist + i); |
@@ -995,7 +995,7 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, | |||
995 | ioc = GET_IOC(dev); | 995 | ioc = GET_IOC(dev); |
996 | 996 | ||
997 | DBG_RUN_SG("%s() START %d entries, %08lx,%x\n", | 997 | DBG_RUN_SG("%s() START %d entries, %08lx,%x\n", |
998 | __FUNCTION__, nents, sg_virt_addr(sglist), sglist->length); | 998 | __func__, nents, sg_virt_addr(sglist), sglist->length); |
999 | 999 | ||
1000 | #ifdef CCIO_MAP_STATS | 1000 | #ifdef CCIO_MAP_STATS |
1001 | ioc->usg_calls++; | 1001 | ioc->usg_calls++; |
@@ -1011,7 +1011,7 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, | |||
1011 | ++sglist; | 1011 | ++sglist; |
1012 | } | 1012 | } |
1013 | 1013 | ||
1014 | DBG_RUN_SG("%s() DONE (nents %d)\n", __FUNCTION__, nents); | 1014 | DBG_RUN_SG("%s() DONE (nents %d)\n", __func__, nents); |
1015 | } | 1015 | } |
1016 | 1016 | ||
1017 | static struct hppa_dma_ops ccio_ops = { | 1017 | static struct hppa_dma_ops ccio_ops = { |
@@ -1225,7 +1225,7 @@ static int | |||
1225 | ccio_get_iotlb_size(struct parisc_device *dev) | 1225 | ccio_get_iotlb_size(struct parisc_device *dev) |
1226 | { | 1226 | { |
1227 | if (dev->spa_shift == 0) { | 1227 | if (dev->spa_shift == 0) { |
1228 | panic("%s() : Can't determine I/O TLB size.\n", __FUNCTION__); | 1228 | panic("%s() : Can't determine I/O TLB size.\n", __func__); |
1229 | } | 1229 | } |
1230 | return (1 << dev->spa_shift); | 1230 | return (1 << dev->spa_shift); |
1231 | } | 1231 | } |
@@ -1315,7 +1315,7 @@ ccio_ioc_init(struct ioc *ioc) | |||
1315 | BUG_ON((1 << get_order(ioc->pdir_size)) != (ioc->pdir_size >> PAGE_SHIFT)); | 1315 | BUG_ON((1 << get_order(ioc->pdir_size)) != (ioc->pdir_size >> PAGE_SHIFT)); |
1316 | 1316 | ||
1317 | DBG_INIT("%s() hpa 0x%p mem %luMB IOV %dMB (%d bits)\n", | 1317 | DBG_INIT("%s() hpa 0x%p mem %luMB IOV %dMB (%d bits)\n", |
1318 | __FUNCTION__, ioc->ioc_regs, | 1318 | __func__, ioc->ioc_regs, |
1319 | (unsigned long) num_physpages >> (20 - PAGE_SHIFT), | 1319 | (unsigned long) num_physpages >> (20 - PAGE_SHIFT), |
1320 | iova_space_size>>20, | 1320 | iova_space_size>>20, |
1321 | iov_order + PAGE_SHIFT); | 1321 | iov_order + PAGE_SHIFT); |
@@ -1323,7 +1323,7 @@ ccio_ioc_init(struct ioc *ioc) | |||
1323 | ioc->pdir_base = (u64 *)__get_free_pages(GFP_KERNEL, | 1323 | ioc->pdir_base = (u64 *)__get_free_pages(GFP_KERNEL, |
1324 | get_order(ioc->pdir_size)); | 1324 | get_order(ioc->pdir_size)); |
1325 | if(NULL == ioc->pdir_base) { | 1325 | if(NULL == ioc->pdir_base) { |
1326 | panic("%s() could not allocate I/O Page Table\n", __FUNCTION__); | 1326 | panic("%s() could not allocate I/O Page Table\n", __func__); |
1327 | } | 1327 | } |
1328 | memset(ioc->pdir_base, 0, ioc->pdir_size); | 1328 | memset(ioc->pdir_base, 0, ioc->pdir_size); |
1329 | 1329 | ||
@@ -1332,12 +1332,12 @@ ccio_ioc_init(struct ioc *ioc) | |||
1332 | 1332 | ||
1333 | /* resource map size dictated by pdir_size */ | 1333 | /* resource map size dictated by pdir_size */ |
1334 | ioc->res_size = (ioc->pdir_size / sizeof(u64)) >> 3; | 1334 | ioc->res_size = (ioc->pdir_size / sizeof(u64)) >> 3; |
1335 | DBG_INIT("%s() res_size 0x%x\n", __FUNCTION__, ioc->res_size); | 1335 | DBG_INIT("%s() res_size 0x%x\n", __func__, ioc->res_size); |
1336 | 1336 | ||
1337 | ioc->res_map = (u8 *)__get_free_pages(GFP_KERNEL, | 1337 | ioc->res_map = (u8 *)__get_free_pages(GFP_KERNEL, |
1338 | get_order(ioc->res_size)); | 1338 | get_order(ioc->res_size)); |
1339 | if(NULL == ioc->res_map) { | 1339 | if(NULL == ioc->res_map) { |
1340 | panic("%s() could not allocate resource map\n", __FUNCTION__); | 1340 | panic("%s() could not allocate resource map\n", __func__); |
1341 | } | 1341 | } |
1342 | memset(ioc->res_map, 0, ioc->res_size); | 1342 | memset(ioc->res_map, 0, ioc->res_size); |
1343 | 1343 | ||
@@ -1409,7 +1409,7 @@ ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr) | |||
1409 | result = insert_resource(&iomem_resource, res); | 1409 | result = insert_resource(&iomem_resource, res); |
1410 | if (result < 0) { | 1410 | if (result < 0) { |
1411 | printk(KERN_ERR "%s() failed to claim CCIO bus address space (%08lx,%08lx)\n", | 1411 | printk(KERN_ERR "%s() failed to claim CCIO bus address space (%08lx,%08lx)\n", |
1412 | __FUNCTION__, res->start, res->end); | 1412 | __func__, res->start, res->end); |
1413 | } | 1413 | } |
1414 | } | 1414 | } |
1415 | 1415 | ||
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index d9c6322a721b..fd56128525d1 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c | |||
@@ -180,7 +180,7 @@ static int dino_cfg_read(struct pci_bus *bus, unsigned int devfn, int where, | |||
180 | void __iomem *base_addr = d->hba.base_addr; | 180 | void __iomem *base_addr = d->hba.base_addr; |
181 | unsigned long flags; | 181 | unsigned long flags; |
182 | 182 | ||
183 | DBG("%s: %p, %d, %d, %d\n", __FUNCTION__, base_addr, devfn, where, | 183 | DBG("%s: %p, %d, %d, %d\n", __func__, base_addr, devfn, where, |
184 | size); | 184 | size); |
185 | spin_lock_irqsave(&d->dinosaur_pen, flags); | 185 | spin_lock_irqsave(&d->dinosaur_pen, flags); |
186 | 186 | ||
@@ -215,7 +215,7 @@ static int dino_cfg_write(struct pci_bus *bus, unsigned int devfn, int where, | |||
215 | void __iomem *base_addr = d->hba.base_addr; | 215 | void __iomem *base_addr = d->hba.base_addr; |
216 | unsigned long flags; | 216 | unsigned long flags; |
217 | 217 | ||
218 | DBG("%s: %p, %d, %d, %d\n", __FUNCTION__, base_addr, devfn, where, | 218 | DBG("%s: %p, %d, %d, %d\n", __func__, base_addr, devfn, where, |
219 | size); | 219 | size); |
220 | spin_lock_irqsave(&d->dinosaur_pen, flags); | 220 | spin_lock_irqsave(&d->dinosaur_pen, flags); |
221 | 221 | ||
@@ -301,7 +301,7 @@ static void dino_disable_irq(unsigned int irq) | |||
301 | struct dino_device *dino_dev = irq_desc[irq].chip_data; | 301 | struct dino_device *dino_dev = irq_desc[irq].chip_data; |
302 | int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); | 302 | int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); |
303 | 303 | ||
304 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq); | 304 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, irq); |
305 | 305 | ||
306 | /* Clear the matching bit in the IMR register */ | 306 | /* Clear the matching bit in the IMR register */ |
307 | dino_dev->imr &= ~(DINO_MASK_IRQ(local_irq)); | 307 | dino_dev->imr &= ~(DINO_MASK_IRQ(local_irq)); |
@@ -314,7 +314,7 @@ static void dino_enable_irq(unsigned int irq) | |||
314 | int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); | 314 | int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); |
315 | u32 tmp; | 315 | u32 tmp; |
316 | 316 | ||
317 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __FUNCTION__, dino_dev, irq); | 317 | DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, irq); |
318 | 318 | ||
319 | /* | 319 | /* |
320 | ** clear pending IRQ bits | 320 | ** clear pending IRQ bits |
@@ -340,7 +340,7 @@ static void dino_enable_irq(unsigned int irq) | |||
340 | tmp = __raw_readl(dino_dev->hba.base_addr+DINO_ILR); | 340 | tmp = __raw_readl(dino_dev->hba.base_addr+DINO_ILR); |
341 | if (tmp & DINO_MASK_IRQ(local_irq)) { | 341 | if (tmp & DINO_MASK_IRQ(local_irq)) { |
342 | DBG(KERN_WARNING "%s(): IRQ asserted! (ILR 0x%x)\n", | 342 | DBG(KERN_WARNING "%s(): IRQ asserted! (ILR 0x%x)\n", |
343 | __FUNCTION__, tmp); | 343 | __func__, tmp); |
344 | gsc_writel(dino_dev->txn_data, dino_dev->txn_addr); | 344 | gsc_writel(dino_dev->txn_data, dino_dev->txn_addr); |
345 | } | 345 | } |
346 | } | 346 | } |
@@ -388,7 +388,7 @@ ilr_again: | |||
388 | int local_irq = __ffs(mask); | 388 | int local_irq = __ffs(mask); |
389 | int irq = dino_dev->global_irq[local_irq]; | 389 | int irq = dino_dev->global_irq[local_irq]; |
390 | DBG(KERN_DEBUG "%s(%d, %p) mask 0x%x\n", | 390 | DBG(KERN_DEBUG "%s(%d, %p) mask 0x%x\n", |
391 | __FUNCTION__, irq, intr_dev, mask); | 391 | __func__, irq, intr_dev, mask); |
392 | __do_IRQ(irq); | 392 | __do_IRQ(irq); |
393 | mask &= ~(1 << local_irq); | 393 | mask &= ~(1 << local_irq); |
394 | } while (mask); | 394 | } while (mask); |
@@ -566,7 +566,7 @@ dino_fixup_bus(struct pci_bus *bus) | |||
566 | int port_base = HBA_PORT_BASE(dino_dev->hba.hba_num); | 566 | int port_base = HBA_PORT_BASE(dino_dev->hba.hba_num); |
567 | 567 | ||
568 | DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n", | 568 | DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n", |
569 | __FUNCTION__, bus, bus->secondary, | 569 | __func__, bus, bus->secondary, |
570 | bus->bridge->platform_data); | 570 | bus->bridge->platform_data); |
571 | 571 | ||
572 | /* Firmware doesn't set up card-mode dino, so we have to */ | 572 | /* Firmware doesn't set up card-mode dino, so we have to */ |
diff --git a/drivers/parisc/gsc.c b/drivers/parisc/gsc.c index 1b3e3fd12d95..f7d088b897ee 100644 --- a/drivers/parisc/gsc.c +++ b/drivers/parisc/gsc.c | |||
@@ -112,7 +112,7 @@ static void gsc_asic_disable_irq(unsigned int irq) | |||
112 | int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); | 112 | int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); |
113 | u32 imr; | 113 | u32 imr; |
114 | 114 | ||
115 | DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __FUNCTION__, irq, | 115 | DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, irq, |
116 | irq_dev->name, imr); | 116 | irq_dev->name, imr); |
117 | 117 | ||
118 | /* Disable the IRQ line by clearing the bit in the IMR */ | 118 | /* Disable the IRQ line by clearing the bit in the IMR */ |
@@ -127,7 +127,7 @@ static void gsc_asic_enable_irq(unsigned int irq) | |||
127 | int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); | 127 | int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); |
128 | u32 imr; | 128 | u32 imr; |
129 | 129 | ||
130 | DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __FUNCTION__, irq, | 130 | DEBPRINTK(KERN_DEBUG "%s(%d) %s: IMR 0x%x\n", __func__, irq, |
131 | irq_dev->name, imr); | 131 | irq_dev->name, imr); |
132 | 132 | ||
133 | /* Enable the IRQ line by setting the bit in the IMR */ | 133 | /* Enable the IRQ line by setting the bit in the IMR */ |
diff --git a/drivers/parisc/lasi.c b/drivers/parisc/lasi.c index cb3d28176129..bee510098ce8 100644 --- a/drivers/parisc/lasi.c +++ b/drivers/parisc/lasi.c | |||
@@ -193,7 +193,7 @@ lasi_init_chip(struct parisc_device *dev) | |||
193 | dev->irq = gsc_alloc_irq(&gsc_irq); | 193 | dev->irq = gsc_alloc_irq(&gsc_irq); |
194 | if (dev->irq < 0) { | 194 | if (dev->irq < 0) { |
195 | printk(KERN_ERR "%s(): cannot get GSC irq\n", | 195 | printk(KERN_ERR "%s(): cannot get GSC irq\n", |
196 | __FUNCTION__); | 196 | __func__); |
197 | kfree(lasi); | 197 | kfree(lasi); |
198 | return -EBUSY; | 198 | return -EBUSY; |
199 | } | 199 | } |
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c index 66ce61048361..a28c8946deaa 100644 --- a/drivers/parisc/lba_pci.c +++ b/drivers/parisc/lba_pci.c | |||
@@ -377,12 +377,12 @@ static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int | |||
377 | /* original - Generate config cycle on broken elroy | 377 | /* original - Generate config cycle on broken elroy |
378 | with risk we will miss PCI bus errors. */ | 378 | with risk we will miss PCI bus errors. */ |
379 | *data = lba_rd_cfg(d, tok, pos, size); | 379 | *data = lba_rd_cfg(d, tok, pos, size); |
380 | DBG_CFG("%s(%x+%2x) -> 0x%x (a)\n", __FUNCTION__, tok, pos, *data); | 380 | DBG_CFG("%s(%x+%2x) -> 0x%x (a)\n", __func__, tok, pos, *data); |
381 | return 0; | 381 | return 0; |
382 | } | 382 | } |
383 | 383 | ||
384 | if (LBA_SKIP_PROBE(d) && !lba_device_present(bus->secondary, devfn, d)) { | 384 | if (LBA_SKIP_PROBE(d) && !lba_device_present(bus->secondary, devfn, d)) { |
385 | DBG_CFG("%s(%x+%2x) -> -1 (b)\n", __FUNCTION__, tok, pos); | 385 | DBG_CFG("%s(%x+%2x) -> -1 (b)\n", __func__, tok, pos); |
386 | /* either don't want to look or know device isn't present. */ | 386 | /* either don't want to look or know device isn't present. */ |
387 | *data = ~0U; | 387 | *data = ~0U; |
388 | return(0); | 388 | return(0); |
@@ -398,7 +398,7 @@ static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int | |||
398 | case 2: *data = READ_REG16(data_reg + (pos & 2)); break; | 398 | case 2: *data = READ_REG16(data_reg + (pos & 2)); break; |
399 | case 4: *data = READ_REG32(data_reg); break; | 399 | case 4: *data = READ_REG32(data_reg); break; |
400 | } | 400 | } |
401 | DBG_CFG("%s(%x+%2x) -> 0x%x (c)\n", __FUNCTION__, tok, pos, *data); | 401 | DBG_CFG("%s(%x+%2x) -> 0x%x (c)\n", __func__, tok, pos, *data); |
402 | return 0; | 402 | return 0; |
403 | } | 403 | } |
404 | 404 | ||
@@ -441,16 +441,16 @@ static int elroy_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int | |||
441 | if (!LBA_SKIP_PROBE(d)) { | 441 | if (!LBA_SKIP_PROBE(d)) { |
442 | /* Original Workaround */ | 442 | /* Original Workaround */ |
443 | lba_wr_cfg(d, tok, pos, (u32) data, size); | 443 | lba_wr_cfg(d, tok, pos, (u32) data, size); |
444 | DBG_CFG("%s(%x+%2x) = 0x%x (a)\n", __FUNCTION__, tok, pos,data); | 444 | DBG_CFG("%s(%x+%2x) = 0x%x (a)\n", __func__, tok, pos,data); |
445 | return 0; | 445 | return 0; |
446 | } | 446 | } |
447 | 447 | ||
448 | if (LBA_SKIP_PROBE(d) && (!lba_device_present(bus->secondary, devfn, d))) { | 448 | if (LBA_SKIP_PROBE(d) && (!lba_device_present(bus->secondary, devfn, d))) { |
449 | DBG_CFG("%s(%x+%2x) = 0x%x (b)\n", __FUNCTION__, tok, pos,data); | 449 | DBG_CFG("%s(%x+%2x) = 0x%x (b)\n", __func__, tok, pos,data); |
450 | return 1; /* New Workaround */ | 450 | return 1; /* New Workaround */ |
451 | } | 451 | } |
452 | 452 | ||
453 | DBG_CFG("%s(%x+%2x) = 0x%x (c)\n", __FUNCTION__, tok, pos, data); | 453 | DBG_CFG("%s(%x+%2x) = 0x%x (c)\n", __func__, tok, pos, data); |
454 | 454 | ||
455 | /* Basic Algorithm */ | 455 | /* Basic Algorithm */ |
456 | LBA_CFG_ADDR_SETUP(d, tok | pos); | 456 | LBA_CFG_ADDR_SETUP(d, tok | pos); |
@@ -521,7 +521,7 @@ static int mercury_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, i | |||
521 | if ((pos > 255) || (devfn > 255)) | 521 | if ((pos > 255) || (devfn > 255)) |
522 | return -EINVAL; | 522 | return -EINVAL; |
523 | 523 | ||
524 | DBG_CFG("%s(%x+%2x) <- 0x%x (c)\n", __FUNCTION__, tok, pos, data); | 524 | DBG_CFG("%s(%x+%2x) <- 0x%x (c)\n", __func__, tok, pos, data); |
525 | 525 | ||
526 | LBA_CFG_TR4_ADDR_SETUP(d, tok | pos); | 526 | LBA_CFG_TR4_ADDR_SETUP(d, tok | pos); |
527 | switch(size) { | 527 | switch(size) { |
@@ -890,7 +890,7 @@ LBA_PORT_IN(32, 0) | |||
890 | #define LBA_PORT_OUT(size, mask) \ | 890 | #define LBA_PORT_OUT(size, mask) \ |
891 | static void lba_astro_out##size (struct pci_hba_data *d, u16 addr, u##size val) \ | 891 | static void lba_astro_out##size (struct pci_hba_data *d, u16 addr, u##size val) \ |
892 | { \ | 892 | { \ |
893 | DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, d, addr, val); \ | 893 | DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __func__, d, addr, val); \ |
894 | WRITE_REG##size(val, astro_iop_base + addr); \ | 894 | WRITE_REG##size(val, astro_iop_base + addr); \ |
895 | if (LBA_DEV(d)->hw_rev < 3) \ | 895 | if (LBA_DEV(d)->hw_rev < 3) \ |
896 | lba_t32 = READ_U32(d->base_addr + LBA_FUNC_ID); \ | 896 | lba_t32 = READ_U32(d->base_addr + LBA_FUNC_ID); \ |
@@ -932,7 +932,7 @@ static struct pci_port_ops lba_astro_port_ops = { | |||
932 | static u##size lba_pat_in##size (struct pci_hba_data *l, u16 addr) \ | 932 | static u##size lba_pat_in##size (struct pci_hba_data *l, u16 addr) \ |
933 | { \ | 933 | { \ |
934 | u##size t; \ | 934 | u##size t; \ |
935 | DBG_PORT("%s(0x%p, 0x%x) ->", __FUNCTION__, l, addr); \ | 935 | DBG_PORT("%s(0x%p, 0x%x) ->", __func__, l, addr); \ |
936 | t = READ_REG##size(PIOP_TO_GMMIO(LBA_DEV(l), addr)); \ | 936 | t = READ_REG##size(PIOP_TO_GMMIO(LBA_DEV(l), addr)); \ |
937 | DBG_PORT(" 0x%x\n", t); \ | 937 | DBG_PORT(" 0x%x\n", t); \ |
938 | return (t); \ | 938 | return (t); \ |
@@ -948,7 +948,7 @@ LBA_PORT_IN(32, 0) | |||
948 | static void lba_pat_out##size (struct pci_hba_data *l, u16 addr, u##size val) \ | 948 | static void lba_pat_out##size (struct pci_hba_data *l, u16 addr, u##size val) \ |
949 | { \ | 949 | { \ |
950 | void __iomem *where = PIOP_TO_GMMIO(LBA_DEV(l), addr); \ | 950 | void __iomem *where = PIOP_TO_GMMIO(LBA_DEV(l), addr); \ |
951 | DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, l, addr, val); \ | 951 | DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __func__, l, addr, val); \ |
952 | WRITE_REG##size(val, where); \ | 952 | WRITE_REG##size(val, where); \ |
953 | /* flush the I/O down to the elroy at least */ \ | 953 | /* flush the I/O down to the elroy at least */ \ |
954 | lba_t32 = READ_U32(l->base_addr + LBA_FUNC_ID); \ | 954 | lba_t32 = READ_U32(l->base_addr + LBA_FUNC_ID); \ |
@@ -1584,7 +1584,7 @@ void lba_set_iregs(struct parisc_device *lba, u32 ibase, u32 imask) | |||
1584 | WARN_ON((ibase & 0x001fffff) != 0); | 1584 | WARN_ON((ibase & 0x001fffff) != 0); |
1585 | WARN_ON((imask & 0x001fffff) != 0); | 1585 | WARN_ON((imask & 0x001fffff) != 0); |
1586 | 1586 | ||
1587 | DBG("%s() ibase 0x%x imask 0x%x\n", __FUNCTION__, ibase, imask); | 1587 | DBG("%s() ibase 0x%x imask 0x%x\n", __func__, ibase, imask); |
1588 | WRITE_REG32( imask, base_addr + LBA_IMASK); | 1588 | WRITE_REG32( imask, base_addr + LBA_IMASK); |
1589 | WRITE_REG32( ibase, base_addr + LBA_IBASE); | 1589 | WRITE_REG32( ibase, base_addr + LBA_IBASE); |
1590 | iounmap(base_addr); | 1590 | iounmap(base_addr); |
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 703b85edb004..f9b12664f9fb 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c | |||
@@ -569,7 +569,7 @@ int __init register_led_driver(int model, unsigned long cmd_reg, unsigned long d | |||
569 | 569 | ||
570 | default: | 570 | default: |
571 | printk(KERN_ERR "%s: Wrong LCD/LED model %d !\n", | 571 | printk(KERN_ERR "%s: Wrong LCD/LED model %d !\n", |
572 | __FUNCTION__, lcd_info.model); | 572 | __func__, lcd_info.model); |
573 | return 1; | 573 | return 1; |
574 | } | 574 | } |
575 | 575 | ||
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c index afc849bd3f58..bc73b96346ff 100644 --- a/drivers/parisc/sba_iommu.c +++ b/drivers/parisc/sba_iommu.c | |||
@@ -384,7 +384,7 @@ sba_search_bitmap(struct ioc *ioc, struct device *dev, | |||
384 | } | 384 | } |
385 | mask = RESMAP_MASK(bits_wanted) >> bitshiftcnt; | 385 | mask = RESMAP_MASK(bits_wanted) >> bitshiftcnt; |
386 | 386 | ||
387 | DBG_RES("%s() o %ld %p", __FUNCTION__, o, res_ptr); | 387 | DBG_RES("%s() o %ld %p", __func__, o, res_ptr); |
388 | while(res_ptr < res_end) | 388 | while(res_ptr < res_end) |
389 | { | 389 | { |
390 | DBG_RES(" %p %lx %lx\n", res_ptr, mask, *res_ptr); | 390 | DBG_RES(" %p %lx %lx\n", res_ptr, mask, *res_ptr); |
@@ -454,7 +454,7 @@ sba_alloc_range(struct ioc *ioc, struct device *dev, size_t size) | |||
454 | #endif | 454 | #endif |
455 | 455 | ||
456 | DBG_RES("%s(%x) %d -> %lx hint %x/%x\n", | 456 | DBG_RES("%s(%x) %d -> %lx hint %x/%x\n", |
457 | __FUNCTION__, size, pages_needed, pide, | 457 | __func__, size, pages_needed, pide, |
458 | (uint) ((unsigned long) ioc->res_hint - (unsigned long) ioc->res_map), | 458 | (uint) ((unsigned long) ioc->res_hint - (unsigned long) ioc->res_map), |
459 | ioc->res_bitshift ); | 459 | ioc->res_bitshift ); |
460 | 460 | ||
@@ -497,7 +497,7 @@ sba_free_range(struct ioc *ioc, dma_addr_t iova, size_t size) | |||
497 | unsigned long m = RESMAP_MASK(bits_not_wanted) >> (pide & (BITS_PER_LONG - 1)); | 497 | unsigned long m = RESMAP_MASK(bits_not_wanted) >> (pide & (BITS_PER_LONG - 1)); |
498 | 498 | ||
499 | DBG_RES("%s( ,%x,%x) %x/%lx %x %p %lx\n", | 499 | DBG_RES("%s( ,%x,%x) %x/%lx %x %p %lx\n", |
500 | __FUNCTION__, (uint) iova, size, | 500 | __func__, (uint) iova, size, |
501 | bits_not_wanted, m, pide, res_ptr, *res_ptr); | 501 | bits_not_wanted, m, pide, res_ptr, *res_ptr); |
502 | 502 | ||
503 | #ifdef SBA_COLLECT_STATS | 503 | #ifdef SBA_COLLECT_STATS |
@@ -740,7 +740,7 @@ sba_map_single(struct device *dev, void *addr, size_t size, | |||
740 | iovp = (dma_addr_t) pide << IOVP_SHIFT; | 740 | iovp = (dma_addr_t) pide << IOVP_SHIFT; |
741 | 741 | ||
742 | DBG_RUN("%s() 0x%p -> 0x%lx\n", | 742 | DBG_RUN("%s() 0x%p -> 0x%lx\n", |
743 | __FUNCTION__, addr, (long) iovp | offset); | 743 | __func__, addr, (long) iovp | offset); |
744 | 744 | ||
745 | pdir_start = &(ioc->pdir_base[pide]); | 745 | pdir_start = &(ioc->pdir_base[pide]); |
746 | 746 | ||
@@ -798,7 +798,7 @@ sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size, | |||
798 | unsigned long flags; | 798 | unsigned long flags; |
799 | dma_addr_t offset; | 799 | dma_addr_t offset; |
800 | 800 | ||
801 | DBG_RUN("%s() iovp 0x%lx/%x\n", __FUNCTION__, (long) iova, size); | 801 | DBG_RUN("%s() iovp 0x%lx/%x\n", __func__, (long) iova, size); |
802 | 802 | ||
803 | ioc = GET_IOC(dev); | 803 | ioc = GET_IOC(dev); |
804 | offset = iova & ~IOVP_MASK; | 804 | offset = iova & ~IOVP_MASK; |
@@ -937,7 +937,7 @@ sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, | |||
937 | int coalesced, filled = 0; | 937 | int coalesced, filled = 0; |
938 | unsigned long flags; | 938 | unsigned long flags; |
939 | 939 | ||
940 | DBG_RUN_SG("%s() START %d entries\n", __FUNCTION__, nents); | 940 | DBG_RUN_SG("%s() START %d entries\n", __func__, nents); |
941 | 941 | ||
942 | ioc = GET_IOC(dev); | 942 | ioc = GET_IOC(dev); |
943 | 943 | ||
@@ -998,7 +998,7 @@ sba_map_sg(struct device *dev, struct scatterlist *sglist, int nents, | |||
998 | 998 | ||
999 | spin_unlock_irqrestore(&ioc->res_lock, flags); | 999 | spin_unlock_irqrestore(&ioc->res_lock, flags); |
1000 | 1000 | ||
1001 | DBG_RUN_SG("%s() DONE %d mappings\n", __FUNCTION__, filled); | 1001 | DBG_RUN_SG("%s() DONE %d mappings\n", __func__, filled); |
1002 | 1002 | ||
1003 | return filled; | 1003 | return filled; |
1004 | } | 1004 | } |
@@ -1023,7 +1023,7 @@ sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, | |||
1023 | #endif | 1023 | #endif |
1024 | 1024 | ||
1025 | DBG_RUN_SG("%s() START %d entries, %p,%x\n", | 1025 | DBG_RUN_SG("%s() START %d entries, %p,%x\n", |
1026 | __FUNCTION__, nents, sg_virt_addr(sglist), sglist->length); | 1026 | __func__, nents, sg_virt_addr(sglist), sglist->length); |
1027 | 1027 | ||
1028 | ioc = GET_IOC(dev); | 1028 | ioc = GET_IOC(dev); |
1029 | 1029 | ||
@@ -1047,7 +1047,7 @@ sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, | |||
1047 | ++sglist; | 1047 | ++sglist; |
1048 | } | 1048 | } |
1049 | 1049 | ||
1050 | DBG_RUN_SG("%s() DONE (nents %d)\n", __FUNCTION__, nents); | 1050 | DBG_RUN_SG("%s() DONE (nents %d)\n", __func__, nents); |
1051 | 1051 | ||
1052 | #ifdef ASSERT_PDIR_SANITY | 1052 | #ifdef ASSERT_PDIR_SANITY |
1053 | spin_lock_irqsave(&ioc->res_lock, flags); | 1053 | spin_lock_irqsave(&ioc->res_lock, flags); |
@@ -1118,7 +1118,7 @@ sba_alloc_pdir(unsigned int pdir_size) | |||
1118 | pdir_base = __get_free_pages(GFP_KERNEL, pdir_order); | 1118 | pdir_base = __get_free_pages(GFP_KERNEL, pdir_order); |
1119 | if (NULL == (void *) pdir_base) { | 1119 | if (NULL == (void *) pdir_base) { |
1120 | panic("%s() could not allocate I/O Page Table\n", | 1120 | panic("%s() could not allocate I/O Page Table\n", |
1121 | __FUNCTION__); | 1121 | __func__); |
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | /* If this is not PA8700 (PCX-W2) | 1124 | /* If this is not PA8700 (PCX-W2) |
@@ -1261,7 +1261,7 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num) | |||
1261 | ioc->pdir_size = (iova_space_size / IOVP_SIZE) * sizeof(u64); | 1261 | ioc->pdir_size = (iova_space_size / IOVP_SIZE) * sizeof(u64); |
1262 | 1262 | ||
1263 | DBG_INIT("%s() hpa 0x%p IOV %dMB (%d bits)\n", | 1263 | DBG_INIT("%s() hpa 0x%p IOV %dMB (%d bits)\n", |
1264 | __FUNCTION__, ioc->ioc_hpa, iova_space_size >> 20, | 1264 | __func__, ioc->ioc_hpa, iova_space_size >> 20, |
1265 | iov_order + PAGE_SHIFT); | 1265 | iov_order + PAGE_SHIFT); |
1266 | 1266 | ||
1267 | ioc->pdir_base = (void *) __get_free_pages(GFP_KERNEL, | 1267 | ioc->pdir_base = (void *) __get_free_pages(GFP_KERNEL, |
@@ -1272,7 +1272,7 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num) | |||
1272 | memset(ioc->pdir_base, 0, ioc->pdir_size); | 1272 | memset(ioc->pdir_base, 0, ioc->pdir_size); |
1273 | 1273 | ||
1274 | DBG_INIT("%s() pdir %p size %x\n", | 1274 | DBG_INIT("%s() pdir %p size %x\n", |
1275 | __FUNCTION__, ioc->pdir_base, ioc->pdir_size); | 1275 | __func__, ioc->pdir_base, ioc->pdir_size); |
1276 | 1276 | ||
1277 | #ifdef SBA_HINT_SUPPORT | 1277 | #ifdef SBA_HINT_SUPPORT |
1278 | ioc->hint_shift_pdir = iov_order + PAGE_SHIFT; | 1278 | ioc->hint_shift_pdir = iov_order + PAGE_SHIFT; |
@@ -1354,7 +1354,7 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num) | |||
1354 | 1354 | ||
1355 | if (agp_found && sba_reserve_agpgart) { | 1355 | if (agp_found && sba_reserve_agpgart) { |
1356 | printk(KERN_INFO "%s: reserving %dMb of IOVA space for agpgart\n", | 1356 | printk(KERN_INFO "%s: reserving %dMb of IOVA space for agpgart\n", |
1357 | __FUNCTION__, (iova_space_size/2) >> 20); | 1357 | __func__, (iova_space_size/2) >> 20); |
1358 | ioc->pdir_size /= 2; | 1358 | ioc->pdir_size /= 2; |
1359 | ioc->pdir_base[PDIR_INDEX(iova_space_size/2)] = SBA_AGPGART_COOKIE; | 1359 | ioc->pdir_base[PDIR_INDEX(iova_space_size/2)] = SBA_AGPGART_COOKIE; |
1360 | } | 1360 | } |
@@ -1406,7 +1406,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num) | |||
1406 | ioc->pdir_size = pdir_size = (iova_space_size/IOVP_SIZE) * sizeof(u64); | 1406 | ioc->pdir_size = pdir_size = (iova_space_size/IOVP_SIZE) * sizeof(u64); |
1407 | 1407 | ||
1408 | DBG_INIT("%s() hpa 0x%lx mem %ldMB IOV %dMB (%d bits)\n", | 1408 | DBG_INIT("%s() hpa 0x%lx mem %ldMB IOV %dMB (%d bits)\n", |
1409 | __FUNCTION__, | 1409 | __func__, |
1410 | ioc->ioc_hpa, | 1410 | ioc->ioc_hpa, |
1411 | (unsigned long) num_physpages >> (20 - PAGE_SHIFT), | 1411 | (unsigned long) num_physpages >> (20 - PAGE_SHIFT), |
1412 | iova_space_size>>20, | 1412 | iova_space_size>>20, |
@@ -1415,7 +1415,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num) | |||
1415 | ioc->pdir_base = sba_alloc_pdir(pdir_size); | 1415 | ioc->pdir_base = sba_alloc_pdir(pdir_size); |
1416 | 1416 | ||
1417 | DBG_INIT("%s() pdir %p size %x\n", | 1417 | DBG_INIT("%s() pdir %p size %x\n", |
1418 | __FUNCTION__, ioc->pdir_base, pdir_size); | 1418 | __func__, ioc->pdir_base, pdir_size); |
1419 | 1419 | ||
1420 | #ifdef SBA_HINT_SUPPORT | 1420 | #ifdef SBA_HINT_SUPPORT |
1421 | /* FIXME : DMA HINTs not used */ | 1421 | /* FIXME : DMA HINTs not used */ |
@@ -1443,7 +1443,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num) | |||
1443 | #endif | 1443 | #endif |
1444 | 1444 | ||
1445 | DBG_INIT("%s() IOV base 0x%lx mask 0x%0lx\n", | 1445 | DBG_INIT("%s() IOV base 0x%lx mask 0x%0lx\n", |
1446 | __FUNCTION__, ioc->ibase, ioc->imask); | 1446 | __func__, ioc->ibase, ioc->imask); |
1447 | 1447 | ||
1448 | /* | 1448 | /* |
1449 | ** FIXME: Hint registers are programmed with default hint | 1449 | ** FIXME: Hint registers are programmed with default hint |
@@ -1470,7 +1470,7 @@ sba_ioc_init(struct parisc_device *sba, struct ioc *ioc, int ioc_num) | |||
1470 | 1470 | ||
1471 | ioc->ibase = 0; /* used by SBA_IOVA and related macros */ | 1471 | ioc->ibase = 0; /* used by SBA_IOVA and related macros */ |
1472 | 1472 | ||
1473 | DBG_INIT("%s() DONE\n", __FUNCTION__); | 1473 | DBG_INIT("%s() DONE\n", __func__); |
1474 | } | 1474 | } |
1475 | 1475 | ||
1476 | 1476 | ||
@@ -1544,7 +1544,7 @@ printk("sba_hw_init(): mem_boot 0x%x 0x%x 0x%x 0x%x\n", PAGE0->mem_boot.hpa, | |||
1544 | if (!IS_PLUTO(sba_dev->dev)) { | 1544 | if (!IS_PLUTO(sba_dev->dev)) { |
1545 | ioc_ctl = READ_REG(sba_dev->sba_hpa+IOC_CTRL); | 1545 | ioc_ctl = READ_REG(sba_dev->sba_hpa+IOC_CTRL); |
1546 | DBG_INIT("%s() hpa 0x%lx ioc_ctl 0x%Lx ->", | 1546 | DBG_INIT("%s() hpa 0x%lx ioc_ctl 0x%Lx ->", |
1547 | __FUNCTION__, sba_dev->sba_hpa, ioc_ctl); | 1547 | __func__, sba_dev->sba_hpa, ioc_ctl); |
1548 | ioc_ctl &= ~(IOC_CTRL_RM | IOC_CTRL_NC | IOC_CTRL_CE); | 1548 | ioc_ctl &= ~(IOC_CTRL_RM | IOC_CTRL_NC | IOC_CTRL_CE); |
1549 | ioc_ctl |= IOC_CTRL_DD | IOC_CTRL_D4 | IOC_CTRL_TC; | 1549 | ioc_ctl |= IOC_CTRL_DD | IOC_CTRL_D4 | IOC_CTRL_TC; |
1550 | /* j6700 v1.6 firmware sets 0x294f */ | 1550 | /* j6700 v1.6 firmware sets 0x294f */ |
@@ -1675,7 +1675,7 @@ sba_common_init(struct sba_device *sba_dev) | |||
1675 | 1675 | ||
1676 | res_size >>= 3; /* convert bit count to byte count */ | 1676 | res_size >>= 3; /* convert bit count to byte count */ |
1677 | DBG_INIT("%s() res_size 0x%x\n", | 1677 | DBG_INIT("%s() res_size 0x%x\n", |
1678 | __FUNCTION__, res_size); | 1678 | __func__, res_size); |
1679 | 1679 | ||
1680 | sba_dev->ioc[i].res_size = res_size; | 1680 | sba_dev->ioc[i].res_size = res_size; |
1681 | sba_dev->ioc[i].res_map = (char *) __get_free_pages(GFP_KERNEL, get_order(res_size)); | 1681 | sba_dev->ioc[i].res_map = (char *) __get_free_pages(GFP_KERNEL, get_order(res_size)); |
@@ -1688,7 +1688,7 @@ sba_common_init(struct sba_device *sba_dev) | |||
1688 | if (NULL == sba_dev->ioc[i].res_map) | 1688 | if (NULL == sba_dev->ioc[i].res_map) |
1689 | { | 1689 | { |
1690 | panic("%s:%s() could not allocate resource map\n", | 1690 | panic("%s:%s() could not allocate resource map\n", |
1691 | __FILE__, __FUNCTION__ ); | 1691 | __FILE__, __func__ ); |
1692 | } | 1692 | } |
1693 | 1693 | ||
1694 | memset(sba_dev->ioc[i].res_map, 0, res_size); | 1694 | memset(sba_dev->ioc[i].res_map, 0, res_size); |
@@ -1725,7 +1725,7 @@ sba_common_init(struct sba_device *sba_dev) | |||
1725 | #endif | 1725 | #endif |
1726 | 1726 | ||
1727 | DBG_INIT("%s() %d res_map %x %p\n", | 1727 | DBG_INIT("%s() %d res_map %x %p\n", |
1728 | __FUNCTION__, i, res_size, sba_dev->ioc[i].res_map); | 1728 | __func__, i, res_size, sba_dev->ioc[i].res_map); |
1729 | } | 1729 | } |
1730 | 1730 | ||
1731 | spin_lock_init(&sba_dev->sba_lock); | 1731 | spin_lock_init(&sba_dev->sba_lock); |
diff --git a/drivers/parisc/wax.c b/drivers/parisc/wax.c index 813c2c24ab1e..892a83bbe73d 100644 --- a/drivers/parisc/wax.c +++ b/drivers/parisc/wax.c | |||
@@ -93,7 +93,7 @@ wax_init_chip(struct parisc_device *dev) | |||
93 | dev->irq = gsc_claim_irq(&gsc_irq, WAX_GSC_IRQ); | 93 | dev->irq = gsc_claim_irq(&gsc_irq, WAX_GSC_IRQ); |
94 | if (dev->irq < 0) { | 94 | if (dev->irq < 0) { |
95 | printk(KERN_ERR "%s(): cannot get GSC irq\n", | 95 | printk(KERN_ERR "%s(): cannot get GSC irq\n", |
96 | __FUNCTION__); | 96 | __func__); |
97 | kfree(wax); | 97 | kfree(wax); |
98 | return -EBUSY; | 98 | return -EBUSY; |
99 | } | 99 | } |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index f2d9c770f51a..dabb563f51d9 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -1503,8 +1503,7 @@ static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_f | |||
1503 | (f->device == dev->device || f->device == (u16) PCI_ANY_ID)) { | 1503 | (f->device == dev->device || f->device == (u16) PCI_ANY_ID)) { |
1504 | #ifdef DEBUG | 1504 | #ifdef DEBUG |
1505 | dev_dbg(&dev->dev, "calling "); | 1505 | dev_dbg(&dev->dev, "calling "); |
1506 | print_fn_descriptor_symbol("%s()\n", | 1506 | print_fn_descriptor_symbol("%s\n", f->hook); |
1507 | (unsigned long) f->hook); | ||
1508 | #endif | 1507 | #endif |
1509 | f->hook(dev); | 1508 | f->hook(dev); |
1510 | } | 1509 | } |
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index ffdb12a59c40..e2b7de4cb05e 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c | |||
@@ -331,8 +331,7 @@ void pnp_fixup_device(struct pnp_dev *dev) | |||
331 | continue; | 331 | continue; |
332 | #ifdef DEBUG | 332 | #ifdef DEBUG |
333 | dev_dbg(&dev->dev, "%s: calling ", f->id); | 333 | dev_dbg(&dev->dev, "%s: calling ", f->id); |
334 | print_fn_descriptor_symbol("%s\n", | 334 | print_fn_descriptor_symbol("%s\n", f->quirk_function); |
335 | (unsigned long) f->quirk_function); | ||
336 | #endif | 335 | #endif |
337 | f->quirk_function(dev); | 336 | f->quirk_function(dev); |
338 | } | 337 | } |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index ac6d4d3218b3..8ba3f135da22 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -925,6 +925,8 @@ static void dasd_handle_killed_request(struct ccw_device *cdev, | |||
925 | struct dasd_ccw_req *cqr; | 925 | struct dasd_ccw_req *cqr; |
926 | struct dasd_device *device; | 926 | struct dasd_device *device; |
927 | 927 | ||
928 | if (!intparm) | ||
929 | return; | ||
928 | cqr = (struct dasd_ccw_req *) intparm; | 930 | cqr = (struct dasd_ccw_req *) intparm; |
929 | if (cqr->status != DASD_CQR_IN_IO) { | 931 | if (cqr->status != DASD_CQR_IN_IO) { |
930 | MESSAGE(KERN_DEBUG, | 932 | MESSAGE(KERN_DEBUG, |
@@ -976,17 +978,16 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
976 | if (IS_ERR(irb)) { | 978 | if (IS_ERR(irb)) { |
977 | switch (PTR_ERR(irb)) { | 979 | switch (PTR_ERR(irb)) { |
978 | case -EIO: | 980 | case -EIO: |
979 | dasd_handle_killed_request(cdev, intparm); | ||
980 | break; | 981 | break; |
981 | case -ETIMEDOUT: | 982 | case -ETIMEDOUT: |
982 | printk(KERN_WARNING"%s(%s): request timed out\n", | 983 | printk(KERN_WARNING"%s(%s): request timed out\n", |
983 | __func__, cdev->dev.bus_id); | 984 | __func__, cdev->dev.bus_id); |
984 | //FIXME - dasd uses own timeout interface... | ||
985 | break; | 985 | break; |
986 | default: | 986 | default: |
987 | printk(KERN_WARNING"%s(%s): unknown error %ld\n", | 987 | printk(KERN_WARNING"%s(%s): unknown error %ld\n", |
988 | __func__, cdev->dev.bus_id, PTR_ERR(irb)); | 988 | __func__, cdev->dev.bus_id, PTR_ERR(irb)); |
989 | } | 989 | } |
990 | dasd_handle_killed_request(cdev, intparm); | ||
990 | return; | 991 | return; |
991 | } | 992 | } |
992 | 993 | ||
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index f4fb40257348..d774e79476fe 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -86,10 +86,10 @@ static DEFINE_SPINLOCK(dasd_devmap_lock); | |||
86 | static struct list_head dasd_hashlists[256]; | 86 | static struct list_head dasd_hashlists[256]; |
87 | int dasd_max_devindex; | 87 | int dasd_max_devindex; |
88 | 88 | ||
89 | static struct dasd_devmap *dasd_add_busid(char *, int); | 89 | static struct dasd_devmap *dasd_add_busid(const char *, int); |
90 | 90 | ||
91 | static inline int | 91 | static inline int |
92 | dasd_hash_busid(char *bus_id) | 92 | dasd_hash_busid(const char *bus_id) |
93 | { | 93 | { |
94 | int hash, i; | 94 | int hash, i; |
95 | 95 | ||
@@ -394,7 +394,7 @@ dasd_parse(void) | |||
394 | * devices. | 394 | * devices. |
395 | */ | 395 | */ |
396 | static struct dasd_devmap * | 396 | static struct dasd_devmap * |
397 | dasd_add_busid(char *bus_id, int features) | 397 | dasd_add_busid(const char *bus_id, int features) |
398 | { | 398 | { |
399 | struct dasd_devmap *devmap, *new, *tmp; | 399 | struct dasd_devmap *devmap, *new, *tmp; |
400 | int hash; | 400 | int hash; |
@@ -430,7 +430,7 @@ dasd_add_busid(char *bus_id, int features) | |||
430 | * Find devmap for device with given bus_id. | 430 | * Find devmap for device with given bus_id. |
431 | */ | 431 | */ |
432 | static struct dasd_devmap * | 432 | static struct dasd_devmap * |
433 | dasd_find_busid(char *bus_id) | 433 | dasd_find_busid(const char *bus_id) |
434 | { | 434 | { |
435 | struct dasd_devmap *devmap, *tmp; | 435 | struct dasd_devmap *devmap, *tmp; |
436 | int hash; | 436 | int hash; |
@@ -452,7 +452,7 @@ dasd_find_busid(char *bus_id) | |||
452 | * Check if busid has been added to the list of dasd ranges. | 452 | * Check if busid has been added to the list of dasd ranges. |
453 | */ | 453 | */ |
454 | int | 454 | int |
455 | dasd_busid_known(char *bus_id) | 455 | dasd_busid_known(const char *bus_id) |
456 | { | 456 | { |
457 | return IS_ERR(dasd_find_busid(bus_id)) ? -ENOENT : 0; | 457 | return IS_ERR(dasd_find_busid(bus_id)) ? -ENOENT : 0; |
458 | } | 458 | } |
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index 6c624bf44617..fb2f931cf844 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h | |||
@@ -598,7 +598,7 @@ struct dasd_device *dasd_device_from_cdev_locked(struct ccw_device *); | |||
598 | struct dasd_device *dasd_device_from_devindex(int); | 598 | struct dasd_device *dasd_device_from_devindex(int); |
599 | 599 | ||
600 | int dasd_parse(void); | 600 | int dasd_parse(void); |
601 | int dasd_busid_known(char *); | 601 | int dasd_busid_known(const char *); |
602 | 602 | ||
603 | /* externals in dasd_gendisk.c */ | 603 | /* externals in dasd_gendisk.c */ |
604 | int dasd_gendisk_init(void); | 604 | int dasd_gendisk_init(void); |
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index 7ad8cf157641..76e44eb7c47f 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c | |||
@@ -76,32 +76,9 @@ const char *tape_op_verbose[TO_SIZE] = | |||
76 | [TO_KEKL_QUERY] = "KLQ",[TO_RDC] = "RDC", | 76 | [TO_KEKL_QUERY] = "KLQ",[TO_RDC] = "RDC", |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static int | 79 | static int devid_to_int(struct ccw_dev_id *dev_id) |
80 | busid_to_int(char *bus_id) | ||
81 | { | 80 | { |
82 | int dec; | 81 | return dev_id->devno + (dev_id->ssid << 16); |
83 | int d; | ||
84 | char * s; | ||
85 | |||
86 | for(s = bus_id, d = 0; *s != '\0' && *s != '.'; s++) | ||
87 | d = (d * 10) + (*s - '0'); | ||
88 | dec = d; | ||
89 | for(s++, d = 0; *s != '\0' && *s != '.'; s++) | ||
90 | d = (d * 10) + (*s - '0'); | ||
91 | dec = (dec << 8) + d; | ||
92 | |||
93 | for(s++; *s != '\0'; s++) { | ||
94 | if (*s >= '0' && *s <= '9') { | ||
95 | d = *s - '0'; | ||
96 | } else if (*s >= 'a' && *s <= 'f') { | ||
97 | d = *s - 'a' + 10; | ||
98 | } else { | ||
99 | d = *s - 'A' + 10; | ||
100 | } | ||
101 | dec = (dec << 4) + d; | ||
102 | } | ||
103 | |||
104 | return dec; | ||
105 | } | 82 | } |
106 | 83 | ||
107 | /* | 84 | /* |
@@ -551,6 +528,7 @@ tape_generic_probe(struct ccw_device *cdev) | |||
551 | { | 528 | { |
552 | struct tape_device *device; | 529 | struct tape_device *device; |
553 | int ret; | 530 | int ret; |
531 | struct ccw_dev_id dev_id; | ||
554 | 532 | ||
555 | device = tape_alloc_device(); | 533 | device = tape_alloc_device(); |
556 | if (IS_ERR(device)) | 534 | if (IS_ERR(device)) |
@@ -565,7 +543,8 @@ tape_generic_probe(struct ccw_device *cdev) | |||
565 | cdev->dev.driver_data = device; | 543 | cdev->dev.driver_data = device; |
566 | cdev->handler = __tape_do_irq; | 544 | cdev->handler = __tape_do_irq; |
567 | device->cdev = cdev; | 545 | device->cdev = cdev; |
568 | device->cdev_id = busid_to_int(cdev->dev.bus_id); | 546 | ccw_device_get_id(cdev, &dev_id); |
547 | device->cdev_id = devid_to_int(&dev_id); | ||
569 | PRINT_INFO("tape device %s found\n", cdev->dev.bus_id); | 548 | PRINT_INFO("tape device %s found\n", cdev->dev.bus_id); |
570 | return ret; | 549 | return ret; |
571 | } | 550 | } |
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index d364e0bfae12..e8487347e4d4 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c | |||
@@ -858,7 +858,7 @@ static int __init vmlogrdr_init(void) | |||
858 | for (i=0; i < MAXMINOR; ++i ) { | 858 | for (i=0; i < MAXMINOR; ++i ) { |
859 | sys_ser[i].buffer = (char *) get_zeroed_page(GFP_KERNEL); | 859 | sys_ser[i].buffer = (char *) get_zeroed_page(GFP_KERNEL); |
860 | if (!sys_ser[i].buffer) { | 860 | if (!sys_ser[i].buffer) { |
861 | rc = ENOMEM; | 861 | rc = -ENOMEM; |
862 | break; | 862 | break; |
863 | } | 863 | } |
864 | sys_ser[i].current_position = sys_ser[i].buffer; | 864 | sys_ser[i].current_position = sys_ser[i].buffer; |
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c index 9c21b8f43f9b..a4a5f2efea48 100644 --- a/drivers/s390/cio/blacklist.c +++ b/drivers/s390/cio/blacklist.c | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | #include <asm/cio.h> | 20 | #include <asm/cio.h> |
21 | #include <asm/uaccess.h> | 21 | #include <asm/uaccess.h> |
22 | #include <asm/cio.h> | ||
23 | 22 | ||
24 | #include "blacklist.h" | 23 | #include "blacklist.h" |
25 | #include "cio.h" | 24 | #include "cio.h" |
diff --git a/drivers/s390/cio/device_pgid.c b/drivers/s390/cio/device_pgid.c index ba559053402e..5cf7be008e98 100644 --- a/drivers/s390/cio/device_pgid.c +++ b/drivers/s390/cio/device_pgid.c | |||
@@ -243,16 +243,10 @@ __ccw_device_do_pgid(struct ccw_device *cdev, __u8 func) | |||
243 | /* Setup sense path group id channel program. */ | 243 | /* Setup sense path group id channel program. */ |
244 | cdev->private->pgid[0].inf.fc = func; | 244 | cdev->private->pgid[0].inf.fc = func; |
245 | ccw = cdev->private->iccws; | 245 | ccw = cdev->private->iccws; |
246 | if (!cdev->private->flags.pgid_single) { | 246 | if (cdev->private->flags.pgid_single) |
247 | cdev->private->pgid[0].inf.fc |= SPID_FUNC_MULTI_PATH; | ||
248 | ccw->cmd_code = CCW_CMD_SUSPEND_RECONN; | ||
249 | ccw->cda = 0; | ||
250 | ccw->count = 0; | ||
251 | ccw->flags = CCW_FLAG_SLI | CCW_FLAG_CC; | ||
252 | ccw++; | ||
253 | } else | ||
254 | cdev->private->pgid[0].inf.fc |= SPID_FUNC_SINGLE_PATH; | 247 | cdev->private->pgid[0].inf.fc |= SPID_FUNC_SINGLE_PATH; |
255 | 248 | else | |
249 | cdev->private->pgid[0].inf.fc |= SPID_FUNC_MULTI_PATH; | ||
256 | ccw->cmd_code = CCW_CMD_SET_PGID; | 250 | ccw->cmd_code = CCW_CMD_SET_PGID; |
257 | ccw->cda = (__u32) __pa (&cdev->private->pgid[0]); | 251 | ccw->cda = (__u32) __pa (&cdev->private->pgid[0]); |
258 | ccw->count = sizeof (struct pgid); | 252 | ccw->count = sizeof (struct pgid); |
diff --git a/include/asm-ia64/machvec.h b/include/asm-ia64/machvec.h index 9f020eb825c5..0721a5e8271e 100644 --- a/include/asm-ia64/machvec.h +++ b/include/asm-ia64/machvec.h | |||
@@ -126,6 +126,8 @@ extern void machvec_tlb_migrate_finish (struct mm_struct *); | |||
126 | # include <asm/machvec_hpzx1_swiotlb.h> | 126 | # include <asm/machvec_hpzx1_swiotlb.h> |
127 | # elif defined (CONFIG_IA64_SGI_SN2) | 127 | # elif defined (CONFIG_IA64_SGI_SN2) |
128 | # include <asm/machvec_sn2.h> | 128 | # include <asm/machvec_sn2.h> |
129 | # elif defined (CONFIG_IA64_SGI_UV) | ||
130 | # include <asm/machvec_uv.h> | ||
129 | # elif defined (CONFIG_IA64_GENERIC) | 131 | # elif defined (CONFIG_IA64_GENERIC) |
130 | 132 | ||
131 | # ifdef MACHVEC_PLATFORM_HEADER | 133 | # ifdef MACHVEC_PLATFORM_HEADER |
diff --git a/include/asm-ia64/machvec_uv.h b/include/asm-ia64/machvec_uv.h new file mode 100644 index 000000000000..2931447f3813 --- /dev/null +++ b/include/asm-ia64/machvec_uv.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * SGI UV Core Functions | ||
7 | * | ||
8 | * Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved. | ||
9 | */ | ||
10 | |||
11 | #ifndef _ASM_IA64_MACHVEC_UV_H | ||
12 | #define _ASM_IA64_MACHVEC_UV_H | ||
13 | |||
14 | extern ia64_mv_setup_t uv_setup; | ||
15 | |||
16 | /* | ||
17 | * This stuff has dual use! | ||
18 | * | ||
19 | * For a generic kernel, the macros are used to initialize the | ||
20 | * platform's machvec structure. When compiling a non-generic kernel, | ||
21 | * the macros are used directly. | ||
22 | */ | ||
23 | #define platform_name "uv" | ||
24 | #define platform_setup uv_setup | ||
25 | |||
26 | #endif /* _ASM_IA64_MACHVEC_UV_H */ | ||
diff --git a/include/asm-ia64/uv/uv_hub.h b/include/asm-ia64/uv/uv_hub.h new file mode 100644 index 000000000000..f607018af4a1 --- /dev/null +++ b/include/asm-ia64/uv/uv_hub.h | |||
@@ -0,0 +1,309 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * SGI UV architectural definitions | ||
7 | * | ||
8 | * Copyright (C) 2008 Silicon Graphics, Inc. All rights reserved. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_IA64_UV_HUB_H__ | ||
12 | #define __ASM_IA64_UV_HUB_H__ | ||
13 | |||
14 | #include <linux/numa.h> | ||
15 | #include <linux/percpu.h> | ||
16 | #include <asm/types.h> | ||
17 | #include <asm/percpu.h> | ||
18 | |||
19 | |||
20 | /* | ||
21 | * Addressing Terminology | ||
22 | * | ||
23 | * M - The low M bits of a physical address represent the offset | ||
24 | * into the blade local memory. RAM memory on a blade is physically | ||
25 | * contiguous (although various IO spaces may punch holes in | ||
26 | * it).. | ||
27 | * | ||
28 | * N - Number of bits in the node portion of a socket physical | ||
29 | * address. | ||
30 | * | ||
31 | * NASID - network ID of a router, Mbrick or Cbrick. Nasid values of | ||
32 | * routers always have low bit of 1, C/MBricks have low bit | ||
33 | * equal to 0. Most addressing macros that target UV hub chips | ||
34 | * right shift the NASID by 1 to exclude the always-zero bit. | ||
35 | * NASIDs contain up to 15 bits. | ||
36 | * | ||
37 | * GNODE - NASID right shifted by 1 bit. Most mmrs contain gnodes instead | ||
38 | * of nasids. | ||
39 | * | ||
40 | * PNODE - the low N bits of the GNODE. The PNODE is the most useful variant | ||
41 | * of the nasid for socket usage. | ||
42 | * | ||
43 | * | ||
44 | * NumaLink Global Physical Address Format: | ||
45 | * +--------------------------------+---------------------+ | ||
46 | * |00..000| GNODE | NodeOffset | | ||
47 | * +--------------------------------+---------------------+ | ||
48 | * |<-------53 - M bits --->|<--------M bits -----> | ||
49 | * | ||
50 | * M - number of node offset bits (35 .. 40) | ||
51 | * | ||
52 | * | ||
53 | * Memory/UV-HUB Processor Socket Address Format: | ||
54 | * +----------------+---------------+---------------------+ | ||
55 | * |00..000000000000| PNODE | NodeOffset | | ||
56 | * +----------------+---------------+---------------------+ | ||
57 | * <--- N bits --->|<--------M bits -----> | ||
58 | * | ||
59 | * M - number of node offset bits (35 .. 40) | ||
60 | * N - number of PNODE bits (0 .. 10) | ||
61 | * | ||
62 | * Note: M + N cannot currently exceed 44 (x86_64) or 46 (IA64). | ||
63 | * The actual values are configuration dependent and are set at | ||
64 | * boot time. M & N values are set by the hardware/BIOS at boot. | ||
65 | */ | ||
66 | |||
67 | |||
68 | /* | ||
69 | * Maximum number of bricks in all partitions and in all coherency domains. | ||
70 | * This is the total number of bricks accessible in the numalink fabric. It | ||
71 | * includes all C & M bricks. Routers are NOT included. | ||
72 | * | ||
73 | * This value is also the value of the maximum number of non-router NASIDs | ||
74 | * in the numalink fabric. | ||
75 | * | ||
76 | * NOTE: a brick may contain 1 or 2 OS nodes. Don't get these confused. | ||
77 | */ | ||
78 | #define UV_MAX_NUMALINK_BLADES 16384 | ||
79 | |||
80 | /* | ||
81 | * Maximum number of C/Mbricks within a software SSI (hardware may support | ||
82 | * more). | ||
83 | */ | ||
84 | #define UV_MAX_SSI_BLADES 1 | ||
85 | |||
86 | /* | ||
87 | * The largest possible NASID of a C or M brick (+ 2) | ||
88 | */ | ||
89 | #define UV_MAX_NASID_VALUE (UV_MAX_NUMALINK_NODES * 2) | ||
90 | |||
91 | /* | ||
92 | * The following defines attributes of the HUB chip. These attributes are | ||
93 | * frequently referenced and are kept in the per-cpu data areas of each cpu. | ||
94 | * They are kept together in a struct to minimize cache misses. | ||
95 | */ | ||
96 | struct uv_hub_info_s { | ||
97 | unsigned long global_mmr_base; | ||
98 | unsigned long gpa_mask; | ||
99 | unsigned long gnode_upper; | ||
100 | unsigned long lowmem_remap_top; | ||
101 | unsigned long lowmem_remap_base; | ||
102 | unsigned short pnode; | ||
103 | unsigned short pnode_mask; | ||
104 | unsigned short coherency_domain_number; | ||
105 | unsigned short numa_blade_id; | ||
106 | unsigned char blade_processor_id; | ||
107 | unsigned char m_val; | ||
108 | unsigned char n_val; | ||
109 | }; | ||
110 | DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info); | ||
111 | #define uv_hub_info (&__get_cpu_var(__uv_hub_info)) | ||
112 | #define uv_cpu_hub_info(cpu) (&per_cpu(__uv_hub_info, cpu)) | ||
113 | |||
114 | /* | ||
115 | * Local & Global MMR space macros. | ||
116 | * Note: macros are intended to be used ONLY by inline functions | ||
117 | * in this file - not by other kernel code. | ||
118 | * n - NASID (full 15-bit global nasid) | ||
119 | * g - GNODE (full 15-bit global nasid, right shifted 1) | ||
120 | * p - PNODE (local part of nsids, right shifted 1) | ||
121 | */ | ||
122 | #define UV_NASID_TO_PNODE(n) (((n) >> 1) & uv_hub_info->pnode_mask) | ||
123 | #define UV_PNODE_TO_NASID(p) (((p) << 1) | uv_hub_info->gnode_upper) | ||
124 | |||
125 | #define UV_LOCAL_MMR_BASE 0xf4000000UL | ||
126 | #define UV_GLOBAL_MMR32_BASE 0xf8000000UL | ||
127 | #define UV_GLOBAL_MMR64_BASE (uv_hub_info->global_mmr_base) | ||
128 | |||
129 | #define UV_GLOBAL_MMR32_PNODE_SHIFT 15 | ||
130 | #define UV_GLOBAL_MMR64_PNODE_SHIFT 26 | ||
131 | |||
132 | #define UV_GLOBAL_MMR32_PNODE_BITS(p) ((p) << (UV_GLOBAL_MMR32_PNODE_SHIFT)) | ||
133 | |||
134 | #define UV_GLOBAL_MMR64_PNODE_BITS(p) \ | ||
135 | ((unsigned long)(p) << UV_GLOBAL_MMR64_PNODE_SHIFT) | ||
136 | |||
137 | /* | ||
138 | * Macros for converting between kernel virtual addresses, socket local physical | ||
139 | * addresses, and UV global physical addresses. | ||
140 | * Note: use the standard __pa() & __va() macros for converting | ||
141 | * between socket virtual and socket physical addresses. | ||
142 | */ | ||
143 | |||
144 | /* socket phys RAM --> UV global physical address */ | ||
145 | static inline unsigned long uv_soc_phys_ram_to_gpa(unsigned long paddr) | ||
146 | { | ||
147 | if (paddr < uv_hub_info->lowmem_remap_top) | ||
148 | paddr += uv_hub_info->lowmem_remap_base; | ||
149 | return paddr | uv_hub_info->gnode_upper; | ||
150 | } | ||
151 | |||
152 | |||
153 | /* socket virtual --> UV global physical address */ | ||
154 | static inline unsigned long uv_gpa(void *v) | ||
155 | { | ||
156 | return __pa(v) | uv_hub_info->gnode_upper; | ||
157 | } | ||
158 | |||
159 | /* socket virtual --> UV global physical address */ | ||
160 | static inline void *uv_vgpa(void *v) | ||
161 | { | ||
162 | return (void *)uv_gpa(v); | ||
163 | } | ||
164 | |||
165 | /* UV global physical address --> socket virtual */ | ||
166 | static inline void *uv_va(unsigned long gpa) | ||
167 | { | ||
168 | return __va(gpa & uv_hub_info->gpa_mask); | ||
169 | } | ||
170 | |||
171 | /* pnode, offset --> socket virtual */ | ||
172 | static inline void *uv_pnode_offset_to_vaddr(int pnode, unsigned long offset) | ||
173 | { | ||
174 | return __va(((unsigned long)pnode << uv_hub_info->m_val) | offset); | ||
175 | } | ||
176 | |||
177 | |||
178 | /* | ||
179 | * Access global MMRs using the low memory MMR32 space. This region supports | ||
180 | * faster MMR access but not all MMRs are accessible in this space. | ||
181 | */ | ||
182 | static inline unsigned long *uv_global_mmr32_address(int pnode, | ||
183 | unsigned long offset) | ||
184 | { | ||
185 | return __va(UV_GLOBAL_MMR32_BASE | | ||
186 | UV_GLOBAL_MMR32_PNODE_BITS(pnode) | offset); | ||
187 | } | ||
188 | |||
189 | static inline void uv_write_global_mmr32(int pnode, unsigned long offset, | ||
190 | unsigned long val) | ||
191 | { | ||
192 | *uv_global_mmr32_address(pnode, offset) = val; | ||
193 | } | ||
194 | |||
195 | static inline unsigned long uv_read_global_mmr32(int pnode, | ||
196 | unsigned long offset) | ||
197 | { | ||
198 | return *uv_global_mmr32_address(pnode, offset); | ||
199 | } | ||
200 | |||
201 | /* | ||
202 | * Access Global MMR space using the MMR space located at the top of physical | ||
203 | * memory. | ||
204 | */ | ||
205 | static inline unsigned long *uv_global_mmr64_address(int pnode, | ||
206 | unsigned long offset) | ||
207 | { | ||
208 | return __va(UV_GLOBAL_MMR64_BASE | | ||
209 | UV_GLOBAL_MMR64_PNODE_BITS(pnode) | offset); | ||
210 | } | ||
211 | |||
212 | static inline void uv_write_global_mmr64(int pnode, unsigned long offset, | ||
213 | unsigned long val) | ||
214 | { | ||
215 | *uv_global_mmr64_address(pnode, offset) = val; | ||
216 | } | ||
217 | |||
218 | static inline unsigned long uv_read_global_mmr64(int pnode, | ||
219 | unsigned long offset) | ||
220 | { | ||
221 | return *uv_global_mmr64_address(pnode, offset); | ||
222 | } | ||
223 | |||
224 | /* | ||
225 | * Access hub local MMRs. Faster than using global space but only local MMRs | ||
226 | * are accessible. | ||
227 | */ | ||
228 | static inline unsigned long *uv_local_mmr_address(unsigned long offset) | ||
229 | { | ||
230 | return __va(UV_LOCAL_MMR_BASE | offset); | ||
231 | } | ||
232 | |||
233 | static inline unsigned long uv_read_local_mmr(unsigned long offset) | ||
234 | { | ||
235 | return *uv_local_mmr_address(offset); | ||
236 | } | ||
237 | |||
238 | static inline void uv_write_local_mmr(unsigned long offset, unsigned long val) | ||
239 | { | ||
240 | *uv_local_mmr_address(offset) = val; | ||
241 | } | ||
242 | |||
243 | /* | ||
244 | * Structures and definitions for converting between cpu, node, pnode, and blade | ||
245 | * numbers. | ||
246 | */ | ||
247 | |||
248 | /* Blade-local cpu number of current cpu. Numbered 0 .. <# cpus on the blade> */ | ||
249 | static inline int uv_blade_processor_id(void) | ||
250 | { | ||
251 | return smp_processor_id(); | ||
252 | } | ||
253 | |||
254 | /* Blade number of current cpu. Numnbered 0 .. <#blades -1> */ | ||
255 | static inline int uv_numa_blade_id(void) | ||
256 | { | ||
257 | return 0; | ||
258 | } | ||
259 | |||
260 | /* Convert a cpu number to the the UV blade number */ | ||
261 | static inline int uv_cpu_to_blade_id(int cpu) | ||
262 | { | ||
263 | return 0; | ||
264 | } | ||
265 | |||
266 | /* Convert linux node number to the UV blade number */ | ||
267 | static inline int uv_node_to_blade_id(int nid) | ||
268 | { | ||
269 | return 0; | ||
270 | } | ||
271 | |||
272 | /* Convert a blade id to the PNODE of the blade */ | ||
273 | static inline int uv_blade_to_pnode(int bid) | ||
274 | { | ||
275 | return 0; | ||
276 | } | ||
277 | |||
278 | /* Determine the number of possible cpus on a blade */ | ||
279 | static inline int uv_blade_nr_possible_cpus(int bid) | ||
280 | { | ||
281 | return num_possible_cpus(); | ||
282 | } | ||
283 | |||
284 | /* Determine the number of online cpus on a blade */ | ||
285 | static inline int uv_blade_nr_online_cpus(int bid) | ||
286 | { | ||
287 | return num_online_cpus(); | ||
288 | } | ||
289 | |||
290 | /* Convert a cpu id to the PNODE of the blade containing the cpu */ | ||
291 | static inline int uv_cpu_to_pnode(int cpu) | ||
292 | { | ||
293 | return 0; | ||
294 | } | ||
295 | |||
296 | /* Convert a linux node number to the PNODE of the blade */ | ||
297 | static inline int uv_node_to_pnode(int nid) | ||
298 | { | ||
299 | return 0; | ||
300 | } | ||
301 | |||
302 | /* Maximum possible number of blades */ | ||
303 | static inline int uv_num_possible_blades(void) | ||
304 | { | ||
305 | return 1; | ||
306 | } | ||
307 | |||
308 | #endif /* __ASM_IA64_UV_HUB__ */ | ||
309 | |||
diff --git a/include/asm-ia64/uv/uv_mmrs.h b/include/asm-ia64/uv/uv_mmrs.h new file mode 100644 index 000000000000..1cc1dbb0182f --- /dev/null +++ b/include/asm-ia64/uv/uv_mmrs.h | |||
@@ -0,0 +1,266 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * SGI UV MMR definitions | ||
7 | * | ||
8 | * Copyright (C) 2007-2008 Silicon Graphics, Inc. All rights reserved. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_IA64_UV_MMRS__ | ||
12 | #define __ASM_IA64_UV_MMRS__ | ||
13 | |||
14 | /* | ||
15 | * AUTO GENERATED - Do not edit | ||
16 | */ | ||
17 | |||
18 | #define UV_MMR_ENABLE (1UL << 63) | ||
19 | |||
20 | /* ========================================================================= */ | ||
21 | /* UVH_NODE_ID */ | ||
22 | /* ========================================================================= */ | ||
23 | #define UVH_NODE_ID 0x0UL | ||
24 | |||
25 | #define UVH_NODE_ID_FORCE1_SHFT 0 | ||
26 | #define UVH_NODE_ID_FORCE1_MASK 0x0000000000000001UL | ||
27 | #define UVH_NODE_ID_MANUFACTURER_SHFT 1 | ||
28 | #define UVH_NODE_ID_MANUFACTURER_MASK 0x0000000000000ffeUL | ||
29 | #define UVH_NODE_ID_PART_NUMBER_SHFT 12 | ||
30 | #define UVH_NODE_ID_PART_NUMBER_MASK 0x000000000ffff000UL | ||
31 | #define UVH_NODE_ID_REVISION_SHFT 28 | ||
32 | #define UVH_NODE_ID_REVISION_MASK 0x00000000f0000000UL | ||
33 | #define UVH_NODE_ID_NODE_ID_SHFT 32 | ||
34 | #define UVH_NODE_ID_NODE_ID_MASK 0x00007fff00000000UL | ||
35 | #define UVH_NODE_ID_NODES_PER_BIT_SHFT 48 | ||
36 | #define UVH_NODE_ID_NODES_PER_BIT_MASK 0x007f000000000000UL | ||
37 | #define UVH_NODE_ID_NI_PORT_SHFT 56 | ||
38 | #define UVH_NODE_ID_NI_PORT_MASK 0x0f00000000000000UL | ||
39 | |||
40 | union uvh_node_id_u { | ||
41 | unsigned long v; | ||
42 | struct uvh_node_id_s { | ||
43 | unsigned long force1 : 1; /* RO */ | ||
44 | unsigned long manufacturer : 11; /* RO */ | ||
45 | unsigned long part_number : 16; /* RO */ | ||
46 | unsigned long revision : 4; /* RO */ | ||
47 | unsigned long node_id : 15; /* RW */ | ||
48 | unsigned long rsvd_47 : 1; /* */ | ||
49 | unsigned long nodes_per_bit : 7; /* RW */ | ||
50 | unsigned long rsvd_55 : 1; /* */ | ||
51 | unsigned long ni_port : 4; /* RO */ | ||
52 | unsigned long rsvd_60_63 : 4; /* */ | ||
53 | } s; | ||
54 | }; | ||
55 | |||
56 | /* ========================================================================= */ | ||
57 | /* UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR */ | ||
58 | /* ========================================================================= */ | ||
59 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR 0x16000d0UL | ||
60 | |||
61 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR_DEST_BASE_SHFT 24 | ||
62 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_0_MMR_DEST_BASE_MASK 0x00003fffff000000UL | ||
63 | |||
64 | union uvh_rh_gam_alias210_redirect_config_0_mmr_u { | ||
65 | unsigned long v; | ||
66 | struct uvh_rh_gam_alias210_redirect_config_0_mmr_s { | ||
67 | unsigned long rsvd_0_23 : 24; /* */ | ||
68 | unsigned long dest_base : 22; /* RW */ | ||
69 | unsigned long rsvd_46_63: 18; /* */ | ||
70 | } s; | ||
71 | }; | ||
72 | |||
73 | /* ========================================================================= */ | ||
74 | /* UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR */ | ||
75 | /* ========================================================================= */ | ||
76 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR 0x16000e0UL | ||
77 | |||
78 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR_DEST_BASE_SHFT 24 | ||
79 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_1_MMR_DEST_BASE_MASK 0x00003fffff000000UL | ||
80 | |||
81 | union uvh_rh_gam_alias210_redirect_config_1_mmr_u { | ||
82 | unsigned long v; | ||
83 | struct uvh_rh_gam_alias210_redirect_config_1_mmr_s { | ||
84 | unsigned long rsvd_0_23 : 24; /* */ | ||
85 | unsigned long dest_base : 22; /* RW */ | ||
86 | unsigned long rsvd_46_63: 18; /* */ | ||
87 | } s; | ||
88 | }; | ||
89 | |||
90 | /* ========================================================================= */ | ||
91 | /* UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR */ | ||
92 | /* ========================================================================= */ | ||
93 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR 0x16000f0UL | ||
94 | |||
95 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR_DEST_BASE_SHFT 24 | ||
96 | #define UVH_RH_GAM_ALIAS210_REDIRECT_CONFIG_2_MMR_DEST_BASE_MASK 0x00003fffff000000UL | ||
97 | |||
98 | union uvh_rh_gam_alias210_redirect_config_2_mmr_u { | ||
99 | unsigned long v; | ||
100 | struct uvh_rh_gam_alias210_redirect_config_2_mmr_s { | ||
101 | unsigned long rsvd_0_23 : 24; /* */ | ||
102 | unsigned long dest_base : 22; /* RW */ | ||
103 | unsigned long rsvd_46_63: 18; /* */ | ||
104 | } s; | ||
105 | }; | ||
106 | |||
107 | /* ========================================================================= */ | ||
108 | /* UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR */ | ||
109 | /* ========================================================================= */ | ||
110 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR 0x1600010UL | ||
111 | |||
112 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_BASE_SHFT 28 | ||
113 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_BASE_MASK 0x00003ffff0000000UL | ||
114 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_GR4_SHFT 46 | ||
115 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_GR4_MASK 0x0000400000000000UL | ||
116 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_N_GRU_SHFT 52 | ||
117 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_N_GRU_MASK 0x00f0000000000000UL | ||
118 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_ENABLE_SHFT 63 | ||
119 | #define UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR_ENABLE_MASK 0x8000000000000000UL | ||
120 | |||
121 | union uvh_rh_gam_gru_overlay_config_mmr_u { | ||
122 | unsigned long v; | ||
123 | struct uvh_rh_gam_gru_overlay_config_mmr_s { | ||
124 | unsigned long rsvd_0_27: 28; /* */ | ||
125 | unsigned long base : 18; /* RW */ | ||
126 | unsigned long gr4 : 1; /* RW */ | ||
127 | unsigned long rsvd_47_51: 5; /* */ | ||
128 | unsigned long n_gru : 4; /* RW */ | ||
129 | unsigned long rsvd_56_62: 7; /* */ | ||
130 | unsigned long enable : 1; /* RW */ | ||
131 | } s; | ||
132 | }; | ||
133 | |||
134 | /* ========================================================================= */ | ||
135 | /* UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR */ | ||
136 | /* ========================================================================= */ | ||
137 | #define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR 0x1600028UL | ||
138 | |||
139 | #define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_BASE_SHFT 26 | ||
140 | #define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_BASE_MASK 0x00003ffffc000000UL | ||
141 | #define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_DUAL_HUB_SHFT 46 | ||
142 | #define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_DUAL_HUB_MASK 0x0000400000000000UL | ||
143 | #define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_ENABLE_SHFT 63 | ||
144 | #define UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR_ENABLE_MASK 0x8000000000000000UL | ||
145 | |||
146 | union uvh_rh_gam_mmr_overlay_config_mmr_u { | ||
147 | unsigned long v; | ||
148 | struct uvh_rh_gam_mmr_overlay_config_mmr_s { | ||
149 | unsigned long rsvd_0_25: 26; /* */ | ||
150 | unsigned long base : 20; /* RW */ | ||
151 | unsigned long dual_hub : 1; /* RW */ | ||
152 | unsigned long rsvd_47_62: 16; /* */ | ||
153 | unsigned long enable : 1; /* RW */ | ||
154 | } s; | ||
155 | }; | ||
156 | |||
157 | /* ========================================================================= */ | ||
158 | /* UVH_RTC */ | ||
159 | /* ========================================================================= */ | ||
160 | #define UVH_RTC 0x28000UL | ||
161 | |||
162 | #define UVH_RTC_REAL_TIME_CLOCK_SHFT 0 | ||
163 | #define UVH_RTC_REAL_TIME_CLOCK_MASK 0x00ffffffffffffffUL | ||
164 | |||
165 | union uvh_rtc_u { | ||
166 | unsigned long v; | ||
167 | struct uvh_rtc_s { | ||
168 | unsigned long real_time_clock : 56; /* RW */ | ||
169 | unsigned long rsvd_56_63 : 8; /* */ | ||
170 | } s; | ||
171 | }; | ||
172 | |||
173 | /* ========================================================================= */ | ||
174 | /* UVH_SI_ADDR_MAP_CONFIG */ | ||
175 | /* ========================================================================= */ | ||
176 | #define UVH_SI_ADDR_MAP_CONFIG 0xc80000UL | ||
177 | |||
178 | #define UVH_SI_ADDR_MAP_CONFIG_M_SKT_SHFT 0 | ||
179 | #define UVH_SI_ADDR_MAP_CONFIG_M_SKT_MASK 0x000000000000003fUL | ||
180 | #define UVH_SI_ADDR_MAP_CONFIG_N_SKT_SHFT 8 | ||
181 | #define UVH_SI_ADDR_MAP_CONFIG_N_SKT_MASK 0x0000000000000f00UL | ||
182 | |||
183 | union uvh_si_addr_map_config_u { | ||
184 | unsigned long v; | ||
185 | struct uvh_si_addr_map_config_s { | ||
186 | unsigned long m_skt : 6; /* RW */ | ||
187 | unsigned long rsvd_6_7: 2; /* */ | ||
188 | unsigned long n_skt : 4; /* RW */ | ||
189 | unsigned long rsvd_12_63: 52; /* */ | ||
190 | } s; | ||
191 | }; | ||
192 | |||
193 | /* ========================================================================= */ | ||
194 | /* UVH_SI_ALIAS0_OVERLAY_CONFIG */ | ||
195 | /* ========================================================================= */ | ||
196 | #define UVH_SI_ALIAS0_OVERLAY_CONFIG 0xc80008UL | ||
197 | |||
198 | #define UVH_SI_ALIAS0_OVERLAY_CONFIG_BASE_SHFT 24 | ||
199 | #define UVH_SI_ALIAS0_OVERLAY_CONFIG_BASE_MASK 0x00000000ff000000UL | ||
200 | #define UVH_SI_ALIAS0_OVERLAY_CONFIG_M_ALIAS_SHFT 48 | ||
201 | #define UVH_SI_ALIAS0_OVERLAY_CONFIG_M_ALIAS_MASK 0x001f000000000000UL | ||
202 | #define UVH_SI_ALIAS0_OVERLAY_CONFIG_ENABLE_SHFT 63 | ||
203 | #define UVH_SI_ALIAS0_OVERLAY_CONFIG_ENABLE_MASK 0x8000000000000000UL | ||
204 | |||
205 | union uvh_si_alias0_overlay_config_u { | ||
206 | unsigned long v; | ||
207 | struct uvh_si_alias0_overlay_config_s { | ||
208 | unsigned long rsvd_0_23: 24; /* */ | ||
209 | unsigned long base : 8; /* RW */ | ||
210 | unsigned long rsvd_32_47: 16; /* */ | ||
211 | unsigned long m_alias : 5; /* RW */ | ||
212 | unsigned long rsvd_53_62: 10; /* */ | ||
213 | unsigned long enable : 1; /* RW */ | ||
214 | } s; | ||
215 | }; | ||
216 | |||
217 | /* ========================================================================= */ | ||
218 | /* UVH_SI_ALIAS1_OVERLAY_CONFIG */ | ||
219 | /* ========================================================================= */ | ||
220 | #define UVH_SI_ALIAS1_OVERLAY_CONFIG 0xc80010UL | ||
221 | |||
222 | #define UVH_SI_ALIAS1_OVERLAY_CONFIG_BASE_SHFT 24 | ||
223 | #define UVH_SI_ALIAS1_OVERLAY_CONFIG_BASE_MASK 0x00000000ff000000UL | ||
224 | #define UVH_SI_ALIAS1_OVERLAY_CONFIG_M_ALIAS_SHFT 48 | ||
225 | #define UVH_SI_ALIAS1_OVERLAY_CONFIG_M_ALIAS_MASK 0x001f000000000000UL | ||
226 | #define UVH_SI_ALIAS1_OVERLAY_CONFIG_ENABLE_SHFT 63 | ||
227 | #define UVH_SI_ALIAS1_OVERLAY_CONFIG_ENABLE_MASK 0x8000000000000000UL | ||
228 | |||
229 | union uvh_si_alias1_overlay_config_u { | ||
230 | unsigned long v; | ||
231 | struct uvh_si_alias1_overlay_config_s { | ||
232 | unsigned long rsvd_0_23: 24; /* */ | ||
233 | unsigned long base : 8; /* RW */ | ||
234 | unsigned long rsvd_32_47: 16; /* */ | ||
235 | unsigned long m_alias : 5; /* RW */ | ||
236 | unsigned long rsvd_53_62: 10; /* */ | ||
237 | unsigned long enable : 1; /* RW */ | ||
238 | } s; | ||
239 | }; | ||
240 | |||
241 | /* ========================================================================= */ | ||
242 | /* UVH_SI_ALIAS2_OVERLAY_CONFIG */ | ||
243 | /* ========================================================================= */ | ||
244 | #define UVH_SI_ALIAS2_OVERLAY_CONFIG 0xc80018UL | ||
245 | |||
246 | #define UVH_SI_ALIAS2_OVERLAY_CONFIG_BASE_SHFT 24 | ||
247 | #define UVH_SI_ALIAS2_OVERLAY_CONFIG_BASE_MASK 0x00000000ff000000UL | ||
248 | #define UVH_SI_ALIAS2_OVERLAY_CONFIG_M_ALIAS_SHFT 48 | ||
249 | #define UVH_SI_ALIAS2_OVERLAY_CONFIG_M_ALIAS_MASK 0x001f000000000000UL | ||
250 | #define UVH_SI_ALIAS2_OVERLAY_CONFIG_ENABLE_SHFT 63 | ||
251 | #define UVH_SI_ALIAS2_OVERLAY_CONFIG_ENABLE_MASK 0x8000000000000000UL | ||
252 | |||
253 | union uvh_si_alias2_overlay_config_u { | ||
254 | unsigned long v; | ||
255 | struct uvh_si_alias2_overlay_config_s { | ||
256 | unsigned long rsvd_0_23: 24; /* */ | ||
257 | unsigned long base : 8; /* RW */ | ||
258 | unsigned long rsvd_32_47: 16; /* */ | ||
259 | unsigned long m_alias : 5; /* RW */ | ||
260 | unsigned long rsvd_53_62: 10; /* */ | ||
261 | unsigned long enable : 1; /* RW */ | ||
262 | } s; | ||
263 | }; | ||
264 | |||
265 | |||
266 | #endif /* __ASM_IA64_UV_MMRS__ */ | ||
diff --git a/include/asm-parisc/assembly.h b/include/asm-parisc/assembly.h index 5587f0023881..ffb208840ecc 100644 --- a/include/asm-parisc/assembly.h +++ b/include/asm-parisc/assembly.h | |||
@@ -31,9 +31,8 @@ | |||
31 | #define STREGM std,ma | 31 | #define STREGM std,ma |
32 | #define SHRREG shrd | 32 | #define SHRREG shrd |
33 | #define SHLREG shld | 33 | #define SHLREG shld |
34 | #define ADDIB addib,* | ||
35 | #define CMPB cmpb,* | ||
36 | #define ANDCM andcm,* | 34 | #define ANDCM andcm,* |
35 | #define COND(x) * ## x | ||
37 | #define RP_OFFSET 16 | 36 | #define RP_OFFSET 16 |
38 | #define FRAME_SIZE 128 | 37 | #define FRAME_SIZE 128 |
39 | #define CALLEE_REG_FRAME_SIZE 144 | 38 | #define CALLEE_REG_FRAME_SIZE 144 |
@@ -46,9 +45,8 @@ | |||
46 | #define STREGM stwm | 45 | #define STREGM stwm |
47 | #define SHRREG shr | 46 | #define SHRREG shr |
48 | #define SHLREG shlw | 47 | #define SHLREG shlw |
49 | #define ADDIB addib, | ||
50 | #define CMPB cmpb, | ||
51 | #define ANDCM andcm | 48 | #define ANDCM andcm |
49 | #define COND(x) x | ||
52 | #define RP_OFFSET 20 | 50 | #define RP_OFFSET 20 |
53 | #define FRAME_SIZE 64 | 51 | #define FRAME_SIZE 64 |
54 | #define CALLEE_REG_FRAME_SIZE 128 | 52 | #define CALLEE_REG_FRAME_SIZE 128 |
diff --git a/include/asm-parisc/ioctl.h b/include/asm-parisc/ioctl.h index 68338d2bda4e..ec8efa02beda 100644 --- a/include/asm-parisc/ioctl.h +++ b/include/asm-parisc/ioctl.h | |||
@@ -32,21 +32,6 @@ | |||
32 | * NOTE: This limits the max parameter size to 16kB -1 ! | 32 | * NOTE: This limits the max parameter size to 16kB -1 ! |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #define _IOC_NRBITS 8 | ||
36 | #define _IOC_TYPEBITS 8 | ||
37 | #define _IOC_SIZEBITS 14 | ||
38 | #define _IOC_DIRBITS 2 | ||
39 | |||
40 | #define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) | ||
41 | #define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) | ||
42 | #define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) | ||
43 | #define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) | ||
44 | |||
45 | #define _IOC_NRSHIFT 0 | ||
46 | #define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) | ||
47 | #define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) | ||
48 | #define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) | ||
49 | |||
50 | /* | 35 | /* |
51 | * Direction bits. | 36 | * Direction bits. |
52 | */ | 37 | */ |
@@ -54,40 +39,6 @@ | |||
54 | #define _IOC_WRITE 2U | 39 | #define _IOC_WRITE 2U |
55 | #define _IOC_READ 1U | 40 | #define _IOC_READ 1U |
56 | 41 | ||
57 | #define _IOC(dir,type,nr,size) \ | 42 | #include <asm-generic/ioctl.h> |
58 | (((dir) << _IOC_DIRSHIFT) | \ | ||
59 | ((type) << _IOC_TYPESHIFT) | \ | ||
60 | ((nr) << _IOC_NRSHIFT) | \ | ||
61 | ((size) << _IOC_SIZESHIFT)) | ||
62 | |||
63 | /* provoke compile error for invalid uses of size argument */ | ||
64 | extern unsigned int __invalid_size_argument_for_IOC; | ||
65 | #define _IOC_TYPECHECK(t) \ | ||
66 | ((sizeof(t) == sizeof(t[1]) && \ | ||
67 | sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ | ||
68 | sizeof(t) : __invalid_size_argument_for_IOC) | ||
69 | |||
70 | /* used to create numbers */ | ||
71 | #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) | ||
72 | #define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size))) | ||
73 | #define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) | ||
74 | #define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) | ||
75 | #define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) | ||
76 | #define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) | ||
77 | #define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) | ||
78 | |||
79 | /* used to decode ioctl numbers.. */ | ||
80 | #define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) | ||
81 | #define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) | ||
82 | #define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) | ||
83 | #define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) | ||
84 | |||
85 | /* ...and for the drivers/sound files... */ | ||
86 | |||
87 | #define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) | ||
88 | #define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) | ||
89 | #define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) | ||
90 | #define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) | ||
91 | #define IOCSIZE_SHIFT (_IOC_SIZESHIFT) | ||
92 | 43 | ||
93 | #endif /* _ASM_PARISC_IOCTL_H */ | 44 | #endif /* _ASM_PARISC_IOCTL_H */ |
diff --git a/include/asm-parisc/ioctls.h b/include/asm-parisc/ioctls.h index ee84e4172c36..6747fad07a3e 100644 --- a/include/asm-parisc/ioctls.h +++ b/include/asm-parisc/ioctls.h | |||
@@ -46,6 +46,10 @@ | |||
46 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | 46 | #define TIOCSBRK 0x5427 /* BSD compatibility */ |
47 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | 47 | #define TIOCCBRK 0x5428 /* BSD compatibility */ |
48 | #define TIOCGSID _IOR('T', 20, int) /* Return the session ID of FD */ | 48 | #define TIOCGSID _IOR('T', 20, int) /* Return the session ID of FD */ |
49 | #define TCGETS2 _IOR('T',0x2A, struct termios2) | ||
50 | #define TCSETS2 _IOW('T',0x2B, struct termios2) | ||
51 | #define TCSETSW2 _IOW('T',0x2C, struct termios2) | ||
52 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | ||
49 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 53 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
50 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 54 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
51 | 55 | ||
diff --git a/include/asm-parisc/termbits.h b/include/asm-parisc/termbits.h index e847fe979684..d8bbc73b16b7 100644 --- a/include/asm-parisc/termbits.h +++ b/include/asm-parisc/termbits.h | |||
@@ -141,6 +141,7 @@ struct ktermios { | |||
141 | #define HUPCL 0002000 | 141 | #define HUPCL 0002000 |
142 | #define CLOCAL 0004000 | 142 | #define CLOCAL 0004000 |
143 | #define CBAUDEX 0010000 | 143 | #define CBAUDEX 0010000 |
144 | #define BOTHER 0010000 | ||
144 | #define B57600 0010001 | 145 | #define B57600 0010001 |
145 | #define B115200 0010002 | 146 | #define B115200 0010002 |
146 | #define B230400 0010003 | 147 | #define B230400 0010003 |
@@ -156,10 +157,12 @@ struct ktermios { | |||
156 | #define B3000000 0010015 | 157 | #define B3000000 0010015 |
157 | #define B3500000 0010016 | 158 | #define B3500000 0010016 |
158 | #define B4000000 0010017 | 159 | #define B4000000 0010017 |
159 | #define CIBAUD 002003600000 /* input baud rate (not used) */ | 160 | #define CIBAUD 002003600000 /* input baud rate */ |
160 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | 161 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ |
161 | #define CRTSCTS 020000000000 /* flow control */ | 162 | #define CRTSCTS 020000000000 /* flow control */ |
162 | 163 | ||
164 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
165 | |||
163 | 166 | ||
164 | /* c_lflag bits */ | 167 | /* c_lflag bits */ |
165 | #define ISIG 0000001 | 168 | #define ISIG 0000001 |
diff --git a/include/asm-parisc/termios.h b/include/asm-parisc/termios.h index 5345b3420475..a2a57a4548af 100644 --- a/include/asm-parisc/termios.h +++ b/include/asm-parisc/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-s390/debug.h b/include/asm-s390/debug.h index 335baf4fc64f..9450ce6e32de 100644 --- a/include/asm-s390/debug.h +++ b/include/asm-s390/debug.h | |||
@@ -120,10 +120,10 @@ debug_entry_t* debug_exception_common(debug_info_t* id, int level, | |||
120 | 120 | ||
121 | /* Debug Feature API: */ | 121 | /* Debug Feature API: */ |
122 | 122 | ||
123 | debug_info_t* debug_register(char* name, int pages, int nr_areas, | 123 | debug_info_t *debug_register(const char *name, int pages, int nr_areas, |
124 | int buf_size); | 124 | int buf_size); |
125 | 125 | ||
126 | debug_info_t *debug_register_mode(char *name, int pages, int nr_areas, | 126 | debug_info_t *debug_register_mode(const char *name, int pages, int nr_areas, |
127 | int buf_size, mode_t mode, uid_t uid, | 127 | int buf_size, mode_t mode, uid_t uid, |
128 | gid_t gid); | 128 | gid_t gid); |
129 | 129 | ||
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 82de2fb62cb7..00c1801099fa 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h | |||
@@ -83,16 +83,6 @@ __attribute__((format(printf,1,2))); | |||
83 | static inline void __check_printsym_format(const char *fmt, ...) | 83 | static inline void __check_printsym_format(const char *fmt, ...) |
84 | { | 84 | { |
85 | } | 85 | } |
86 | /* ia64 and ppc64 use function descriptors, which contain the real address */ | ||
87 | #if defined(CONFIG_IA64) || defined(CONFIG_PPC64) | ||
88 | #define print_fn_descriptor_symbol(fmt, addr) \ | ||
89 | do { \ | ||
90 | unsigned long *__faddr = (unsigned long*) addr; \ | ||
91 | print_symbol(fmt, __faddr[0]); \ | ||
92 | } while (0) | ||
93 | #else | ||
94 | #define print_fn_descriptor_symbol(fmt, addr) print_symbol(fmt, addr) | ||
95 | #endif | ||
96 | 86 | ||
97 | static inline void print_symbol(const char *fmt, unsigned long addr) | 87 | static inline void print_symbol(const char *fmt, unsigned long addr) |
98 | { | 88 | { |
@@ -101,6 +91,20 @@ static inline void print_symbol(const char *fmt, unsigned long addr) | |||
101 | __builtin_extract_return_addr((void *)addr)); | 91 | __builtin_extract_return_addr((void *)addr)); |
102 | } | 92 | } |
103 | 93 | ||
94 | /* | ||
95 | * Pretty-print a function pointer. | ||
96 | * | ||
97 | * ia64 and ppc64 function pointers are really function descriptors, | ||
98 | * which contain a pointer the real address. | ||
99 | */ | ||
100 | static inline void print_fn_descriptor_symbol(const char *fmt, void *addr) | ||
101 | { | ||
102 | #if defined(CONFIG_IA64) || defined(CONFIG_PPC64) | ||
103 | addr = *(void **)addr; | ||
104 | #endif | ||
105 | print_symbol(fmt, (unsigned long)addr); | ||
106 | } | ||
107 | |||
104 | #ifndef CONFIG_64BIT | 108 | #ifndef CONFIG_64BIT |
105 | #define print_ip_sym(ip) \ | 109 | #define print_ip_sym(ip) \ |
106 | do { \ | 110 | do { \ |
diff --git a/init/main.c b/init/main.c index f406fefa626c..f7fb20021d48 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -693,55 +693,57 @@ static int __init initcall_debug_setup(char *str) | |||
693 | } | 693 | } |
694 | __setup("initcall_debug", initcall_debug_setup); | 694 | __setup("initcall_debug", initcall_debug_setup); |
695 | 695 | ||
696 | extern initcall_t __initcall_start[], __initcall_end[]; | 696 | static void __init do_one_initcall(initcall_t fn) |
697 | |||
698 | static void __init do_initcalls(void) | ||
699 | { | 697 | { |
700 | initcall_t *call; | ||
701 | int count = preempt_count(); | 698 | int count = preempt_count(); |
699 | ktime_t t0, t1, delta; | ||
700 | char msgbuf[64]; | ||
701 | int result; | ||
702 | 702 | ||
703 | for (call = __initcall_start; call < __initcall_end; call++) { | 703 | if (initcall_debug) { |
704 | ktime_t t0, t1, delta; | 704 | print_fn_descriptor_symbol("calling %s\n", fn); |
705 | char msgbuf[40]; | 705 | t0 = ktime_get(); |
706 | int result; | 706 | } |
707 | |||
708 | if (initcall_debug) { | ||
709 | print_fn_descriptor_symbol("calling %s()\n", | ||
710 | (unsigned long) *call); | ||
711 | t0 = ktime_get(); | ||
712 | } | ||
713 | 707 | ||
714 | result = (*call)(); | 708 | result = fn(); |
715 | 709 | ||
716 | if (initcall_debug) { | 710 | if (initcall_debug) { |
717 | t1 = ktime_get(); | 711 | t1 = ktime_get(); |
718 | delta = ktime_sub(t1, t0); | 712 | delta = ktime_sub(t1, t0); |
719 | 713 | ||
720 | print_fn_descriptor_symbol("initcall %s()", | 714 | print_fn_descriptor_symbol("initcall %s", fn); |
721 | (unsigned long) *call); | 715 | printk(" returned %d after %Ld msecs\n", result, |
722 | printk(" returned %d after %Ld msecs\n", result, | 716 | (unsigned long long) delta.tv64 >> 20); |
723 | (unsigned long long) delta.tv64 >> 20); | 717 | } |
724 | } | ||
725 | 718 | ||
726 | msgbuf[0] = 0; | 719 | msgbuf[0] = 0; |
727 | 720 | ||
728 | if (result && result != -ENODEV && initcall_debug) | 721 | if (result && result != -ENODEV && initcall_debug) |
729 | sprintf(msgbuf, "error code %d ", result); | 722 | sprintf(msgbuf, "error code %d ", result); |
730 | 723 | ||
731 | if (preempt_count() != count) { | 724 | if (preempt_count() != count) { |
732 | strncat(msgbuf, "preemption imbalance ", sizeof(msgbuf)); | 725 | strlcat(msgbuf, "preemption imbalance ", sizeof(msgbuf)); |
733 | preempt_count() = count; | 726 | preempt_count() = count; |
734 | } | ||
735 | if (irqs_disabled()) { | ||
736 | strncat(msgbuf, "disabled interrupts ", sizeof(msgbuf)); | ||
737 | local_irq_enable(); | ||
738 | } | ||
739 | if (msgbuf[0]) { | ||
740 | print_fn_descriptor_symbol(KERN_WARNING "initcall %s()", | ||
741 | (unsigned long) *call); | ||
742 | printk(" returned with %s\n", msgbuf); | ||
743 | } | ||
744 | } | 727 | } |
728 | if (irqs_disabled()) { | ||
729 | strlcat(msgbuf, "disabled interrupts ", sizeof(msgbuf)); | ||
730 | local_irq_enable(); | ||
731 | } | ||
732 | if (msgbuf[0]) { | ||
733 | print_fn_descriptor_symbol(KERN_WARNING "initcall %s", fn); | ||
734 | printk(" returned with %s\n", msgbuf); | ||
735 | } | ||
736 | } | ||
737 | |||
738 | |||
739 | extern initcall_t __initcall_start[], __initcall_end[]; | ||
740 | |||
741 | static void __init do_initcalls(void) | ||
742 | { | ||
743 | initcall_t *call; | ||
744 | |||
745 | for (call = __initcall_start; call < __initcall_end; call++) | ||
746 | do_one_initcall(*call); | ||
745 | 747 | ||
746 | /* Make sure there is no pending stuff from the initcall sequence */ | 748 | /* Make sure there is no pending stuff from the initcall sequence */ |
747 | flush_scheduled_work(); | 749 | flush_scheduled_work(); |