aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-12-15 19:09:15 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-12-15 19:09:15 -0500
commitefdad722ef4d69eaaa8335deab0b6f55f52d7e57 (patch)
treeb50381ee7ec4c3616520124101db4a4b6bae669c /arch
parente6f08d37e6641b38b2da4ad40d6ca2cfb616a1dc (diff)
parent987706acf8e3a6e50445c5712e994b937cbdd83c (diff)
Merge branch 'ps3' into next
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/configs/ps3_defconfig39
-rw-r--r--arch/powerpc/include/asm/lv1call.h10
-rw-r--r--arch/powerpc/kernel/irq.c4
-rw-r--r--arch/powerpc/platforms/ps3/interrupt.c103
-rw-r--r--arch/powerpc/platforms/ps3/repository.c137
-rw-r--r--arch/powerpc/platforms/ps3/setup.c4
-rw-r--r--arch/powerpc/platforms/ps3/smp.c2
-rw-r--r--arch/powerpc/platforms/ps3/spu.c2
8 files changed, 154 insertions, 147 deletions
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index 185c292b0f1c..ded867871e97 100644
--- a/arch/powerpc/configs/ps3_defconfig
+++ b/arch/powerpc/configs/ps3_defconfig
@@ -6,10 +6,10 @@ CONFIG_NR_CPUS=2
6CONFIG_EXPERIMENTAL=y 6CONFIG_EXPERIMENTAL=y
7CONFIG_SYSVIPC=y 7CONFIG_SYSVIPC=y
8CONFIG_POSIX_MQUEUE=y 8CONFIG_POSIX_MQUEUE=y
9CONFIG_NAMESPACES=y 9CONFIG_SPARSE_IRQ=y
10CONFIG_BLK_DEV_INITRD=y 10CONFIG_BLK_DEV_INITRD=y
11CONFIG_EXPERT=y 11CONFIG_CC_OPTIMIZE_FOR_SIZE=y
12CONFIG_KALLSYMS_EXTRA_PASS=y 12CONFIG_EMBEDDED=y
13# CONFIG_PERF_EVENTS is not set 13# CONFIG_PERF_EVENTS is not set
14# CONFIG_COMPAT_BRK is not set 14# CONFIG_COMPAT_BRK is not set
15CONFIG_SLAB=y 15CONFIG_SLAB=y
@@ -17,6 +17,7 @@ CONFIG_PROFILING=y
17CONFIG_OPROFILE=m 17CONFIG_OPROFILE=m
18CONFIG_MODULES=y 18CONFIG_MODULES=y
19CONFIG_MODULE_UNLOAD=y 19CONFIG_MODULE_UNLOAD=y
20# CONFIG_PPC_POWERNV is not set
20# CONFIG_PPC_PSERIES is not set 21# CONFIG_PPC_PSERIES is not set
21# CONFIG_PPC_PMAC is not set 22# CONFIG_PPC_PMAC is not set
22CONFIG_PPC_PS3=y 23CONFIG_PPC_PS3=y
@@ -27,14 +28,14 @@ CONFIG_PS3_VRAM=m
27CONFIG_PS3_LPM=m 28CONFIG_PS3_LPM=m
28# CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set 29# CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
29CONFIG_HIGH_RES_TIMERS=y 30CONFIG_HIGH_RES_TIMERS=y
31# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
30CONFIG_BINFMT_MISC=y 32CONFIG_BINFMT_MISC=y
31CONFIG_KEXEC=y 33CONFIG_KEXEC=y
32CONFIG_SPARSE_IRQ=y
33# CONFIG_SPARSEMEM_VMEMMAP is not set 34# CONFIG_SPARSEMEM_VMEMMAP is not set
34CONFIG_SCHED_SMT=y 35CONFIG_SCHED_SMT=y
35CONFIG_CMDLINE_BOOL=y 36CONFIG_CMDLINE_BOOL=y
36CONFIG_CMDLINE="" 37CONFIG_CMDLINE=""
37CONFIG_PM=y 38CONFIG_PM_RUNTIME=y
38CONFIG_PM_DEBUG=y 39CONFIG_PM_DEBUG=y
39# CONFIG_SECCOMP is not set 40# CONFIG_SECCOMP is not set
40# CONFIG_PCI is not set 41# CONFIG_PCI is not set
@@ -81,20 +82,23 @@ CONFIG_SCSI_MULTI_LUN=y
81CONFIG_MD=y 82CONFIG_MD=y
82CONFIG_BLK_DEV_DM=m 83CONFIG_BLK_DEV_DM=m
83CONFIG_NETDEVICES=y 84CONFIG_NETDEVICES=y
84CONFIG_NET_ETHERNET=y 85# CONFIG_NET_VENDOR_BROADCOM is not set
86# CONFIG_NET_VENDOR_CHELSIO is not set
87# CONFIG_NET_VENDOR_INTEL is not set
88# CONFIG_NET_VENDOR_MARVELL is not set
89# CONFIG_NET_VENDOR_MICREL is not set
90# CONFIG_NET_VENDOR_NATSEMI is not set
91# CONFIG_NET_VENDOR_SEEQ is not set
92# CONFIG_NET_VENDOR_STMICRO is not set
85CONFIG_GELIC_NET=y 93CONFIG_GELIC_NET=y
86CONFIG_GELIC_WIRELESS=y 94CONFIG_GELIC_WIRELESS=y
87# CONFIG_NETDEV_10000 is not set 95# CONFIG_NET_VENDOR_XILINX is not set
88CONFIG_USB_USBNET=m 96CONFIG_USB_USBNET=m
89# CONFIG_USB_NET_CDCETHER is not set 97# CONFIG_USB_NET_CDCETHER is not set
98# CONFIG_USB_NET_CDC_NCM is not set
90# CONFIG_USB_NET_NET1080 is not set 99# CONFIG_USB_NET_NET1080 is not set
91# CONFIG_USB_NET_CDC_SUBSET is not set 100# CONFIG_USB_NET_CDC_SUBSET is not set
92# CONFIG_USB_NET_ZAURUS is not set 101# CONFIG_USB_NET_ZAURUS is not set
93CONFIG_PPP=m
94CONFIG_PPP_MULTILINK=y
95CONFIG_PPP_ASYNC=m
96CONFIG_PPP_DEFLATE=m
97CONFIG_PPPOE=m
98CONFIG_INPUT_FF_MEMLESS=m 102CONFIG_INPUT_FF_MEMLESS=m
99# CONFIG_INPUT_MOUSEDEV_PSAUX is not set 103# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
100CONFIG_INPUT_JOYDEV=m 104CONFIG_INPUT_JOYDEV=m
@@ -135,22 +139,21 @@ CONFIG_USB=m
135CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 139CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
136CONFIG_USB_DEVICEFS=y 140CONFIG_USB_DEVICEFS=y
137# CONFIG_USB_DEVICE_CLASS is not set 141# CONFIG_USB_DEVICE_CLASS is not set
142CONFIG_USB_SUSPEND=y
138CONFIG_USB_MON=m 143CONFIG_USB_MON=m
139CONFIG_USB_EHCI_HCD=m 144CONFIG_USB_EHCI_HCD=m
140CONFIG_USB_EHCI_TT_NEWSCHED=y
141# CONFIG_USB_EHCI_HCD_PPC_OF is not set 145# CONFIG_USB_EHCI_HCD_PPC_OF is not set
142CONFIG_USB_OHCI_HCD=m 146CONFIG_USB_OHCI_HCD=m
143CONFIG_USB_STORAGE=m 147CONFIG_USB_STORAGE=m
144CONFIG_RTC_CLASS=y 148CONFIG_RTC_CLASS=y
145CONFIG_RTC_DRV_PS3=m 149CONFIG_RTC_DRV_PS3=y
150# CONFIG_IOMMU_SUPPORT is not set
146CONFIG_EXT2_FS=m 151CONFIG_EXT2_FS=m
147CONFIG_EXT3_FS=m 152CONFIG_EXT3_FS=m
148# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set 153# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
149CONFIG_EXT4_FS=y 154CONFIG_EXT4_FS=y
150CONFIG_INOTIFY=y
151CONFIG_QUOTA=y 155CONFIG_QUOTA=y
152CONFIG_QFMT_V2=y 156CONFIG_QFMT_V2=y
153CONFIG_AUTOFS_FS=m
154CONFIG_AUTOFS4_FS=m 157CONFIG_AUTOFS4_FS=m
155CONFIG_ISO9660_FS=m 158CONFIG_ISO9660_FS=m
156CONFIG_JOLIET=y 159CONFIG_JOLIET=y
@@ -167,19 +170,17 @@ CONFIG_CIFS=m
167CONFIG_NLS=y 170CONFIG_NLS=y
168CONFIG_NLS_CODEPAGE_437=y 171CONFIG_NLS_CODEPAGE_437=y
169CONFIG_NLS_ISO8859_1=y 172CONFIG_NLS_ISO8859_1=y
173CONFIG_CRC_CCITT=m
170CONFIG_CRC_T10DIF=y 174CONFIG_CRC_T10DIF=y
171CONFIG_MAGIC_SYSRQ=y 175CONFIG_MAGIC_SYSRQ=y
172CONFIG_DEBUG_FS=y 176CONFIG_DEBUG_FS=y
173CONFIG_DEBUG_KERNEL=y
174CONFIG_DETECT_HUNG_TASK=y 177CONFIG_DETECT_HUNG_TASK=y
175CONFIG_PROVE_LOCKING=y 178CONFIG_PROVE_LOCKING=y
176CONFIG_DEBUG_LOCKDEP=y 179CONFIG_DEBUG_LOCKDEP=y
177CONFIG_DEBUG_SPINLOCK_SLEEP=y
178CONFIG_DEBUG_INFO=y 180CONFIG_DEBUG_INFO=y
179CONFIG_DEBUG_WRITECOUNT=y 181CONFIG_DEBUG_WRITECOUNT=y
180CONFIG_DEBUG_MEMORY_INIT=y 182CONFIG_DEBUG_MEMORY_INIT=y
181CONFIG_DEBUG_LIST=y 183CONFIG_DEBUG_LIST=y
182# CONFIG_RCU_CPU_STALL_DETECTOR is not set
183CONFIG_SYSCTL_SYSCALL_CHECK=y 184CONFIG_SYSCTL_SYSCALL_CHECK=y
184# CONFIG_FTRACE is not set 185# CONFIG_FTRACE is not set
185CONFIG_DEBUG_STACKOVERFLOW=y 186CONFIG_DEBUG_STACKOVERFLOW=y
diff --git a/arch/powerpc/include/asm/lv1call.h b/arch/powerpc/include/asm/lv1call.h
index f77c708c67a0..233f9ecae761 100644
--- a/arch/powerpc/include/asm/lv1call.h
+++ b/arch/powerpc/include/asm/lv1call.h
@@ -231,7 +231,7 @@ LV1_CALL(allocate_memory, 4, 2, 0 )
231LV1_CALL(write_htab_entry, 4, 0, 1 ) 231LV1_CALL(write_htab_entry, 4, 0, 1 )
232LV1_CALL(construct_virtual_address_space, 3, 2, 2 ) 232LV1_CALL(construct_virtual_address_space, 3, 2, 2 )
233LV1_CALL(invalidate_htab_entries, 5, 0, 3 ) 233LV1_CALL(invalidate_htab_entries, 5, 0, 3 )
234LV1_CALL(get_virtual_address_space_id_of_ppe, 1, 1, 4 ) 234LV1_CALL(get_virtual_address_space_id_of_ppe, 0, 1, 4 )
235LV1_CALL(query_logical_partition_address_region_info, 1, 5, 6 ) 235LV1_CALL(query_logical_partition_address_region_info, 1, 5, 6 )
236LV1_CALL(select_virtual_address_space, 1, 0, 7 ) 236LV1_CALL(select_virtual_address_space, 1, 0, 7 )
237LV1_CALL(pause, 1, 0, 9 ) 237LV1_CALL(pause, 1, 0, 9 )
@@ -264,7 +264,7 @@ LV1_CALL(configure_execution_time_variable, 1, 0, 77 )
264LV1_CALL(get_spe_irq_outlet, 2, 1, 78 ) 264LV1_CALL(get_spe_irq_outlet, 2, 1, 78 )
265LV1_CALL(set_spe_privilege_state_area_1_register, 3, 0, 79 ) 265LV1_CALL(set_spe_privilege_state_area_1_register, 3, 0, 79 )
266LV1_CALL(create_repository_node, 6, 0, 90 ) 266LV1_CALL(create_repository_node, 6, 0, 90 )
267LV1_CALL(get_repository_node_value, 5, 2, 91 ) 267LV1_CALL(read_repository_node, 5, 2, 91 )
268LV1_CALL(modify_repository_node_value, 6, 0, 92 ) 268LV1_CALL(modify_repository_node_value, 6, 0, 92 )
269LV1_CALL(remove_repository_node, 4, 0, 93 ) 269LV1_CALL(remove_repository_node, 4, 0, 93 )
270LV1_CALL(read_htab_entries, 2, 5, 95 ) 270LV1_CALL(read_htab_entries, 2, 5, 95 )
@@ -276,7 +276,7 @@ LV1_CALL(construct_io_irq_outlet, 1, 1, 120 )
276LV1_CALL(destruct_io_irq_outlet, 1, 0, 121 ) 276LV1_CALL(destruct_io_irq_outlet, 1, 0, 121 )
277LV1_CALL(map_htab, 1, 1, 122 ) 277LV1_CALL(map_htab, 1, 1, 122 )
278LV1_CALL(unmap_htab, 1, 0, 123 ) 278LV1_CALL(unmap_htab, 1, 0, 123 )
279LV1_CALL(get_version_info, 0, 1, 127 ) 279LV1_CALL(get_version_info, 0, 2, 127 )
280LV1_CALL(insert_htab_entry, 6, 3, 158 ) 280LV1_CALL(insert_htab_entry, 6, 3, 158 )
281LV1_CALL(read_virtual_uart, 3, 1, 162 ) 281LV1_CALL(read_virtual_uart, 3, 1, 162 )
282LV1_CALL(write_virtual_uart, 3, 1, 163 ) 282LV1_CALL(write_virtual_uart, 3, 1, 163 )
@@ -294,9 +294,9 @@ LV1_CALL(unmap_device_dma_region, 4, 0, 177 )
294LV1_CALL(net_add_multicast_address, 4, 0, 185 ) 294LV1_CALL(net_add_multicast_address, 4, 0, 185 )
295LV1_CALL(net_remove_multicast_address, 4, 0, 186 ) 295LV1_CALL(net_remove_multicast_address, 4, 0, 186 )
296LV1_CALL(net_start_tx_dma, 4, 0, 187 ) 296LV1_CALL(net_start_tx_dma, 4, 0, 187 )
297LV1_CALL(net_stop_tx_dma, 3, 0, 188 ) 297LV1_CALL(net_stop_tx_dma, 2, 0, 188 )
298LV1_CALL(net_start_rx_dma, 4, 0, 189 ) 298LV1_CALL(net_start_rx_dma, 4, 0, 189 )
299LV1_CALL(net_stop_rx_dma, 3, 0, 190 ) 299LV1_CALL(net_stop_rx_dma, 2, 0, 190 )
300LV1_CALL(net_set_interrupt_status_indicator, 4, 0, 191 ) 300LV1_CALL(net_set_interrupt_status_indicator, 4, 0, 191 )
301LV1_CALL(net_set_interrupt_mask, 4, 0, 193 ) 301LV1_CALL(net_set_interrupt_mask, 4, 0, 193 )
302LV1_CALL(net_control, 6, 2, 194 ) 302LV1_CALL(net_control, 6, 2, 194 )
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 2ff4f5e59620..701d4aceb4f4 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -186,8 +186,8 @@ notrace void arch_local_irq_restore(unsigned long en)
186 * Any HV call will have this side effect. 186 * Any HV call will have this side effect.
187 */ 187 */
188 if (firmware_has_feature(FW_FEATURE_PS3_LV1)) { 188 if (firmware_has_feature(FW_FEATURE_PS3_LV1)) {
189 u64 tmp; 189 u64 tmp, tmp2;
190 lv1_get_version_info(&tmp); 190 lv1_get_version_info(&tmp, &tmp2);
191 } 191 }
192 192
193 __hard_irq_enable(); 193 __hard_irq_enable();
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c
index 1d6f4f478fe2..617efa12a3a5 100644
--- a/arch/powerpc/platforms/ps3/interrupt.c
+++ b/arch/powerpc/platforms/ps3/interrupt.c
@@ -31,18 +31,18 @@
31 31
32#if defined(DEBUG) 32#if defined(DEBUG)
33#define DBG udbg_printf 33#define DBG udbg_printf
34#define FAIL udbg_printf
34#else 35#else
35#define DBG pr_debug 36#define DBG pr_devel
37#define FAIL pr_debug
36#endif 38#endif
37 39
38/** 40/**
39 * struct ps3_bmp - a per cpu irq status and mask bitmap structure 41 * struct ps3_bmp - a per cpu irq status and mask bitmap structure
40 * @status: 256 bit status bitmap indexed by plug 42 * @status: 256 bit status bitmap indexed by plug
41 * @unused_1: 43 * @unused_1: Alignment
42 * @mask: 256 bit mask bitmap indexed by plug 44 * @mask: 256 bit mask bitmap indexed by plug
43 * @unused_2: 45 * @unused_2: Alignment
44 * @lock:
45 * @ipi_debug_brk_mask:
46 * 46 *
47 * The HV maintains per SMT thread mappings of HV outlet to HV plug on 47 * The HV maintains per SMT thread mappings of HV outlet to HV plug on
48 * behalf of the guest. These mappings are implemented as 256 bit guest 48 * behalf of the guest. These mappings are implemented as 256 bit guest
@@ -73,21 +73,24 @@ struct ps3_bmp {
73 unsigned long mask; 73 unsigned long mask;
74 u64 unused_2[3]; 74 u64 unused_2[3];
75 }; 75 };
76 u64 ipi_debug_brk_mask;
77 spinlock_t lock;
78}; 76};
79 77
80/** 78/**
81 * struct ps3_private - a per cpu data structure 79 * struct ps3_private - a per cpu data structure
82 * @bmp: ps3_bmp structure 80 * @bmp: ps3_bmp structure
81 * @bmp_lock: Syncronize access to bmp.
82 * @ipi_debug_brk_mask: Mask for debug break IPIs
83 * @ppe_id: HV logical_ppe_id 83 * @ppe_id: HV logical_ppe_id
84 * @thread_id: HV thread_id 84 * @thread_id: HV thread_id
85 * @ipi_mask: Mask of IPI virqs
85 */ 86 */
86 87
87struct ps3_private { 88struct ps3_private {
88 struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN))); 89 struct ps3_bmp bmp __attribute__ ((aligned (PS3_BMP_MINALIGN)));
90 spinlock_t bmp_lock;
89 u64 ppe_id; 91 u64 ppe_id;
90 u64 thread_id; 92 u64 thread_id;
93 unsigned long ipi_debug_brk_mask;
91 unsigned long ipi_mask; 94 unsigned long ipi_mask;
92}; 95};
93 96
@@ -105,7 +108,7 @@ static void ps3_chip_mask(struct irq_data *d)
105 struct ps3_private *pd = irq_data_get_irq_chip_data(d); 108 struct ps3_private *pd = irq_data_get_irq_chip_data(d);
106 unsigned long flags; 109 unsigned long flags;
107 110
108 pr_debug("%s:%d: thread_id %llu, virq %d\n", __func__, __LINE__, 111 DBG("%s:%d: thread_id %llu, virq %d\n", __func__, __LINE__,
109 pd->thread_id, d->irq); 112 pd->thread_id, d->irq);
110 113
111 local_irq_save(flags); 114 local_irq_save(flags);
@@ -126,7 +129,7 @@ static void ps3_chip_unmask(struct irq_data *d)
126 struct ps3_private *pd = irq_data_get_irq_chip_data(d); 129 struct ps3_private *pd = irq_data_get_irq_chip_data(d);
127 unsigned long flags; 130 unsigned long flags;
128 131
129 pr_debug("%s:%d: thread_id %llu, virq %d\n", __func__, __LINE__, 132 DBG("%s:%d: thread_id %llu, virq %d\n", __func__, __LINE__,
130 pd->thread_id, d->irq); 133 pd->thread_id, d->irq);
131 134
132 local_irq_save(flags); 135 local_irq_save(flags);
@@ -190,19 +193,19 @@ static int ps3_virq_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
190 *virq = irq_create_mapping(NULL, outlet); 193 *virq = irq_create_mapping(NULL, outlet);
191 194
192 if (*virq == NO_IRQ) { 195 if (*virq == NO_IRQ) {
193 pr_debug("%s:%d: irq_create_mapping failed: outlet %lu\n", 196 FAIL("%s:%d: irq_create_mapping failed: outlet %lu\n",
194 __func__, __LINE__, outlet); 197 __func__, __LINE__, outlet);
195 result = -ENOMEM; 198 result = -ENOMEM;
196 goto fail_create; 199 goto fail_create;
197 } 200 }
198 201
199 pr_debug("%s:%d: outlet %lu => cpu %u, virq %u\n", __func__, __LINE__, 202 DBG("%s:%d: outlet %lu => cpu %u, virq %u\n", __func__, __LINE__,
200 outlet, cpu, *virq); 203 outlet, cpu, *virq);
201 204
202 result = irq_set_chip_data(*virq, pd); 205 result = irq_set_chip_data(*virq, pd);
203 206
204 if (result) { 207 if (result) {
205 pr_debug("%s:%d: irq_set_chip_data failed\n", 208 FAIL("%s:%d: irq_set_chip_data failed\n",
206 __func__, __LINE__); 209 __func__, __LINE__);
207 goto fail_set; 210 goto fail_set;
208 } 211 }
@@ -228,13 +231,13 @@ static int ps3_virq_destroy(unsigned int virq)
228{ 231{
229 const struct ps3_private *pd = irq_get_chip_data(virq); 232 const struct ps3_private *pd = irq_get_chip_data(virq);
230 233
231 pr_debug("%s:%d: ppe_id %llu, thread_id %llu, virq %u\n", __func__, 234 DBG("%s:%d: ppe_id %llu, thread_id %llu, virq %u\n", __func__,
232 __LINE__, pd->ppe_id, pd->thread_id, virq); 235 __LINE__, pd->ppe_id, pd->thread_id, virq);
233 236
234 irq_set_chip_data(virq, NULL); 237 irq_set_chip_data(virq, NULL);
235 irq_dispose_mapping(virq); 238 irq_dispose_mapping(virq);
236 239
237 pr_debug("%s:%d <-\n", __func__, __LINE__); 240 DBG("%s:%d <-\n", __func__, __LINE__);
238 return 0; 241 return 0;
239} 242}
240 243
@@ -257,7 +260,7 @@ int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
257 result = ps3_virq_setup(cpu, outlet, virq); 260 result = ps3_virq_setup(cpu, outlet, virq);
258 261
259 if (result) { 262 if (result) {
260 pr_debug("%s:%d: ps3_virq_setup failed\n", __func__, __LINE__); 263 FAIL("%s:%d: ps3_virq_setup failed\n", __func__, __LINE__);
261 goto fail_setup; 264 goto fail_setup;
262 } 265 }
263 266
@@ -269,7 +272,7 @@ int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
269 outlet, 0); 272 outlet, 0);
270 273
271 if (result) { 274 if (result) {
272 pr_info("%s:%d: lv1_connect_irq_plug_ext failed: %s\n", 275 FAIL("%s:%d: lv1_connect_irq_plug_ext failed: %s\n",
273 __func__, __LINE__, ps3_result(result)); 276 __func__, __LINE__, ps3_result(result));
274 result = -EPERM; 277 result = -EPERM;
275 goto fail_connect; 278 goto fail_connect;
@@ -298,7 +301,7 @@ int ps3_irq_plug_destroy(unsigned int virq)
298 int result; 301 int result;
299 const struct ps3_private *pd = irq_get_chip_data(virq); 302 const struct ps3_private *pd = irq_get_chip_data(virq);
300 303
301 pr_debug("%s:%d: ppe_id %llu, thread_id %llu, virq %u\n", __func__, 304 DBG("%s:%d: ppe_id %llu, thread_id %llu, virq %u\n", __func__,
302 __LINE__, pd->ppe_id, pd->thread_id, virq); 305 __LINE__, pd->ppe_id, pd->thread_id, virq);
303 306
304 ps3_chip_mask(irq_get_irq_data(virq)); 307 ps3_chip_mask(irq_get_irq_data(virq));
@@ -306,7 +309,7 @@ int ps3_irq_plug_destroy(unsigned int virq)
306 result = lv1_disconnect_irq_plug_ext(pd->ppe_id, pd->thread_id, virq); 309 result = lv1_disconnect_irq_plug_ext(pd->ppe_id, pd->thread_id, virq);
307 310
308 if (result) 311 if (result)
309 pr_info("%s:%d: lv1_disconnect_irq_plug_ext failed: %s\n", 312 FAIL("%s:%d: lv1_disconnect_irq_plug_ext failed: %s\n",
310 __func__, __LINE__, ps3_result(result)); 313 __func__, __LINE__, ps3_result(result));
311 314
312 ps3_virq_destroy(virq); 315 ps3_virq_destroy(virq);
@@ -334,7 +337,7 @@ int ps3_event_receive_port_setup(enum ps3_cpu_binding cpu, unsigned int *virq)
334 result = lv1_construct_event_receive_port(&outlet); 337 result = lv1_construct_event_receive_port(&outlet);
335 338
336 if (result) { 339 if (result) {
337 pr_debug("%s:%d: lv1_construct_event_receive_port failed: %s\n", 340 FAIL("%s:%d: lv1_construct_event_receive_port failed: %s\n",
338 __func__, __LINE__, ps3_result(result)); 341 __func__, __LINE__, ps3_result(result));
339 *virq = NO_IRQ; 342 *virq = NO_IRQ;
340 return result; 343 return result;
@@ -360,14 +363,14 @@ int ps3_event_receive_port_destroy(unsigned int virq)
360{ 363{
361 int result; 364 int result;
362 365
363 pr_debug(" -> %s:%d virq %u\n", __func__, __LINE__, virq); 366 DBG(" -> %s:%d virq %u\n", __func__, __LINE__, virq);
364 367
365 ps3_chip_mask(irq_get_irq_data(virq)); 368 ps3_chip_mask(irq_get_irq_data(virq));
366 369
367 result = lv1_destruct_event_receive_port(virq_to_hw(virq)); 370 result = lv1_destruct_event_receive_port(virq_to_hw(virq));
368 371
369 if (result) 372 if (result)
370 pr_debug("%s:%d: lv1_destruct_event_receive_port failed: %s\n", 373 FAIL("%s:%d: lv1_destruct_event_receive_port failed: %s\n",
371 __func__, __LINE__, ps3_result(result)); 374 __func__, __LINE__, ps3_result(result));
372 375
373 /* 376 /*
@@ -375,7 +378,7 @@ int ps3_event_receive_port_destroy(unsigned int virq)
375 * calls from interrupt context (smp_call_function) when kexecing. 378 * calls from interrupt context (smp_call_function) when kexecing.
376 */ 379 */
377 380
378 pr_debug(" <- %s:%d\n", __func__, __LINE__); 381 DBG(" <- %s:%d\n", __func__, __LINE__);
379 return result; 382 return result;
380} 383}
381 384
@@ -411,7 +414,7 @@ int ps3_sb_event_receive_port_setup(struct ps3_system_bus_device *dev,
411 dev->dev_id, virq_to_hw(*virq), dev->interrupt_id); 414 dev->dev_id, virq_to_hw(*virq), dev->interrupt_id);
412 415
413 if (result) { 416 if (result) {
414 pr_debug("%s:%d: lv1_connect_interrupt_event_receive_port" 417 FAIL("%s:%d: lv1_connect_interrupt_event_receive_port"
415 " failed: %s\n", __func__, __LINE__, 418 " failed: %s\n", __func__, __LINE__,
416 ps3_result(result)); 419 ps3_result(result));
417 ps3_event_receive_port_destroy(*virq); 420 ps3_event_receive_port_destroy(*virq);
@@ -419,7 +422,7 @@ int ps3_sb_event_receive_port_setup(struct ps3_system_bus_device *dev,
419 return result; 422 return result;
420 } 423 }
421 424
422 pr_debug("%s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__, 425 DBG("%s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__,
423 dev->interrupt_id, *virq); 426 dev->interrupt_id, *virq);
424 427
425 return 0; 428 return 0;
@@ -433,14 +436,14 @@ int ps3_sb_event_receive_port_destroy(struct ps3_system_bus_device *dev,
433 436
434 int result; 437 int result;
435 438
436 pr_debug(" -> %s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__, 439 DBG(" -> %s:%d: interrupt_id %u, virq %u\n", __func__, __LINE__,
437 dev->interrupt_id, virq); 440 dev->interrupt_id, virq);
438 441
439 result = lv1_disconnect_interrupt_event_receive_port(dev->bus_id, 442 result = lv1_disconnect_interrupt_event_receive_port(dev->bus_id,
440 dev->dev_id, virq_to_hw(virq), dev->interrupt_id); 443 dev->dev_id, virq_to_hw(virq), dev->interrupt_id);
441 444
442 if (result) 445 if (result)
443 pr_debug("%s:%d: lv1_disconnect_interrupt_event_receive_port" 446 FAIL("%s:%d: lv1_disconnect_interrupt_event_receive_port"
444 " failed: %s\n", __func__, __LINE__, 447 " failed: %s\n", __func__, __LINE__,
445 ps3_result(result)); 448 ps3_result(result));
446 449
@@ -455,7 +458,7 @@ int ps3_sb_event_receive_port_destroy(struct ps3_system_bus_device *dev,
455 result = ps3_virq_destroy(virq); 458 result = ps3_virq_destroy(virq);
456 BUG_ON(result); 459 BUG_ON(result);
457 460
458 pr_debug(" <- %s:%d\n", __func__, __LINE__); 461 DBG(" <- %s:%d\n", __func__, __LINE__);
459 return result; 462 return result;
460} 463}
461EXPORT_SYMBOL(ps3_sb_event_receive_port_destroy); 464EXPORT_SYMBOL(ps3_sb_event_receive_port_destroy);
@@ -480,7 +483,7 @@ int ps3_io_irq_setup(enum ps3_cpu_binding cpu, unsigned int interrupt_id,
480 result = lv1_construct_io_irq_outlet(interrupt_id, &outlet); 483 result = lv1_construct_io_irq_outlet(interrupt_id, &outlet);
481 484
482 if (result) { 485 if (result) {
483 pr_debug("%s:%d: lv1_construct_io_irq_outlet failed: %s\n", 486 FAIL("%s:%d: lv1_construct_io_irq_outlet failed: %s\n",
484 __func__, __LINE__, ps3_result(result)); 487 __func__, __LINE__, ps3_result(result));
485 return result; 488 return result;
486 } 489 }
@@ -510,7 +513,7 @@ int ps3_io_irq_destroy(unsigned int virq)
510 result = lv1_destruct_io_irq_outlet(outlet); 513 result = lv1_destruct_io_irq_outlet(outlet);
511 514
512 if (result) 515 if (result)
513 pr_debug("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n", 516 FAIL("%s:%d: lv1_destruct_io_irq_outlet failed: %s\n",
514 __func__, __LINE__, ps3_result(result)); 517 __func__, __LINE__, ps3_result(result));
515 518
516 return result; 519 return result;
@@ -542,7 +545,7 @@ int ps3_vuart_irq_setup(enum ps3_cpu_binding cpu, void* virt_addr_bmp,
542 result = lv1_configure_virtual_uart_irq(lpar_addr, &outlet); 545 result = lv1_configure_virtual_uart_irq(lpar_addr, &outlet);
543 546
544 if (result) { 547 if (result) {
545 pr_debug("%s:%d: lv1_configure_virtual_uart_irq failed: %s\n", 548 FAIL("%s:%d: lv1_configure_virtual_uart_irq failed: %s\n",
546 __func__, __LINE__, ps3_result(result)); 549 __func__, __LINE__, ps3_result(result));
547 return result; 550 return result;
548 } 551 }
@@ -562,7 +565,7 @@ int ps3_vuart_irq_destroy(unsigned int virq)
562 result = lv1_deconfigure_virtual_uart_irq(); 565 result = lv1_deconfigure_virtual_uart_irq();
563 566
564 if (result) { 567 if (result) {
565 pr_debug("%s:%d: lv1_configure_virtual_uart_irq failed: %s\n", 568 FAIL("%s:%d: lv1_configure_virtual_uart_irq failed: %s\n",
566 __func__, __LINE__, ps3_result(result)); 569 __func__, __LINE__, ps3_result(result));
567 return result; 570 return result;
568 } 571 }
@@ -595,7 +598,7 @@ int ps3_spe_irq_setup(enum ps3_cpu_binding cpu, unsigned long spe_id,
595 result = lv1_get_spe_irq_outlet(spe_id, class, &outlet); 598 result = lv1_get_spe_irq_outlet(spe_id, class, &outlet);
596 599
597 if (result) { 600 if (result) {
598 pr_debug("%s:%d: lv1_get_spe_irq_outlet failed: %s\n", 601 FAIL("%s:%d: lv1_get_spe_irq_outlet failed: %s\n",
599 __func__, __LINE__, ps3_result(result)); 602 __func__, __LINE__, ps3_result(result));
600 return result; 603 return result;
601 } 604 }
@@ -626,7 +629,7 @@ int ps3_spe_irq_destroy(unsigned int virq)
626static void _dump_64_bmp(const char *header, const u64 *p, unsigned cpu, 629static void _dump_64_bmp(const char *header, const u64 *p, unsigned cpu,
627 const char* func, int line) 630 const char* func, int line)
628{ 631{
629 pr_debug("%s:%d: %s %u {%04lx_%04lx_%04lx_%04lx}\n", 632 pr_debug("%s:%d: %s %u {%04llx_%04llx_%04llx_%04llx}\n",
630 func, line, header, cpu, 633 func, line, header, cpu,
631 *p >> 48, (*p >> 32) & 0xffff, (*p >> 16) & 0xffff, 634 *p >> 48, (*p >> 32) & 0xffff, (*p >> 16) & 0xffff,
632 *p & 0xffff); 635 *p & 0xffff);
@@ -635,7 +638,7 @@ static void _dump_64_bmp(const char *header, const u64 *p, unsigned cpu,
635static void __maybe_unused _dump_256_bmp(const char *header, 638static void __maybe_unused _dump_256_bmp(const char *header,
636 const u64 *p, unsigned cpu, const char* func, int line) 639 const u64 *p, unsigned cpu, const char* func, int line)
637{ 640{
638 pr_debug("%s:%d: %s %u {%016lx:%016lx:%016lx:%016lx}\n", 641 pr_debug("%s:%d: %s %u {%016llx:%016llx:%016llx:%016llx}\n",
639 func, line, header, cpu, p[0], p[1], p[2], p[3]); 642 func, line, header, cpu, p[0], p[1], p[2], p[3]);
640} 643}
641 644
@@ -644,10 +647,10 @@ static void _dump_bmp(struct ps3_private* pd, const char* func, int line)
644{ 647{
645 unsigned long flags; 648 unsigned long flags;
646 649
647 spin_lock_irqsave(&pd->bmp.lock, flags); 650 spin_lock_irqsave(&pd->bmp_lock, flags);
648 _dump_64_bmp("stat", &pd->bmp.status, pd->thread_id, func, line); 651 _dump_64_bmp("stat", &pd->bmp.status, pd->thread_id, func, line);
649 _dump_64_bmp("mask", &pd->bmp.mask, pd->thread_id, func, line); 652 _dump_64_bmp("mask", (u64*)&pd->bmp.mask, pd->thread_id, func, line);
650 spin_unlock_irqrestore(&pd->bmp.lock, flags); 653 spin_unlock_irqrestore(&pd->bmp_lock, flags);
651} 654}
652 655
653#define dump_mask(_x) _dump_mask(_x, __func__, __LINE__) 656#define dump_mask(_x) _dump_mask(_x, __func__, __LINE__)
@@ -656,9 +659,9 @@ static void __maybe_unused _dump_mask(struct ps3_private *pd,
656{ 659{
657 unsigned long flags; 660 unsigned long flags;
658 661
659 spin_lock_irqsave(&pd->bmp.lock, flags); 662 spin_lock_irqsave(&pd->bmp_lock, flags);
660 _dump_64_bmp("mask", &pd->bmp.mask, pd->thread_id, func, line); 663 _dump_64_bmp("mask", (u64*)&pd->bmp.mask, pd->thread_id, func, line);
661 spin_unlock_irqrestore(&pd->bmp.lock, flags); 664 spin_unlock_irqrestore(&pd->bmp_lock, flags);
662} 665}
663#else 666#else
664static void dump_bmp(struct ps3_private* pd) {}; 667static void dump_bmp(struct ps3_private* pd) {};
@@ -667,7 +670,7 @@ static void dump_bmp(struct ps3_private* pd) {};
667static int ps3_host_map(struct irq_host *h, unsigned int virq, 670static int ps3_host_map(struct irq_host *h, unsigned int virq,
668 irq_hw_number_t hwirq) 671 irq_hw_number_t hwirq)
669{ 672{
670 pr_debug("%s:%d: hwirq %lu, virq %u\n", __func__, __LINE__, hwirq, 673 DBG("%s:%d: hwirq %lu, virq %u\n", __func__, __LINE__, hwirq,
671 virq); 674 virq);
672 675
673 irq_set_chip_and_handler(virq, &ps3_irq_chip, handle_fasteoi_irq); 676 irq_set_chip_and_handler(virq, &ps3_irq_chip, handle_fasteoi_irq);
@@ -690,10 +693,10 @@ void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq)
690{ 693{
691 struct ps3_private *pd = &per_cpu(ps3_private, cpu); 694 struct ps3_private *pd = &per_cpu(ps3_private, cpu);
692 695
693 pd->bmp.ipi_debug_brk_mask = 0x8000000000000000UL >> virq; 696 set_bit(63 - virq, &pd->ipi_debug_brk_mask);
694 697
695 pr_debug("%s:%d: cpu %u, virq %u, mask %llxh\n", __func__, __LINE__, 698 DBG("%s:%d: cpu %u, virq %u, mask %lxh\n", __func__, __LINE__,
696 cpu, virq, pd->bmp.ipi_debug_brk_mask); 699 cpu, virq, pd->ipi_debug_brk_mask);
697} 700}
698 701
699void __init ps3_register_ipi_irq(unsigned int cpu, unsigned int virq) 702void __init ps3_register_ipi_irq(unsigned int cpu, unsigned int virq)
@@ -714,14 +717,14 @@ static unsigned int ps3_get_irq(void)
714 717
715 /* check for ipi break first to stop this cpu ASAP */ 718 /* check for ipi break first to stop this cpu ASAP */
716 719
717 if (x & pd->bmp.ipi_debug_brk_mask) 720 if (x & pd->ipi_debug_brk_mask)
718 x &= pd->bmp.ipi_debug_brk_mask; 721 x &= pd->ipi_debug_brk_mask;
719 722
720 asm volatile("cntlzd %0,%1" : "=r" (plug) : "r" (x)); 723 asm volatile("cntlzd %0,%1" : "=r" (plug) : "r" (x));
721 plug &= 0x3f; 724 plug &= 0x3f;
722 725
723 if (unlikely(plug == NO_IRQ)) { 726 if (unlikely(plug == NO_IRQ)) {
724 pr_debug("%s:%d: no plug found: thread_id %llu\n", __func__, 727 DBG("%s:%d: no plug found: thread_id %llu\n", __func__,
725 __LINE__, pd->thread_id); 728 __LINE__, pd->thread_id);
726 dump_bmp(&per_cpu(ps3_private, 0)); 729 dump_bmp(&per_cpu(ps3_private, 0));
727 dump_bmp(&per_cpu(ps3_private, 1)); 730 dump_bmp(&per_cpu(ps3_private, 1));
@@ -760,9 +763,9 @@ void __init ps3_init_IRQ(void)
760 763
761 lv1_get_logical_ppe_id(&pd->ppe_id); 764 lv1_get_logical_ppe_id(&pd->ppe_id);
762 pd->thread_id = get_hard_smp_processor_id(cpu); 765 pd->thread_id = get_hard_smp_processor_id(cpu);
763 spin_lock_init(&pd->bmp.lock); 766 spin_lock_init(&pd->bmp_lock);
764 767
765 pr_debug("%s:%d: ppe_id %llu, thread_id %llu, bmp %lxh\n", 768 DBG("%s:%d: ppe_id %llu, thread_id %llu, bmp %lxh\n",
766 __func__, __LINE__, pd->ppe_id, pd->thread_id, 769 __func__, __LINE__, pd->ppe_id, pd->thread_id,
767 ps3_mm_phys_to_lpar(__pa(&pd->bmp))); 770 ps3_mm_phys_to_lpar(__pa(&pd->bmp)));
768 771
@@ -770,7 +773,7 @@ void __init ps3_init_IRQ(void)
770 pd->thread_id, ps3_mm_phys_to_lpar(__pa(&pd->bmp))); 773 pd->thread_id, ps3_mm_phys_to_lpar(__pa(&pd->bmp)));
771 774
772 if (result) 775 if (result)
773 pr_debug("%s:%d: lv1_configure_irq_state_bitmap failed:" 776 FAIL("%s:%d: lv1_configure_irq_state_bitmap failed:"
774 " %s\n", __func__, __LINE__, 777 " %s\n", __func__, __LINE__,
775 ps3_result(result)); 778 ps3_result(result));
776 } 779 }
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index ca40f6afd35d..7bdfea336f5e 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -44,7 +44,7 @@ static void _dump_field(const char *hdr, u64 n, const char *func, int line)
44 s[i] = (in[i] <= 126 && in[i] >= 32) ? in[i] : '.'; 44 s[i] = (in[i] <= 126 && in[i] >= 32) ? in[i] : '.';
45 s[i] = 0; 45 s[i] = 0;
46 46
47 pr_debug("%s:%d: %s%016llx : %s\n", func, line, hdr, n, s); 47 pr_devel("%s:%d: %s%016llx : %s\n", func, line, hdr, n, s);
48#endif 48#endif
49} 49}
50 50
@@ -53,7 +53,7 @@ static void _dump_field(const char *hdr, u64 n, const char *func, int line)
53static void _dump_node_name(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, 53static void _dump_node_name(unsigned int lpar_id, u64 n1, u64 n2, u64 n3,
54 u64 n4, const char *func, int line) 54 u64 n4, const char *func, int line)
55{ 55{
56 pr_debug("%s:%d: lpar: %u\n", func, line, lpar_id); 56 pr_devel("%s:%d: lpar: %u\n", func, line, lpar_id);
57 _dump_field("n1: ", n1, func, line); 57 _dump_field("n1: ", n1, func, line);
58 _dump_field("n2: ", n2, func, line); 58 _dump_field("n2: ", n2, func, line);
59 _dump_field("n3: ", n3, func, line); 59 _dump_field("n3: ", n3, func, line);
@@ -65,13 +65,13 @@ static void _dump_node_name(unsigned int lpar_id, u64 n1, u64 n2, u64 n3,
65static void _dump_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4, 65static void _dump_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4,
66 u64 v1, u64 v2, const char *func, int line) 66 u64 v1, u64 v2, const char *func, int line)
67{ 67{
68 pr_debug("%s:%d: lpar: %u\n", func, line, lpar_id); 68 pr_devel("%s:%d: lpar: %u\n", func, line, lpar_id);
69 _dump_field("n1: ", n1, func, line); 69 _dump_field("n1: ", n1, func, line);
70 _dump_field("n2: ", n2, func, line); 70 _dump_field("n2: ", n2, func, line);
71 _dump_field("n3: ", n3, func, line); 71 _dump_field("n3: ", n3, func, line);
72 _dump_field("n4: ", n4, func, line); 72 _dump_field("n4: ", n4, func, line);
73 pr_debug("%s:%d: v1: %016llx\n", func, line, v1); 73 pr_devel("%s:%d: v1: %016llx\n", func, line, v1);
74 pr_debug("%s:%d: v2: %016llx\n", func, line, v2); 74 pr_devel("%s:%d: v2: %016llx\n", func, line, v2);
75} 75}
76 76
77/** 77/**
@@ -131,11 +131,11 @@ static int read_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4,
131 lpar_id = id; 131 lpar_id = id;
132 } 132 }
133 133
134 result = lv1_get_repository_node_value(lpar_id, n1, n2, n3, n4, &v1, 134 result = lv1_read_repository_node(lpar_id, n1, n2, n3, n4, &v1,
135 &v2); 135 &v2);
136 136
137 if (result) { 137 if (result) {
138 pr_debug("%s:%d: lv1_get_repository_node_value failed: %s\n", 138 pr_warn("%s:%d: lv1_read_repository_node failed: %s\n",
139 __func__, __LINE__, ps3_result(result)); 139 __func__, __LINE__, ps3_result(result));
140 dump_node_name(lpar_id, n1, n2, n3, n4); 140 dump_node_name(lpar_id, n1, n2, n3, n4);
141 return -ENOENT; 141 return -ENOENT;
@@ -149,10 +149,10 @@ static int read_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4,
149 *_v2 = v2; 149 *_v2 = v2;
150 150
151 if (v1 && !_v1) 151 if (v1 && !_v1)
152 pr_debug("%s:%d: warning: discarding non-zero v1: %016llx\n", 152 pr_devel("%s:%d: warning: discarding non-zero v1: %016llx\n",
153 __func__, __LINE__, v1); 153 __func__, __LINE__, v1);
154 if (v2 && !_v2) 154 if (v2 && !_v2)
155 pr_debug("%s:%d: warning: discarding non-zero v2: %016llx\n", 155 pr_devel("%s:%d: warning: discarding non-zero v2: %016llx\n",
156 __func__, __LINE__, v2); 156 __func__, __LINE__, v2);
157 157
158 return 0; 158 return 0;
@@ -323,16 +323,16 @@ int ps3_repository_find_device(struct ps3_repository_device *repo)
323 result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev); 323 result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev);
324 324
325 if (result) { 325 if (result) {
326 pr_debug("%s:%d read_bus_num_dev failed\n", __func__, __LINE__); 326 pr_devel("%s:%d read_bus_num_dev failed\n", __func__, __LINE__);
327 return result; 327 return result;
328 } 328 }
329 329
330 pr_debug("%s:%d: bus_type %u, bus_index %u, bus_id %llu, num_dev %u\n", 330 pr_devel("%s:%d: bus_type %u, bus_index %u, bus_id %llu, num_dev %u\n",
331 __func__, __LINE__, tmp.bus_type, tmp.bus_index, tmp.bus_id, 331 __func__, __LINE__, tmp.bus_type, tmp.bus_index, tmp.bus_id,
332 num_dev); 332 num_dev);
333 333
334 if (tmp.dev_index >= num_dev) { 334 if (tmp.dev_index >= num_dev) {
335 pr_debug("%s:%d: no device found\n", __func__, __LINE__); 335 pr_devel("%s:%d: no device found\n", __func__, __LINE__);
336 return -ENODEV; 336 return -ENODEV;
337 } 337 }
338 338
@@ -340,7 +340,7 @@ int ps3_repository_find_device(struct ps3_repository_device *repo)
340 &tmp.dev_type); 340 &tmp.dev_type);
341 341
342 if (result) { 342 if (result) {
343 pr_debug("%s:%d read_dev_type failed\n", __func__, __LINE__); 343 pr_devel("%s:%d read_dev_type failed\n", __func__, __LINE__);
344 return result; 344 return result;
345 } 345 }
346 346
@@ -348,12 +348,12 @@ int ps3_repository_find_device(struct ps3_repository_device *repo)
348 &tmp.dev_id); 348 &tmp.dev_id);
349 349
350 if (result) { 350 if (result) {
351 pr_debug("%s:%d ps3_repository_read_dev_id failed\n", __func__, 351 pr_devel("%s:%d ps3_repository_read_dev_id failed\n", __func__,
352 __LINE__); 352 __LINE__);
353 return result; 353 return result;
354 } 354 }
355 355
356 pr_debug("%s:%d: found: dev_type %u, dev_index %u, dev_id %llu\n", 356 pr_devel("%s:%d: found: dev_type %u, dev_index %u, dev_id %llu\n",
357 __func__, __LINE__, tmp.dev_type, tmp.dev_index, tmp.dev_id); 357 __func__, __LINE__, tmp.dev_type, tmp.dev_index, tmp.dev_id);
358 358
359 *repo = tmp; 359 *repo = tmp;
@@ -367,14 +367,14 @@ int ps3_repository_find_device_by_id(struct ps3_repository_device *repo,
367 struct ps3_repository_device tmp; 367 struct ps3_repository_device tmp;
368 unsigned int num_dev; 368 unsigned int num_dev;
369 369
370 pr_debug(" -> %s:%u: find device by id %llu:%llu\n", __func__, __LINE__, 370 pr_devel(" -> %s:%u: find device by id %llu:%llu\n", __func__, __LINE__,
371 bus_id, dev_id); 371 bus_id, dev_id);
372 372
373 for (tmp.bus_index = 0; tmp.bus_index < 10; tmp.bus_index++) { 373 for (tmp.bus_index = 0; tmp.bus_index < 10; tmp.bus_index++) {
374 result = ps3_repository_read_bus_id(tmp.bus_index, 374 result = ps3_repository_read_bus_id(tmp.bus_index,
375 &tmp.bus_id); 375 &tmp.bus_id);
376 if (result) { 376 if (result) {
377 pr_debug("%s:%u read_bus_id(%u) failed\n", __func__, 377 pr_devel("%s:%u read_bus_id(%u) failed\n", __func__,
378 __LINE__, tmp.bus_index); 378 __LINE__, tmp.bus_index);
379 return result; 379 return result;
380 } 380 }
@@ -382,23 +382,23 @@ int ps3_repository_find_device_by_id(struct ps3_repository_device *repo,
382 if (tmp.bus_id == bus_id) 382 if (tmp.bus_id == bus_id)
383 goto found_bus; 383 goto found_bus;
384 384
385 pr_debug("%s:%u: skip, bus_id %llu\n", __func__, __LINE__, 385 pr_devel("%s:%u: skip, bus_id %llu\n", __func__, __LINE__,
386 tmp.bus_id); 386 tmp.bus_id);
387 } 387 }
388 pr_debug(" <- %s:%u: bus not found\n", __func__, __LINE__); 388 pr_devel(" <- %s:%u: bus not found\n", __func__, __LINE__);
389 return result; 389 return result;
390 390
391found_bus: 391found_bus:
392 result = ps3_repository_read_bus_type(tmp.bus_index, &tmp.bus_type); 392 result = ps3_repository_read_bus_type(tmp.bus_index, &tmp.bus_type);
393 if (result) { 393 if (result) {
394 pr_debug("%s:%u read_bus_type(%u) failed\n", __func__, 394 pr_devel("%s:%u read_bus_type(%u) failed\n", __func__,
395 __LINE__, tmp.bus_index); 395 __LINE__, tmp.bus_index);
396 return result; 396 return result;
397 } 397 }
398 398
399 result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev); 399 result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev);
400 if (result) { 400 if (result) {
401 pr_debug("%s:%u read_bus_num_dev failed\n", __func__, 401 pr_devel("%s:%u read_bus_num_dev failed\n", __func__,
402 __LINE__); 402 __LINE__);
403 return result; 403 return result;
404 } 404 }
@@ -408,7 +408,7 @@ found_bus:
408 tmp.dev_index, 408 tmp.dev_index,
409 &tmp.dev_id); 409 &tmp.dev_id);
410 if (result) { 410 if (result) {
411 pr_debug("%s:%u read_dev_id(%u:%u) failed\n", __func__, 411 pr_devel("%s:%u read_dev_id(%u:%u) failed\n", __func__,
412 __LINE__, tmp.bus_index, tmp.dev_index); 412 __LINE__, tmp.bus_index, tmp.dev_index);
413 return result; 413 return result;
414 } 414 }
@@ -416,21 +416,21 @@ found_bus:
416 if (tmp.dev_id == dev_id) 416 if (tmp.dev_id == dev_id)
417 goto found_dev; 417 goto found_dev;
418 418
419 pr_debug("%s:%u: skip, dev_id %llu\n", __func__, __LINE__, 419 pr_devel("%s:%u: skip, dev_id %llu\n", __func__, __LINE__,
420 tmp.dev_id); 420 tmp.dev_id);
421 } 421 }
422 pr_debug(" <- %s:%u: dev not found\n", __func__, __LINE__); 422 pr_devel(" <- %s:%u: dev not found\n", __func__, __LINE__);
423 return result; 423 return result;
424 424
425found_dev: 425found_dev:
426 result = ps3_repository_read_dev_type(tmp.bus_index, tmp.dev_index, 426 result = ps3_repository_read_dev_type(tmp.bus_index, tmp.dev_index,
427 &tmp.dev_type); 427 &tmp.dev_type);
428 if (result) { 428 if (result) {
429 pr_debug("%s:%u read_dev_type failed\n", __func__, __LINE__); 429 pr_devel("%s:%u read_dev_type failed\n", __func__, __LINE__);
430 return result; 430 return result;
431 } 431 }
432 432
433 pr_debug(" <- %s:%u: found: type (%u:%u) index (%u:%u) id (%llu:%llu)\n", 433 pr_devel(" <- %s:%u: found: type (%u:%u) index (%u:%u) id (%llu:%llu)\n",
434 __func__, __LINE__, tmp.bus_type, tmp.dev_type, tmp.bus_index, 434 __func__, __LINE__, tmp.bus_type, tmp.dev_type, tmp.bus_index,
435 tmp.dev_index, tmp.bus_id, tmp.dev_id); 435 tmp.dev_index, tmp.bus_id, tmp.dev_id);
436 *repo = tmp; 436 *repo = tmp;
@@ -443,18 +443,18 @@ int __devinit ps3_repository_find_devices(enum ps3_bus_type bus_type,
443 int result = 0; 443 int result = 0;
444 struct ps3_repository_device repo; 444 struct ps3_repository_device repo;
445 445
446 pr_debug(" -> %s:%d: find bus_type %u\n", __func__, __LINE__, bus_type); 446 pr_devel(" -> %s:%d: find bus_type %u\n", __func__, __LINE__, bus_type);
447 447
448 repo.bus_type = bus_type; 448 repo.bus_type = bus_type;
449 result = ps3_repository_find_bus(repo.bus_type, 0, &repo.bus_index); 449 result = ps3_repository_find_bus(repo.bus_type, 0, &repo.bus_index);
450 if (result) { 450 if (result) {
451 pr_debug(" <- %s:%u: bus not found\n", __func__, __LINE__); 451 pr_devel(" <- %s:%u: bus not found\n", __func__, __LINE__);
452 return result; 452 return result;
453 } 453 }
454 454
455 result = ps3_repository_read_bus_id(repo.bus_index, &repo.bus_id); 455 result = ps3_repository_read_bus_id(repo.bus_index, &repo.bus_id);
456 if (result) { 456 if (result) {
457 pr_debug("%s:%d read_bus_id(%u) failed\n", __func__, __LINE__, 457 pr_devel("%s:%d read_bus_id(%u) failed\n", __func__, __LINE__,
458 repo.bus_index); 458 repo.bus_index);
459 return result; 459 return result;
460 } 460 }
@@ -469,13 +469,13 @@ int __devinit ps3_repository_find_devices(enum ps3_bus_type bus_type,
469 469
470 result = callback(&repo); 470 result = callback(&repo);
471 if (result) { 471 if (result) {
472 pr_debug("%s:%d: abort at callback\n", __func__, 472 pr_devel("%s:%d: abort at callback\n", __func__,
473 __LINE__); 473 __LINE__);
474 break; 474 break;
475 } 475 }
476 } 476 }
477 477
478 pr_debug(" <- %s:%d\n", __func__, __LINE__); 478 pr_devel(" <- %s:%d\n", __func__, __LINE__);
479 return result; 479 return result;
480} 480}
481 481
@@ -489,7 +489,7 @@ int ps3_repository_find_bus(enum ps3_bus_type bus_type, unsigned int from,
489 for (i = from; i < 10; i++) { 489 for (i = from; i < 10; i++) {
490 error = ps3_repository_read_bus_type(i, &type); 490 error = ps3_repository_read_bus_type(i, &type);
491 if (error) { 491 if (error) {
492 pr_debug("%s:%d read_bus_type failed\n", 492 pr_devel("%s:%d read_bus_type failed\n",
493 __func__, __LINE__); 493 __func__, __LINE__);
494 *bus_index = UINT_MAX; 494 *bus_index = UINT_MAX;
495 return error; 495 return error;
@@ -509,7 +509,7 @@ int ps3_repository_find_interrupt(const struct ps3_repository_device *repo,
509 int result = 0; 509 int result = 0;
510 unsigned int res_index; 510 unsigned int res_index;
511 511
512 pr_debug("%s:%d: find intr_type %u\n", __func__, __LINE__, intr_type); 512 pr_devel("%s:%d: find intr_type %u\n", __func__, __LINE__, intr_type);
513 513
514 *interrupt_id = UINT_MAX; 514 *interrupt_id = UINT_MAX;
515 515
@@ -521,7 +521,7 @@ int ps3_repository_find_interrupt(const struct ps3_repository_device *repo,
521 repo->dev_index, res_index, &t, &id); 521 repo->dev_index, res_index, &t, &id);
522 522
523 if (result) { 523 if (result) {
524 pr_debug("%s:%d read_dev_intr failed\n", 524 pr_devel("%s:%d read_dev_intr failed\n",
525 __func__, __LINE__); 525 __func__, __LINE__);
526 return result; 526 return result;
527 } 527 }
@@ -535,7 +535,7 @@ int ps3_repository_find_interrupt(const struct ps3_repository_device *repo,
535 if (res_index == 10) 535 if (res_index == 10)
536 return -ENODEV; 536 return -ENODEV;
537 537
538 pr_debug("%s:%d: found intr_type %u at res_index %u\n", 538 pr_devel("%s:%d: found intr_type %u at res_index %u\n",
539 __func__, __LINE__, intr_type, res_index); 539 __func__, __LINE__, intr_type, res_index);
540 540
541 return result; 541 return result;
@@ -547,7 +547,7 @@ int ps3_repository_find_reg(const struct ps3_repository_device *repo,
547 int result = 0; 547 int result = 0;
548 unsigned int res_index; 548 unsigned int res_index;
549 549
550 pr_debug("%s:%d: find reg_type %u\n", __func__, __LINE__, reg_type); 550 pr_devel("%s:%d: find reg_type %u\n", __func__, __LINE__, reg_type);
551 551
552 *bus_addr = *len = 0; 552 *bus_addr = *len = 0;
553 553
@@ -560,7 +560,7 @@ int ps3_repository_find_reg(const struct ps3_repository_device *repo,
560 repo->dev_index, res_index, &t, &a, &l); 560 repo->dev_index, res_index, &t, &a, &l);
561 561
562 if (result) { 562 if (result) {
563 pr_debug("%s:%d read_dev_reg failed\n", 563 pr_devel("%s:%d read_dev_reg failed\n",
564 __func__, __LINE__); 564 __func__, __LINE__);
565 return result; 565 return result;
566 } 566 }
@@ -575,7 +575,7 @@ int ps3_repository_find_reg(const struct ps3_repository_device *repo,
575 if (res_index == 10) 575 if (res_index == 10)
576 return -ENODEV; 576 return -ENODEV;
577 577
578 pr_debug("%s:%d: found reg_type %u at res_index %u\n", 578 pr_devel("%s:%d: found reg_type %u at res_index %u\n",
579 __func__, __LINE__, reg_type, res_index); 579 __func__, __LINE__, reg_type, res_index);
580 580
581 return result; 581 return result;
@@ -1009,7 +1009,7 @@ int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo)
1009 int result = 0; 1009 int result = 0;
1010 unsigned int res_index; 1010 unsigned int res_index;
1011 1011
1012 pr_debug(" -> %s:%d: (%u:%u)\n", __func__, __LINE__, 1012 pr_devel(" -> %s:%d: (%u:%u)\n", __func__, __LINE__,
1013 repo->bus_index, repo->dev_index); 1013 repo->bus_index, repo->dev_index);
1014 1014
1015 for (res_index = 0; res_index < 10; res_index++) { 1015 for (res_index = 0; res_index < 10; res_index++) {
@@ -1021,13 +1021,13 @@ int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo)
1021 1021
1022 if (result) { 1022 if (result) {
1023 if (result != LV1_NO_ENTRY) 1023 if (result != LV1_NO_ENTRY)
1024 pr_debug("%s:%d ps3_repository_read_dev_intr" 1024 pr_devel("%s:%d ps3_repository_read_dev_intr"
1025 " (%u:%u) failed\n", __func__, __LINE__, 1025 " (%u:%u) failed\n", __func__, __LINE__,
1026 repo->bus_index, repo->dev_index); 1026 repo->bus_index, repo->dev_index);
1027 break; 1027 break;
1028 } 1028 }
1029 1029
1030 pr_debug("%s:%d (%u:%u) intr_type %u, interrupt_id %u\n", 1030 pr_devel("%s:%d (%u:%u) intr_type %u, interrupt_id %u\n",
1031 __func__, __LINE__, repo->bus_index, repo->dev_index, 1031 __func__, __LINE__, repo->bus_index, repo->dev_index,
1032 intr_type, interrupt_id); 1032 intr_type, interrupt_id);
1033 } 1033 }
@@ -1042,18 +1042,18 @@ int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo)
1042 1042
1043 if (result) { 1043 if (result) {
1044 if (result != LV1_NO_ENTRY) 1044 if (result != LV1_NO_ENTRY)
1045 pr_debug("%s:%d ps3_repository_read_dev_reg" 1045 pr_devel("%s:%d ps3_repository_read_dev_reg"
1046 " (%u:%u) failed\n", __func__, __LINE__, 1046 " (%u:%u) failed\n", __func__, __LINE__,
1047 repo->bus_index, repo->dev_index); 1047 repo->bus_index, repo->dev_index);
1048 break; 1048 break;
1049 } 1049 }
1050 1050
1051 pr_debug("%s:%d (%u:%u) reg_type %u, bus_addr %lxh, len %lxh\n", 1051 pr_devel("%s:%d (%u:%u) reg_type %u, bus_addr %llxh, len %llxh\n",
1052 __func__, __LINE__, repo->bus_index, repo->dev_index, 1052 __func__, __LINE__, repo->bus_index, repo->dev_index,
1053 reg_type, bus_addr, len); 1053 reg_type, bus_addr, len);
1054 } 1054 }
1055 1055
1056 pr_debug(" <- %s:%d\n", __func__, __LINE__); 1056 pr_devel(" <- %s:%d\n", __func__, __LINE__);
1057 return result; 1057 return result;
1058} 1058}
1059 1059
@@ -1063,22 +1063,22 @@ static int dump_stor_dev_info(struct ps3_repository_device *repo)
1063 unsigned int num_regions, region_index; 1063 unsigned int num_regions, region_index;
1064 u64 port, blk_size, num_blocks; 1064 u64 port, blk_size, num_blocks;
1065 1065
1066 pr_debug(" -> %s:%d: (%u:%u)\n", __func__, __LINE__, 1066 pr_devel(" -> %s:%d: (%u:%u)\n", __func__, __LINE__,
1067 repo->bus_index, repo->dev_index); 1067 repo->bus_index, repo->dev_index);
1068 1068
1069 result = ps3_repository_read_stor_dev_info(repo->bus_index, 1069 result = ps3_repository_read_stor_dev_info(repo->bus_index,
1070 repo->dev_index, &port, &blk_size, &num_blocks, &num_regions); 1070 repo->dev_index, &port, &blk_size, &num_blocks, &num_regions);
1071 if (result) { 1071 if (result) {
1072 pr_debug("%s:%d ps3_repository_read_stor_dev_info" 1072 pr_devel("%s:%d ps3_repository_read_stor_dev_info"
1073 " (%u:%u) failed\n", __func__, __LINE__, 1073 " (%u:%u) failed\n", __func__, __LINE__,
1074 repo->bus_index, repo->dev_index); 1074 repo->bus_index, repo->dev_index);
1075 goto out; 1075 goto out;
1076 } 1076 }
1077 1077
1078 pr_debug("%s:%d (%u:%u): port %lu, blk_size %lu, num_blocks " 1078 pr_devel("%s:%d (%u:%u): port %llu, blk_size %llu, num_blocks "
1079 "%lu, num_regions %u\n", 1079 "%llu, num_regions %u\n",
1080 __func__, __LINE__, repo->bus_index, repo->dev_index, port, 1080 __func__, __LINE__, repo->bus_index, repo->dev_index,
1081 blk_size, num_blocks, num_regions); 1081 port, blk_size, num_blocks, num_regions);
1082 1082
1083 for (region_index = 0; region_index < num_regions; region_index++) { 1083 for (region_index = 0; region_index < num_regions; region_index++) {
1084 unsigned int region_id; 1084 unsigned int region_id;
@@ -1088,19 +1088,20 @@ static int dump_stor_dev_info(struct ps3_repository_device *repo)
1088 repo->dev_index, region_index, &region_id, 1088 repo->dev_index, region_index, &region_id,
1089 &region_start, &region_size); 1089 &region_start, &region_size);
1090 if (result) { 1090 if (result) {
1091 pr_debug("%s:%d ps3_repository_read_stor_dev_region" 1091 pr_devel("%s:%d ps3_repository_read_stor_dev_region"
1092 " (%u:%u) failed\n", __func__, __LINE__, 1092 " (%u:%u) failed\n", __func__, __LINE__,
1093 repo->bus_index, repo->dev_index); 1093 repo->bus_index, repo->dev_index);
1094 break; 1094 break;
1095 } 1095 }
1096 1096
1097 pr_debug("%s:%d (%u:%u) region_id %u, start %lxh, size %lxh\n", 1097 pr_devel("%s:%d (%u:%u) region_id %u, start %lxh, size %lxh\n",
1098 __func__, __LINE__, repo->bus_index, repo->dev_index, 1098 __func__, __LINE__, repo->bus_index, repo->dev_index,
1099 region_id, region_start, region_size); 1099 region_id, (unsigned long)region_start,
1100 (unsigned long)region_size);
1100 } 1101 }
1101 1102
1102out: 1103out:
1103 pr_debug(" <- %s:%d\n", __func__, __LINE__); 1104 pr_devel(" <- %s:%d\n", __func__, __LINE__);
1104 return result; 1105 return result;
1105} 1106}
1106 1107
@@ -1109,7 +1110,7 @@ static int dump_device_info(struct ps3_repository_device *repo,
1109{ 1110{
1110 int result = 0; 1111 int result = 0;
1111 1112
1112 pr_debug(" -> %s:%d: bus_%u\n", __func__, __LINE__, repo->bus_index); 1113 pr_devel(" -> %s:%d: bus_%u\n", __func__, __LINE__, repo->bus_index);
1113 1114
1114 for (repo->dev_index = 0; repo->dev_index < num_dev; 1115 for (repo->dev_index = 0; repo->dev_index < num_dev;
1115 repo->dev_index++) { 1116 repo->dev_index++) {
@@ -1118,7 +1119,7 @@ static int dump_device_info(struct ps3_repository_device *repo,
1118 repo->dev_index, &repo->dev_type); 1119 repo->dev_index, &repo->dev_type);
1119 1120
1120 if (result) { 1121 if (result) {
1121 pr_debug("%s:%d ps3_repository_read_dev_type" 1122 pr_devel("%s:%d ps3_repository_read_dev_type"
1122 " (%u:%u) failed\n", __func__, __LINE__, 1123 " (%u:%u) failed\n", __func__, __LINE__,
1123 repo->bus_index, repo->dev_index); 1124 repo->bus_index, repo->dev_index);
1124 break; 1125 break;
@@ -1128,15 +1129,15 @@ static int dump_device_info(struct ps3_repository_device *repo,
1128 repo->dev_index, &repo->dev_id); 1129 repo->dev_index, &repo->dev_id);
1129 1130
1130 if (result) { 1131 if (result) {
1131 pr_debug("%s:%d ps3_repository_read_dev_id" 1132 pr_devel("%s:%d ps3_repository_read_dev_id"
1132 " (%u:%u) failed\n", __func__, __LINE__, 1133 " (%u:%u) failed\n", __func__, __LINE__,
1133 repo->bus_index, repo->dev_index); 1134 repo->bus_index, repo->dev_index);
1134 continue; 1135 continue;
1135 } 1136 }
1136 1137
1137 pr_debug("%s:%d (%u:%u): dev_type %u, dev_id %lu\n", __func__, 1138 pr_devel("%s:%d (%u:%u): dev_type %u, dev_id %lu\n", __func__,
1138 __LINE__, repo->bus_index, repo->dev_index, 1139 __LINE__, repo->bus_index, repo->dev_index,
1139 repo->dev_type, repo->dev_id); 1140 repo->dev_type, (unsigned long)repo->dev_id);
1140 1141
1141 ps3_repository_dump_resource_info(repo); 1142 ps3_repository_dump_resource_info(repo);
1142 1143
@@ -1144,7 +1145,7 @@ static int dump_device_info(struct ps3_repository_device *repo,
1144 dump_stor_dev_info(repo); 1145 dump_stor_dev_info(repo);
1145 } 1146 }
1146 1147
1147 pr_debug(" <- %s:%d\n", __func__, __LINE__); 1148 pr_devel(" <- %s:%d\n", __func__, __LINE__);
1148 return result; 1149 return result;
1149} 1150}
1150 1151
@@ -1153,7 +1154,7 @@ int ps3_repository_dump_bus_info(void)
1153 int result = 0; 1154 int result = 0;
1154 struct ps3_repository_device repo; 1155 struct ps3_repository_device repo;
1155 1156
1156 pr_debug(" -> %s:%d\n", __func__, __LINE__); 1157 pr_devel(" -> %s:%d\n", __func__, __LINE__);
1157 1158
1158 memset(&repo, 0, sizeof(repo)); 1159 memset(&repo, 0, sizeof(repo));
1159 1160
@@ -1164,7 +1165,7 @@ int ps3_repository_dump_bus_info(void)
1164 &repo.bus_type); 1165 &repo.bus_type);
1165 1166
1166 if (result) { 1167 if (result) {
1167 pr_debug("%s:%d read_bus_type(%u) failed\n", 1168 pr_devel("%s:%d read_bus_type(%u) failed\n",
1168 __func__, __LINE__, repo.bus_index); 1169 __func__, __LINE__, repo.bus_index);
1169 break; 1170 break;
1170 } 1171 }
@@ -1173,32 +1174,32 @@ int ps3_repository_dump_bus_info(void)
1173 &repo.bus_id); 1174 &repo.bus_id);
1174 1175
1175 if (result) { 1176 if (result) {
1176 pr_debug("%s:%d read_bus_id(%u) failed\n", 1177 pr_devel("%s:%d read_bus_id(%u) failed\n",
1177 __func__, __LINE__, repo.bus_index); 1178 __func__, __LINE__, repo.bus_index);
1178 continue; 1179 continue;
1179 } 1180 }
1180 1181
1181 if (repo.bus_index != repo.bus_id) 1182 if (repo.bus_index != repo.bus_id)
1182 pr_debug("%s:%d bus_index != bus_id\n", 1183 pr_devel("%s:%d bus_index != bus_id\n",
1183 __func__, __LINE__); 1184 __func__, __LINE__);
1184 1185
1185 result = ps3_repository_read_bus_num_dev(repo.bus_index, 1186 result = ps3_repository_read_bus_num_dev(repo.bus_index,
1186 &num_dev); 1187 &num_dev);
1187 1188
1188 if (result) { 1189 if (result) {
1189 pr_debug("%s:%d read_bus_num_dev(%u) failed\n", 1190 pr_devel("%s:%d read_bus_num_dev(%u) failed\n",
1190 __func__, __LINE__, repo.bus_index); 1191 __func__, __LINE__, repo.bus_index);
1191 continue; 1192 continue;
1192 } 1193 }
1193 1194
1194 pr_debug("%s:%d bus_%u: bus_type %u, bus_id %lu, num_dev %u\n", 1195 pr_devel("%s:%d bus_%u: bus_type %u, bus_id %lu, num_dev %u\n",
1195 __func__, __LINE__, repo.bus_index, repo.bus_type, 1196 __func__, __LINE__, repo.bus_index, repo.bus_type,
1196 repo.bus_id, num_dev); 1197 (unsigned long)repo.bus_id, num_dev);
1197 1198
1198 dump_device_info(&repo, num_dev); 1199 dump_device_info(&repo, num_dev);
1199 } 1200 }
1200 1201
1201 pr_debug(" <- %s:%d\n", __func__, __LINE__); 1202 pr_devel(" <- %s:%d\n", __func__, __LINE__);
1202 return result; 1203 return result;
1203} 1204}
1204 1205
diff --git a/arch/powerpc/platforms/ps3/setup.c b/arch/powerpc/platforms/ps3/setup.c
index e8ec1b2bfffd..2d664c5a83b0 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -193,10 +193,12 @@ static int ps3_set_dabr(unsigned long dabr)
193 193
194static void __init ps3_setup_arch(void) 194static void __init ps3_setup_arch(void)
195{ 195{
196 u64 tmp;
196 197
197 DBG(" -> %s:%d\n", __func__, __LINE__); 198 DBG(" -> %s:%d\n", __func__, __LINE__);
198 199
199 lv1_get_version_info(&ps3_firmware_version.raw); 200 lv1_get_version_info(&ps3_firmware_version.raw, &tmp);
201
200 printk(KERN_INFO "PS3 firmware version %u.%u.%u\n", 202 printk(KERN_INFO "PS3 firmware version %u.%u.%u\n",
201 ps3_firmware_version.major, ps3_firmware_version.minor, 203 ps3_firmware_version.major, ps3_firmware_version.minor,
202 ps3_firmware_version.rev); 204 ps3_firmware_version.rev);
diff --git a/arch/powerpc/platforms/ps3/smp.c b/arch/powerpc/platforms/ps3/smp.c
index efc1cd8c034a..4b35166229fe 100644
--- a/arch/powerpc/platforms/ps3/smp.c
+++ b/arch/powerpc/platforms/ps3/smp.c
@@ -57,7 +57,7 @@ static void ps3_smp_message_pass(int cpu, int msg)
57 " (%d)\n", __func__, __LINE__, cpu, msg, result); 57 " (%d)\n", __func__, __LINE__, cpu, msg, result);
58} 58}
59 59
60static int ps3_smp_probe(void) 60static int __init ps3_smp_probe(void)
61{ 61{
62 int cpu; 62 int cpu;
63 63
diff --git a/arch/powerpc/platforms/ps3/spu.c b/arch/powerpc/platforms/ps3/spu.c
index 451fad1c92a8..e17fa1432d80 100644
--- a/arch/powerpc/platforms/ps3/spu.c
+++ b/arch/powerpc/platforms/ps3/spu.c
@@ -154,7 +154,7 @@ static unsigned long get_vas_id(void)
154 u64 id; 154 u64 id;
155 155
156 lv1_get_logical_ppe_id(&id); 156 lv1_get_logical_ppe_id(&id);
157 lv1_get_virtual_address_space_id_of_ppe(id, &id); 157 lv1_get_virtual_address_space_id_of_ppe(&id);
158 158
159 return id; 159 return id;
160} 160}