Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge

* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge:
powerpc: Use correct sequence for putting CPU into nap mode
[PATCH] spufs: fix context-switch decrementer code
[PATCH] powerpc32: Set cpu explicitly in kernel compiles
[PATCH] powerpc/pseries: bugfix: balance calls to pci_device_put
[PATCH] powerpc: Fix machine detection in prom_init.c
[PATCH] ppc32: Fix string comparing in platform_notify_map
[PATCH] powerpc: Avoid __initcall warnings
[PATCH] powerpc: Ensure runlatch is off in the idle loop
powerpc: Fix CHRP booting - needs a define_machine call
powerpc: iSeries has only 256 IRQs

+191 -120
+6
arch/powerpc/Kconfig
··· 366 366 select U3_DART 367 367 select MPIC_BROKEN_U3 368 368 select GENERIC_TBSYNC 369 + select PPC_970_NAP 369 370 default y 370 371 371 372 config PPC_PREP ··· 384 383 select MPIC_BROKEN_U3 385 384 select GENERIC_TBSYNC 386 385 select PPC_UDBG_16550 386 + select PPC_970_NAP 387 387 default n 388 388 help 389 389 This option enables support for the Maple 970FX Evaluation Board. ··· 456 454 Bus device driver for GX bus based adapters. 457 455 458 456 config PPC_MPC106 457 + bool 458 + default n 459 + 460 + config PPC_970_NAP 459 461 bool 460 462 default n 461 463
+4
arch/powerpc/Makefile
··· 104 104 CFLAGS += -mstring 105 105 endif 106 106 107 + ifeq ($(CONFIG_6xx),y) 108 + CFLAGS += -mcpu=powerpc 109 + endif 110 + 107 111 cpu-as-$(CONFIG_PPC64BRIDGE) += -Wa,-mppc64bridge 108 112 cpu-as-$(CONFIG_4xx) += -Wa,-m405 109 113 cpu-as-$(CONFIG_6xx) += -Wa,-maltivec
+1 -1
arch/powerpc/kernel/Makefile
··· 20 20 firmware.o sysfs.o 21 21 obj-$(CONFIG_PPC64) += vdso64/ 22 22 obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o 23 - obj-$(CONFIG_POWER4) += idle_power4.o 23 + obj-$(CONFIG_PPC_970_NAP) += idle_power4.o 24 24 obj-$(CONFIG_PPC_OF) += of_device.o prom_parse.o 25 25 procfs-$(CONFIG_PPC64) := proc_ppc64.o 26 26 obj-$(CONFIG_PROC_FS) += $(procfs-y)
+1
arch/powerpc/kernel/asm-offsets.c
··· 91 91 #endif /* CONFIG_PPC64 */ 92 92 93 93 DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); 94 + DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, local_flags)); 94 95 DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count)); 95 96 DEFINE(TI_TASK, offsetof(struct thread_info, task)); 96 97 #ifdef CONFIG_PPC32
+17 -18
arch/powerpc/kernel/entry_32.S
··· 128 128 stw r12,4(r11) 129 129 #endif 130 130 b 3f 131 + 131 132 2: /* if from kernel, check interrupted DOZE/NAP mode and 132 133 * check for stack overflow 133 134 */ 135 + lwz r9,THREAD_INFO-THREAD(r12) 136 + cmplw r1,r9 /* if r1 <= current->thread_info */ 137 + ble- stack_ovf /* then the kernel stack overflowed */ 138 + 5: 134 139 #ifdef CONFIG_6xx 135 - mfspr r11,SPRN_HID0 136 - mtcr r11 137 - BEGIN_FTR_SECTION 138 - bt- 8,4f /* Check DOZE */ 139 - END_FTR_SECTION_IFSET(CPU_FTR_CAN_DOZE) 140 - BEGIN_FTR_SECTION 141 - bt- 9,4f /* Check NAP */ 142 - END_FTR_SECTION_IFSET(CPU_FTR_CAN_NAP) 140 + tophys(r9,r9) /* check local flags */ 141 + lwz r12,TI_LOCAL_FLAGS(r9) 142 + mtcrf 0x01,r12 143 + bt- 31-TLF_NAPPING,4f 143 144 #endif /* CONFIG_6xx */ 144 145 .globl transfer_to_handler_cont 145 146 transfer_to_handler_cont: 146 - lwz r11,THREAD_INFO-THREAD(r12) 147 - cmplw r1,r11 /* if r1 <= current->thread_info */ 148 - ble- stack_ovf /* then the kernel stack overflowed */ 149 147 3: 150 148 mflr r9 151 149 lwz r11,0(r9) /* virtual address of handler */ 152 150 lwz r9,4(r9) /* where to go when done */ 153 - FIX_SRR1(r10,r12) 154 151 mtspr SPRN_SRR0,r11 155 152 mtspr SPRN_SRR1,r10 156 153 mtlr r9 157 154 SYNC 158 155 RFI /* jump to handler, enable MMU */ 159 156 160 - #ifdef CONFIG_6xx 161 - 4: b power_save_6xx_restore 157 + #ifdef CONFIG_6xx 158 + 4: rlwinm r12,r12,0,~_TLF_NAPPING 159 + stw r12,TI_LOCAL_FLAGS(r9) 160 + b power_save_6xx_restore 162 161 #endif 163 162 164 163 /* ··· 166 167 */ 167 168 stack_ovf: 168 169 /* sometimes we use a statically-allocated stack, which is OK. */ 169 - lis r11,_end@h 170 - ori r11,r11,_end@l 171 - cmplw r1,r11 172 - ble 3b /* r1 <= &_end is OK */ 170 + lis r12,_end@h 171 + ori r12,r12,_end@l 172 + cmplw r1,r12 173 + ble 5b /* r1 <= &_end is OK */ 173 174 SAVE_NVGPRS(r11) 174 175 addi r3,r1,STACK_FRAME_OVERHEAD 175 176 lis r1,init_thread_union@ha
+48 -1
arch/powerpc/kernel/head_64.S
··· 376 376 bl hdlr; \ 377 377 b .ret_from_except 378 378 379 + /* 380 + * Like STD_EXCEPTION_COMMON, but for exceptions that can occur 381 + * in the idle task and therefore need the special idle handling. 382 + */ 383 + #define STD_EXCEPTION_COMMON_IDLE(trap, label, hdlr) \ 384 + .align 7; \ 385 + .globl label##_common; \ 386 + label##_common: \ 387 + EXCEPTION_PROLOG_COMMON(trap, PACA_EXGEN); \ 388 + FINISH_NAP; \ 389 + DISABLE_INTS; \ 390 + bl .save_nvgprs; \ 391 + addi r3,r1,STACK_FRAME_OVERHEAD; \ 392 + bl hdlr; \ 393 + b .ret_from_except 394 + 379 395 #define STD_EXCEPTION_COMMON_LITE(trap, label, hdlr) \ 380 396 .align 7; \ 381 397 .globl label##_common; \ 382 398 label##_common: \ 383 399 EXCEPTION_PROLOG_COMMON(trap, PACA_EXGEN); \ 400 + FINISH_NAP; \ 384 401 DISABLE_INTS; \ 385 402 bl .ppc64_runlatch_on; \ 386 403 addi r3,r1,STACK_FRAME_OVERHEAD; \ 387 404 bl hdlr; \ 388 405 b .ret_from_except_lite 406 + 407 + /* 408 + * When the idle code in power4_idle puts the CPU into NAP mode, 409 + * it has to do so in a loop, and relies on the external interrupt 410 + * and decrementer interrupt entry code to get it out of the loop. 411 + * It sets the _TLF_NAPPING bit in current_thread_info()->local_flags 412 + * to signal that it is in the loop and needs help to get out. 413 + */ 414 + #ifdef CONFIG_PPC_970_NAP 415 + #define FINISH_NAP \ 416 + BEGIN_FTR_SECTION \ 417 + clrrdi r11,r1,THREAD_SHIFT; \ 418 + ld r9,TI_LOCAL_FLAGS(r11); \ 419 + andi. r10,r9,_TLF_NAPPING; \ 420 + bnel power4_fixup_nap; \ 421 + END_FTR_SECTION_IFSET(CPU_FTR_CAN_NAP) 422 + #else 423 + #define FINISH_NAP 424 + #endif 389 425 390 426 /* 391 427 * Start of pSeries system interrupt routines ··· 808 772 .globl machine_check_common 809 773 machine_check_common: 810 774 EXCEPTION_PROLOG_COMMON(0x200, PACA_EXMC) 775 + FINISH_NAP 811 776 DISABLE_INTS 812 777 bl .save_nvgprs 813 778 addi r3,r1,STACK_FRAME_OVERHEAD ··· 820 783 STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception) 821 784 STD_EXCEPTION_COMMON(0xd00, single_step, .single_step_exception) 822 785 STD_EXCEPTION_COMMON(0xe00, trap_0e, .unknown_exception) 823 - STD_EXCEPTION_COMMON(0xf00, performance_monitor, .performance_monitor_exception) 786 + STD_EXCEPTION_COMMON_IDLE(0xf00, performance_monitor, .performance_monitor_exception) 824 787 STD_EXCEPTION_COMMON(0x1300, instruction_breakpoint, .instruction_breakpoint_exception) 825 788 #ifdef CONFIG_ALTIVEC 826 789 STD_EXCEPTION_COMMON(0x1700, altivec_assist, .altivec_assist_exception) ··· 1071 1034 .globl hardware_interrupt_entry 1072 1035 hardware_interrupt_common: 1073 1036 EXCEPTION_PROLOG_COMMON(0x500, PACA_EXGEN) 1037 + FINISH_NAP 1074 1038 hardware_interrupt_entry: 1075 1039 DISABLE_INTS 1076 1040 bl .ppc64_runlatch_on 1077 1041 addi r3,r1,STACK_FRAME_OVERHEAD 1078 1042 bl .do_IRQ 1079 1043 b .ret_from_except_lite 1044 + 1045 + #ifdef CONFIG_PPC_970_NAP 1046 + power4_fixup_nap: 1047 + andc r9,r9,r10 1048 + std r9,TI_LOCAL_FLAGS(r11) 1049 + ld r10,_LINK(r1) /* make idle task do the */ 1050 + std r10,_NIP(r1) /* equivalent of a blr */ 1051 + blr 1052 + #endif 1080 1053 1081 1054 .align 7 1082 1055 .globl alignment_common
+2 -2
arch/powerpc/kernel/idle.c
··· 50 50 51 51 set_thread_flag(TIF_POLLING_NRFLAG); 52 52 while (1) { 53 - ppc64_runlatch_off(); 54 - 55 53 while (!need_resched() && !cpu_should_die()) { 54 + ppc64_runlatch_off(); 55 + 56 56 if (ppc_md.power_save) { 57 57 clear_thread_flag(TIF_POLLING_NRFLAG); 58 58 /*
+21 -42
arch/powerpc/kernel/idle_6xx.S
··· 22 22 #include <asm/ppc_asm.h> 23 23 #include <asm/asm-offsets.h> 24 24 25 - #undef DEBUG 26 - 27 25 .text 28 26 29 27 /* ··· 107 109 dcbf 0,r4 108 110 dcbf 0,r4 109 111 END_FTR_SECTION_IFSET(CPU_FTR_NAP_DISABLE_L2_PR) 110 - #ifdef DEBUG 111 - lis r6,nap_enter_count@ha 112 - lwz r4,nap_enter_count@l(r6) 113 - addi r4,r4,1 114 - stw r4,nap_enter_count@l(r6) 115 - #endif 116 112 2: 117 113 BEGIN_FTR_SECTION 118 114 /* Go to low speed mode on some 750FX */ ··· 136 144 DSSALL 137 145 sync 138 146 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) 147 + rlwinm r9,r1,0,0,31-THREAD_SHIFT /* current thread_info */ 148 + lwz r8,TI_LOCAL_FLAGS(r9) /* set napping bit */ 149 + ori r8,r8,_TLF_NAPPING /* so when we take an exception */ 150 + stw r8,TI_LOCAL_FLAGS(r9) /* it will return to our caller */ 139 151 mfmsr r7 140 152 ori r7,r7,MSR_EE 141 153 oris r7,r7,MSR_POW@h 142 - sync 143 - isync 154 + 1: sync 144 155 mtmsr r7 145 156 isync 146 - sync 147 - blr 148 - 157 + b 1b 158 + 149 159 /* 150 160 * Return from NAP/DOZE mode, restore some CPU specific registers, 151 161 * we are called with DR/IR still off and r2 containing physical 152 - * address of current. 162 + * address of current. R11 points to the exception frame (physical 163 + * address). We have to preserve r10. 153 164 */ 154 165 _GLOBAL(power_save_6xx_restore) 155 - mfspr r11,SPRN_HID0 156 - rlwinm. r11,r11,0,10,8 /* Clear NAP & copy NAP bit !state to cr1 EQ */ 157 - cror 4*cr1+eq,4*cr0+eq,4*cr0+eq 158 - BEGIN_FTR_SECTION 159 - rlwinm r11,r11,0,9,7 /* Clear DOZE */ 160 - END_FTR_SECTION_IFSET(CPU_FTR_CAN_DOZE) 161 - mtspr SPRN_HID0, r11 166 + lwz r9,_LINK(r11) /* interrupted in ppc6xx_idle: */ 167 + stw r9,_NIP(r11) /* make it do a blr */ 162 168 163 - #ifdef DEBUG 164 - beq cr1,1f 165 - lis r11,(nap_return_count-KERNELBASE)@ha 166 - lwz r9,nap_return_count@l(r11) 167 - addi r9,r9,1 168 - stw r9,nap_return_count@l(r11) 169 - 1: 170 - #endif 171 - 172 - rlwinm r9,r1,0,0,18 173 - tophys(r9,r9) 174 - lwz r11,TI_CPU(r9) 169 + #ifdef CONFIG_SMP 170 + mfspr r12,SPRN_SPRG3 171 + lwz r11,TI_CPU(r12) /* get cpu number * 4 */ 175 172 slwi r11,r11,2 173 + #else 174 + li r11,0 175 + #endif 176 176 /* Todo make sure all these are in the same page 177 - * and load r22 (@ha part + CPU offset) only once 177 + * and load r11 (@ha part + CPU offset) only once 178 178 */ 179 179 BEGIN_FTR_SECTION 180 - beq cr1,1f 180 + mfspr r9,SPRN_HID0 181 + andis. r9,r9,HID0_NAP@h 182 + beq 1f 181 183 addis r9,r11,(nap_save_msscr0-KERNELBASE)@ha 182 184 lwz r9,nap_save_msscr0@l(r9) 183 185 mtspr SPRN_MSSCR0, r9 ··· 196 210 197 211 _GLOBAL(powersave_lowspeed) 198 212 .long 0 199 - 200 - #ifdef DEBUG 201 - _GLOBAL(nap_enter_count) 202 - .space 4 203 - _GLOBAL(nap_return_count) 204 - .space 4 205 - #endif
+7 -3
arch/powerpc/kernel/idle_power4.S
··· 35 35 DSSALL 36 36 sync 37 37 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) 38 + clrrdi r9,r1,THREAD_SHIFT /* current thread_info */ 39 + ld r8,TI_LOCAL_FLAGS(r9) /* set napping bit */ 40 + ori r8,r8,_TLF_NAPPING /* so when we take an exception */ 41 + std r8,TI_LOCAL_FLAGS(r9) /* it will return to our caller */ 38 42 mfmsr r7 39 43 ori r7,r7,MSR_EE 40 44 oris r7,r7,MSR_POW@h 41 - sync 45 + 1: sync 42 46 isync 43 47 mtmsrd r7 44 48 isync 45 - sync 46 - blr 49 + b 1b 50 +
+22 -14
arch/powerpc/kernel/irq.c
··· 272 272 * Don't use virtual irqs 0, 1, 2 for devices. 273 273 * The pcnet32 driver considers interrupt numbers < 2 to be invalid, 274 274 * and 2 is the XICS IPI interrupt. 275 - * We limit virtual irqs to 17 less than NR_IRQS so that when we 276 - * offset them by 16 (to reserve the first 16 for ISA interrupts) 277 - * we don't end up with an interrupt number >= NR_IRQS. 275 + * We limit virtual irqs to __irq_offet_value less than virt_irq_max so 276 + * that when we offset them we don't end up with an interrupt 277 + * number >= virt_irq_max. 278 278 */ 279 279 #define MIN_VIRT_IRQ 3 280 - #define MAX_VIRT_IRQ (NR_IRQS - NUM_ISA_INTERRUPTS - 1) 281 - #define NR_VIRT_IRQS (MAX_VIRT_IRQ - MIN_VIRT_IRQ + 1) 280 + 281 + unsigned int virt_irq_max; 282 + static unsigned int max_virt_irq; 283 + static unsigned int nr_virt_irqs; 282 284 283 285 void 284 286 virt_irq_init(void) 285 287 { 286 288 int i; 289 + 290 + if ((virt_irq_max == 0) || (virt_irq_max > (NR_IRQS - 1))) 291 + virt_irq_max = NR_IRQS - 1; 292 + max_virt_irq = virt_irq_max - __irq_offset_value; 293 + nr_virt_irqs = max_virt_irq - MIN_VIRT_IRQ + 1; 294 + 287 295 for (i = 0; i < NR_IRQS; i++) 288 296 virt_irq_to_real_map[i] = UNDEFINED_IRQ; 289 297 } ··· 316 308 return real_irq; 317 309 } 318 310 319 - /* map to a number between MIN_VIRT_IRQ and MAX_VIRT_IRQ */ 311 + /* map to a number between MIN_VIRT_IRQ and max_virt_irq */ 320 312 virq = real_irq; 321 - if (virq > MAX_VIRT_IRQ) 322 - virq = (virq % NR_VIRT_IRQS) + MIN_VIRT_IRQ; 313 + if (virq > max_virt_irq) 314 + virq = (virq % nr_virt_irqs) + MIN_VIRT_IRQ; 323 315 324 316 /* search for this number or a free slot */ 325 317 first_virq = virq; 326 318 while (virt_irq_to_real_map[virq] != UNDEFINED_IRQ) { 327 319 if (virt_irq_to_real_map[virq] == real_irq) 328 320 return virq; 329 - if (++virq > MAX_VIRT_IRQ) 321 + if (++virq > max_virt_irq) 330 322 virq = MIN_VIRT_IRQ; 331 323 if (virq == first_virq) 332 324 goto nospace; /* oops, no free slots */ ··· 338 330 nospace: 339 331 if (!warned) { 340 332 printk(KERN_CRIT "Interrupt table is full\n"); 341 - printk(KERN_CRIT "Increase NR_IRQS (currently %d) " 342 - "in your kernel sources and rebuild.\n", NR_IRQS); 333 + printk(KERN_CRIT "Increase virt_irq_max (currently %d) " 334 + "in your kernel sources and rebuild.\n", virt_irq_max); 343 335 warned = 1; 344 336 } 345 337 return NO_IRQ; ··· 357 349 358 350 virq = real_irq; 359 351 360 - if (virq > MAX_VIRT_IRQ) 361 - virq = (virq % NR_VIRT_IRQS) + MIN_VIRT_IRQ; 352 + if (virq > max_virt_irq) 353 + virq = (virq % nr_virt_irqs) + MIN_VIRT_IRQ; 362 354 363 355 first_virq = virq; 364 356 ··· 368 360 369 361 virq++; 370 362 371 - if (virq >= MAX_VIRT_IRQ) 363 + if (virq >= max_virt_irq) 372 364 virq = 0; 373 365 374 366 } while (first_virq != virq);
+2 -3
arch/powerpc/kernel/prom_init.c
··· 1528 1528 * non-IBM designs ! 1529 1529 * - it has /rtas 1530 1530 */ 1531 - len = prom_getprop(_prom->root, "model", 1531 + len = prom_getprop(_prom->root, "device_type", 1532 1532 compat, sizeof(compat)-1); 1533 1533 if (len <= 0) 1534 1534 return PLATFORM_GENERIC; 1535 - compat[len] = 0; 1536 - if (strcmp(compat, "chrp")) 1535 + if (strncmp(compat, RELOC("chrp"), 4)) 1537 1536 return PLATFORM_GENERIC; 1538 1537 1539 1538 /* Default to pSeries. We need to know if we are running LPAR */
+2 -2
arch/powerpc/kernel/rtas-proc.c
··· 258 258 struct proc_dir_entry *entry; 259 259 260 260 if (!machine_is(pseries)) 261 - return 1; 261 + return -ENODEV; 262 262 263 263 rtas_node = of_find_node_by_name(NULL, "rtas"); 264 264 if (rtas_node == NULL) 265 - return 1; 265 + return -ENODEV; 266 266 267 267 entry = create_proc_entry("ppc64/rtas/progress", S_IRUGO|S_IWUSR, NULL); 268 268 if (entry)
+1 -1
arch/powerpc/platforms/cell/spufs/switch.c
··· 1297 1297 cycles_t resume_time = get_cycles(); 1298 1298 cycles_t delta_time = resume_time - csa->suspend_time; 1299 1299 1300 - csa->lscsa->decr.slot[0] = delta_time; 1300 + csa->lscsa->decr.slot[0] -= delta_time; 1301 1301 } 1302 1302 } 1303 1303
+1
arch/powerpc/platforms/chrp/chrp.h
··· 9 9 10 10 extern void chrp_find_bridges(void); 11 11 extern void chrp_event_scan(unsigned long); 12 + extern void chrp_pcibios_fixup(void);
+4 -2
arch/powerpc/platforms/chrp/pci.c
··· 23 23 #include <asm/grackle.h> 24 24 #include <asm/rtas.h> 25 25 26 + #include "chrp.h" 27 + 26 28 /* LongTrail */ 27 29 void __iomem *gg2_pci_config_base; 28 30 ··· 316 314 } 317 315 318 316 /* Do not fixup interrupts from OF tree on pegasos */ 319 - if (is_pegasos == 0) 320 - ppc_md.pcibios_fixup = chrp_pcibios_fixup; 317 + if (is_pegasos) 318 + ppc_md.pcibios_fixup = NULL; 321 319 }
+20 -24
arch/powerpc/platforms/chrp/setup.c
··· 440 440 441 441 if (_chrp_type == _CHRP_Pegasos) 442 442 ppc_md.get_irq = i8259_irq; 443 - else 444 - ppc_md.get_irq = mpic_get_irq; 445 443 446 444 #if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(XMON) 447 445 /* see if there is a keyboard in the device tree ··· 526 528 /* Assume we have an 8259... */ 527 529 __irq_offset_value = NUM_ISA_INTERRUPTS; 528 530 529 - ppc_md.setup_arch = chrp_setup_arch; 530 - ppc_md.show_cpuinfo = chrp_show_cpuinfo; 531 - 532 - ppc_md.init_IRQ = chrp_init_IRQ; 533 - ppc_md.init = chrp_init2; 534 - 535 - ppc_md.phys_mem_access_prot = pci_phys_mem_access_prot; 536 - 537 - ppc_md.restart = rtas_restart; 538 - ppc_md.power_off = rtas_power_off; 539 - ppc_md.halt = rtas_halt; 540 - 541 - ppc_md.time_init = chrp_time_init; 542 - ppc_md.calibrate_decr = generic_calibrate_decr; 543 - 544 - /* this may get overridden with rtas routines later... */ 545 - ppc_md.set_rtc_time = chrp_set_rtc_time; 546 - ppc_md.get_rtc_time = chrp_get_rtc_time; 547 - 548 - #ifdef CONFIG_SMP 549 - smp_ops = &chrp_smp_ops; 550 - #endif /* CONFIG_SMP */ 531 + return 1; 551 532 } 533 + 534 + define_machine(chrp) { 535 + .name = "CHRP", 536 + .probe = chrp_probe, 537 + .setup_arch = chrp_setup_arch, 538 + .init = chrp_init2, 539 + .show_cpuinfo = chrp_show_cpuinfo, 540 + .init_IRQ = chrp_init_IRQ, 541 + .get_irq = mpic_get_irq, 542 + .pcibios_fixup = chrp_pcibios_fixup, 543 + .restart = rtas_restart, 544 + .power_off = rtas_power_off, 545 + .halt = rtas_halt, 546 + .time_init = chrp_time_init, 547 + .set_rtc_time = chrp_set_rtc_time, 548 + .get_rtc_time = chrp_get_rtc_time, 549 + .calibrate_decr = generic_calibrate_decr, 550 + .phys_mem_access_prot = pci_phys_mem_access_prot, 551 + };
+7
arch/powerpc/platforms/iseries/setup.c
··· 54 54 #include <asm/iseries/hv_lp_event.h> 55 55 #include <asm/iseries/lpar_map.h> 56 56 #include <asm/udbg.h> 57 + #include <asm/irq.h> 57 58 58 59 #include "naca.h" 59 60 #include "setup.h" ··· 684 683 685 684 powerpc_firmware_features |= FW_FEATURE_ISERIES; 686 685 powerpc_firmware_features |= FW_FEATURE_LPAR; 686 + 687 + /* 688 + * The Hypervisor only allows us up to 256 interrupt 689 + * sources (the irq number is passed in a u8). 690 + */ 691 + virt_irq_max = 255; 687 692 688 693 return 1; 689 694 }
+4 -2
arch/powerpc/platforms/pseries/eeh.c
··· 957 957 pci_addr_cache_remove_device(dev); 958 958 959 959 dn = pci_device_to_OF_node(dev); 960 - PCI_DN(dn)->pcidev = NULL; 961 - pci_dev_put (dev); 960 + if (PCI_DN(dn)->pcidev) { 961 + PCI_DN(dn)->pcidev = NULL; 962 + pci_dev_put (dev); 963 + } 962 964 } 963 965 964 966 void eeh_remove_bus_device(struct pci_dev *dev)
+1 -1
arch/powerpc/platforms/pseries/rtasd.c
··· 488 488 /* No RTAS */ 489 489 if (rtas_token("event-scan") == RTAS_UNKNOWN_SERVICE) { 490 490 printk(KERN_INFO "rtasd: no event-scan on system\n"); 491 - return 1; 491 + return -ENODEV; 492 492 } 493 493 494 494 entry = create_proc_entry("ppc64/rtas/error_log", S_IRUSR, NULL);
+5 -4
arch/ppc/syslib/ppc_sys.c
··· 156 156 while (map->bus_id != NULL) { 157 157 idx = -1; 158 158 s = strrchr(dev->bus_id, '.'); 159 - if (s != NULL) 159 + if (s != NULL) { 160 160 idx = (int)simple_strtol(s + 1, NULL, 10); 161 - else 161 + len = s - dev->bus_id; 162 + } else { 162 163 s = dev->bus_id; 163 - 164 - len = s - dev->bus_id; 164 + len = strlen(dev->bus_id); 165 + } 165 166 166 167 if (!strncmp(dev->bus_id, map->bus_id, len)) { 167 168 pdev = container_of(dev, struct platform_device, dev);
+7
include/asm-powerpc/irq.h
··· 54 54 */ 55 55 extern unsigned int virt_irq_to_real_map[NR_IRQS]; 56 56 57 + /* The maximum virtual IRQ number that we support. This 58 + * can be set by the platform and will be reduced by the 59 + * value of __irq_offset_value. It defaults to and is 60 + * capped by (NR_IRQS - 1). 61 + */ 62 + extern unsigned int virt_irq_max; 63 + 57 64 /* Create a mapping for a real_irq if it doesn't already exist. 58 65 * Return the virtual irq as a convenience. 59 66 */
+8
include/asm-powerpc/thread_info.h
··· 37 37 int preempt_count; /* 0 => preemptable, 38 38 <0 => BUG */ 39 39 struct restart_block restart_block; 40 + unsigned long local_flags; /* private flags for thread */ 41 + 40 42 /* low level flags - has atomic operations done on it */ 41 43 unsigned long flags ____cacheline_aligned_in_smp; 42 44 }; ··· 144 142 #define _TIF_USER_WORK_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ 145 143 _TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK) 146 144 #define _TIF_PERSYSCALL_MASK (_TIF_RESTOREALL|_TIF_NOERROR) 145 + 146 + /* Bits in local_flags */ 147 + /* Don't move TLF_NAPPING without adjusting the code in entry_32.S */ 148 + #define TLF_NAPPING 0 /* idle thread enabled NAP mode */ 149 + 150 + #define _TLF_NAPPING (1 << TLF_NAPPING) 147 151 148 152 #endif /* __KERNEL__ */ 149 153