aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/dma-mapping.h2
-rw-r--r--include/asm-powerpc/kexec.h3
-rw-r--r--include/asm-powerpc/ps3.h74
-rw-r--r--include/asm-powerpc/reg.h1
-rw-r--r--include/asm-powerpc/setjmp.h18
-rw-r--r--include/asm-powerpc/sparsemem.h5
6 files changed, 94 insertions, 9 deletions
diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h
index e974876e18d2..5eea6dbc0aa2 100644
--- a/include/asm-powerpc/dma-mapping.h
+++ b/include/asm-powerpc/dma-mapping.h
@@ -189,8 +189,6 @@ static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg,
189extern struct dma_mapping_ops dma_iommu_ops; 189extern struct dma_mapping_ops dma_iommu_ops;
190extern struct dma_mapping_ops dma_direct_ops; 190extern struct dma_mapping_ops dma_direct_ops;
191 191
192extern unsigned long dma_direct_offset;
193
194#else /* CONFIG_PPC64 */ 192#else /* CONFIG_PPC64 */
195 193
196#define dma_supported(dev, mask) (1) 194#define dma_supported(dev, mask) (1)
diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h
index b6f817b8ba3d..701857bc8e24 100644
--- a/include/asm-powerpc/kexec.h
+++ b/include/asm-powerpc/kexec.h
@@ -123,6 +123,9 @@ struct pt_regs;
123extern void default_machine_kexec(struct kimage *image); 123extern void default_machine_kexec(struct kimage *image);
124extern int default_machine_kexec_prepare(struct kimage *image); 124extern int default_machine_kexec_prepare(struct kimage *image);
125extern void default_machine_crash_shutdown(struct pt_regs *regs); 125extern void default_machine_crash_shutdown(struct pt_regs *regs);
126typedef void (*crash_shutdown_t)(void);
127extern int crash_shutdown_register(crash_shutdown_t handler);
128extern int crash_shutdown_unregister(crash_shutdown_t handler);
126 129
127extern void machine_kexec_simple(struct kimage *image); 130extern void machine_kexec_simple(struct kimage *image);
128extern void crash_kexec_secondary(struct pt_regs *regs); 131extern void crash_kexec_secondary(struct pt_regs *regs);
diff --git a/include/asm-powerpc/ps3.h b/include/asm-powerpc/ps3.h
index f577a16c6728..2b693673eff4 100644
--- a/include/asm-powerpc/ps3.h
+++ b/include/asm-powerpc/ps3.h
@@ -24,6 +24,7 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/types.h> 25#include <linux/types.h>
26#include <linux/device.h> 26#include <linux/device.h>
27#include "cell-pmu.h"
27 28
28union ps3_firmware_version { 29union ps3_firmware_version {
29 u64 raw; 30 u64 raw;
@@ -317,6 +318,7 @@ enum ps3_match_id {
317 PS3_MATCH_ID_STOR_FLASH = 8, 318 PS3_MATCH_ID_STOR_FLASH = 8,
318 PS3_MATCH_ID_SOUND = 9, 319 PS3_MATCH_ID_SOUND = 9,
319 PS3_MATCH_ID_GRAPHICS = 10, 320 PS3_MATCH_ID_GRAPHICS = 10,
321 PS3_MATCH_ID_LPM = 11,
320}; 322};
321 323
322#define PS3_MODULE_ALIAS_EHCI "ps3:1" 324#define PS3_MODULE_ALIAS_EHCI "ps3:1"
@@ -329,11 +331,13 @@ enum ps3_match_id {
329#define PS3_MODULE_ALIAS_STOR_FLASH "ps3:8" 331#define PS3_MODULE_ALIAS_STOR_FLASH "ps3:8"
330#define PS3_MODULE_ALIAS_SOUND "ps3:9" 332#define PS3_MODULE_ALIAS_SOUND "ps3:9"
331#define PS3_MODULE_ALIAS_GRAPHICS "ps3:10" 333#define PS3_MODULE_ALIAS_GRAPHICS "ps3:10"
334#define PS3_MODULE_ALIAS_LPM "ps3:11"
332 335
333enum ps3_system_bus_device_type { 336enum ps3_system_bus_device_type {
334 PS3_DEVICE_TYPE_IOC0 = 1, 337 PS3_DEVICE_TYPE_IOC0 = 1,
335 PS3_DEVICE_TYPE_SB, 338 PS3_DEVICE_TYPE_SB,
336 PS3_DEVICE_TYPE_VUART, 339 PS3_DEVICE_TYPE_VUART,
340 PS3_DEVICE_TYPE_LPM,
337}; 341};
338 342
339/** 343/**
@@ -344,12 +348,17 @@ struct ps3_system_bus_device {
344 enum ps3_match_id match_id; 348 enum ps3_match_id match_id;
345 enum ps3_system_bus_device_type dev_type; 349 enum ps3_system_bus_device_type dev_type;
346 350
347 unsigned int bus_id; /* SB */ 351 u64 bus_id; /* SB */
348 unsigned int dev_id; /* SB */ 352 u64 dev_id; /* SB */
349 unsigned int interrupt_id; /* SB */ 353 unsigned int interrupt_id; /* SB */
350 struct ps3_dma_region *d_region; /* SB, IOC0 */ 354 struct ps3_dma_region *d_region; /* SB, IOC0 */
351 struct ps3_mmio_region *m_region; /* SB, IOC0*/ 355 struct ps3_mmio_region *m_region; /* SB, IOC0*/
352 unsigned int port_number; /* VUART */ 356 unsigned int port_number; /* VUART */
357 struct { /* LPM */
358 u64 node_id;
359 u64 pu_id;
360 u64 rights;
361 } lpm;
353 362
354/* struct iommu_table *iommu_table; -- waiting for BenH's cleanups */ 363/* struct iommu_table *iommu_table; -- waiting for BenH's cleanups */
355 struct device core; 364 struct device core;
@@ -438,5 +447,66 @@ struct ps3_prealloc {
438extern struct ps3_prealloc ps3fb_videomemory; 447extern struct ps3_prealloc ps3fb_videomemory;
439extern struct ps3_prealloc ps3flash_bounce_buffer; 448extern struct ps3_prealloc ps3flash_bounce_buffer;
440 449
450/* logical performance monitor */
451
452/**
453 * enum ps3_lpm_rights - Rigths granted by the system policy module.
454 *
455 * @PS3_LPM_RIGHTS_USE_LPM: The right to use the lpm.
456 * @PS3_LPM_RIGHTS_USE_TB: The right to use the internal trace buffer.
457 */
458
459enum ps3_lpm_rights {
460 PS3_LPM_RIGHTS_USE_LPM = 0x001,
461 PS3_LPM_RIGHTS_USE_TB = 0x100,
462};
463
464/**
465 * enum ps3_lpm_tb_type - Type of trace buffer lv1 should use.
466 *
467 * @PS3_LPM_TB_TYPE_NONE: Do not use a trace buffer.
468 * @PS3_LPM_RIGHTS_USE_TB: Use the lv1 internal trace buffer. Must have
469 * rights @PS3_LPM_RIGHTS_USE_TB.
470 */
471
472enum ps3_lpm_tb_type {
473 PS3_LPM_TB_TYPE_NONE = 0,
474 PS3_LPM_TB_TYPE_INTERNAL = 1,
475};
476
477int ps3_lpm_open(enum ps3_lpm_tb_type tb_type, void *tb_cache,
478 u64 tb_cache_size);
479int ps3_lpm_close(void);
480int ps3_lpm_copy_tb(unsigned long offset, void *buf, unsigned long count,
481 unsigned long *bytes_copied);
482int ps3_lpm_copy_tb_to_user(unsigned long offset, void __user *buf,
483 unsigned long count, unsigned long *bytes_copied);
484void ps3_set_bookmark(u64 bookmark);
485void ps3_set_pm_bookmark(u64 tag, u64 incident, u64 th_id);
486int ps3_set_signal(u64 rtas_signal_group, u8 signal_bit, u16 sub_unit,
487 u8 bus_word);
488
489u32 ps3_read_phys_ctr(u32 cpu, u32 phys_ctr);
490void ps3_write_phys_ctr(u32 cpu, u32 phys_ctr, u32 val);
491u32 ps3_read_ctr(u32 cpu, u32 ctr);
492void ps3_write_ctr(u32 cpu, u32 ctr, u32 val);
493
494u32 ps3_read_pm07_control(u32 cpu, u32 ctr);
495void ps3_write_pm07_control(u32 cpu, u32 ctr, u32 val);
496u32 ps3_read_pm(u32 cpu, enum pm_reg_name reg);
497void ps3_write_pm(u32 cpu, enum pm_reg_name reg, u32 val);
498
499u32 ps3_get_ctr_size(u32 cpu, u32 phys_ctr);
500void ps3_set_ctr_size(u32 cpu, u32 phys_ctr, u32 ctr_size);
501
502void ps3_enable_pm(u32 cpu);
503void ps3_disable_pm(u32 cpu);
504void ps3_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask);
505void ps3_disable_pm_interrupts(u32 cpu);
506
507u32 ps3_get_and_clear_pm_interrupts(u32 cpu);
508void ps3_sync_irq(int node);
509u32 ps3_get_hw_thread_id(int cpu);
510u64 ps3_get_spe_id(void *arg);
441 511
442#endif 512#endif
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h
index 1f685047c6ff..2408a29507e5 100644
--- a/include/asm-powerpc/reg.h
+++ b/include/asm-powerpc/reg.h
@@ -553,6 +553,7 @@
553#define SPRN_PA6T_BTCR 978 /* Breakpoint and Tagging Control Register */ 553#define SPRN_PA6T_BTCR 978 /* Breakpoint and Tagging Control Register */
554#define SPRN_PA6T_IMAAT 979 /* Instruction Match Array Action Table */ 554#define SPRN_PA6T_IMAAT 979 /* Instruction Match Array Action Table */
555#define SPRN_PA6T_PCCR 1019 /* Power Counter Control Register */ 555#define SPRN_PA6T_PCCR 1019 /* Power Counter Control Register */
556#define SPRN_BKMK 1020 /* Cell Bookmark Register */
556#define SPRN_PA6T_RPCCR 1021 /* Retire PC Trace Control Register */ 557#define SPRN_PA6T_RPCCR 1021 /* Retire PC Trace Control Register */
557 558
558 559
diff --git a/include/asm-powerpc/setjmp.h b/include/asm-powerpc/setjmp.h
new file mode 100644
index 000000000000..279d03a1eec6
--- /dev/null
+++ b/include/asm-powerpc/setjmp.h
@@ -0,0 +1,18 @@
1/*
2 * Copyright © 2008 Michael Neuling IBM Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *
9 */
10#ifndef _ASM_POWERPC_SETJMP_H
11#define _ASM_POWERPC_SETJMP_H
12
13#define JMP_BUF_LEN 23
14
15extern long setjmp(long *);
16extern void longjmp(long *, long);
17
18#endif /* _ASM_POWERPC_SETJMP_H */
diff --git a/include/asm-powerpc/sparsemem.h b/include/asm-powerpc/sparsemem.h
index 48ad807a0b8a..e8b493d52b4f 100644
--- a/include/asm-powerpc/sparsemem.h
+++ b/include/asm-powerpc/sparsemem.h
@@ -10,13 +10,8 @@
10 */ 10 */
11#define SECTION_SIZE_BITS 24 11#define SECTION_SIZE_BITS 24
12 12
13#if defined(CONFIG_PS3_USE_LPAR_ADDR)
14#define MAX_PHYSADDR_BITS 47
15#define MAX_PHYSMEM_BITS 47
16#else
17#define MAX_PHYSADDR_BITS 44 13#define MAX_PHYSADDR_BITS 44
18#define MAX_PHYSMEM_BITS 44 14#define MAX_PHYSMEM_BITS 44
19#endif
20 15
21#ifdef CONFIG_MEMORY_HOTPLUG 16#ifdef CONFIG_MEMORY_HOTPLUG
22extern void create_section_mapping(unsigned long start, unsigned long end); 17extern void create_section_mapping(unsigned long start, unsigned long end);