diff options
author | Paul Mackerras <paulus@samba.org> | 2007-02-07 23:03:11 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-02-07 23:03:11 -0500 |
commit | d5112a4f31a361409d3c57dc9d58dd69f8014bef (patch) | |
tree | 64771300b2191cb94d9aaf60355661a01c2ccd1a /include/asm-powerpc | |
parent | 12e86f92fcfe4f0bcab0ad7fa4088a64c60d9b38 (diff) | |
parent | 5fad293bcbd48d9a2370020cf60e4b4a42559b12 (diff) |
Merge branch 'for_paulus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into for-2.6.21
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/dma-mapping.h | 12 | ||||
-rw-r--r-- | include/asm-powerpc/kprobes.h | 7 | ||||
-rw-r--r-- | include/asm-powerpc/libata-portmap.h | 12 | ||||
-rw-r--r-- | include/asm-powerpc/sstep.h | 1 |
4 files changed, 25 insertions, 7 deletions
diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h index 7c7de87bd8ae..a19a6f1a1cf1 100644 --- a/include/asm-powerpc/dma-mapping.h +++ b/include/asm-powerpc/dma-mapping.h | |||
@@ -37,9 +37,9 @@ extern void __dma_sync_page(struct page *page, unsigned long offset, | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #define __dma_alloc_coherent(gfp, size, handle) NULL | 39 | #define __dma_alloc_coherent(gfp, size, handle) NULL |
40 | #define __dma_free_coherent(size, addr) do { } while (0) | 40 | #define __dma_free_coherent(size, addr) ((void)0) |
41 | #define __dma_sync(addr, size, rw) do { } while (0) | 41 | #define __dma_sync(addr, size, rw) ((void)0) |
42 | #define __dma_sync_page(pg, off, sz, rw) do { } while (0) | 42 | #define __dma_sync_page(pg, off, sz, rw) ((void)0) |
43 | 43 | ||
44 | #endif /* ! CONFIG_NOT_COHERENT_CACHE */ | 44 | #endif /* ! CONFIG_NOT_COHERENT_CACHE */ |
45 | 45 | ||
@@ -251,7 +251,7 @@ dma_map_single(struct device *dev, void *ptr, size_t size, | |||
251 | } | 251 | } |
252 | 252 | ||
253 | /* We do nothing. */ | 253 | /* We do nothing. */ |
254 | #define dma_unmap_single(dev, addr, size, dir) do { } while (0) | 254 | #define dma_unmap_single(dev, addr, size, dir) ((void)0) |
255 | 255 | ||
256 | static inline dma_addr_t | 256 | static inline dma_addr_t |
257 | dma_map_page(struct device *dev, struct page *page, | 257 | dma_map_page(struct device *dev, struct page *page, |
@@ -266,7 +266,7 @@ dma_map_page(struct device *dev, struct page *page, | |||
266 | } | 266 | } |
267 | 267 | ||
268 | /* We do nothing. */ | 268 | /* We do nothing. */ |
269 | #define dma_unmap_page(dev, handle, size, dir) do { } while (0) | 269 | #define dma_unmap_page(dev, handle, size, dir) ((void)0) |
270 | 270 | ||
271 | static inline int | 271 | static inline int |
272 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 272 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, |
@@ -286,7 +286,7 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
286 | } | 286 | } |
287 | 287 | ||
288 | /* We don't do anything here. */ | 288 | /* We don't do anything here. */ |
289 | #define dma_unmap_sg(dev, sg, nents, dir) do { } while (0) | 289 | #define dma_unmap_sg(dev, sg, nents, dir) ((void)0) |
290 | 290 | ||
291 | #endif /* CONFIG_PPC64 */ | 291 | #endif /* CONFIG_PPC64 */ |
292 | 292 | ||
diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h index 2dafa376a63f..3a5dd492588f 100644 --- a/include/asm-powerpc/kprobes.h +++ b/include/asm-powerpc/kprobes.h | |||
@@ -44,6 +44,7 @@ typedef unsigned int kprobe_opcode_t; | |||
44 | #define IS_TDI(instr) (((instr) & 0xfc000000) == 0x08000000) | 44 | #define IS_TDI(instr) (((instr) & 0xfc000000) == 0x08000000) |
45 | #define IS_TWI(instr) (((instr) & 0xfc000000) == 0x0c000000) | 45 | #define IS_TWI(instr) (((instr) & 0xfc000000) == 0x0c000000) |
46 | 46 | ||
47 | #ifdef CONFIG_PPC64 | ||
47 | /* | 48 | /* |
48 | * 64bit powerpc uses function descriptors. | 49 | * 64bit powerpc uses function descriptors. |
49 | * Handle cases where: | 50 | * Handle cases where: |
@@ -67,9 +68,13 @@ typedef unsigned int kprobe_opcode_t; | |||
67 | } | 68 | } |
68 | 69 | ||
69 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)((func_descr_t *)pentry) | 70 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)((func_descr_t *)pentry) |
70 | |||
71 | #define is_trap(instr) (IS_TW(instr) || IS_TD(instr) || \ | 71 | #define is_trap(instr) (IS_TW(instr) || IS_TD(instr) || \ |
72 | IS_TWI(instr) || IS_TDI(instr)) | 72 | IS_TWI(instr) || IS_TDI(instr)) |
73 | #else | ||
74 | /* Use stock kprobe_lookup_name since ppc32 doesn't use function descriptors */ | ||
75 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)(pentry) | ||
76 | #define is_trap(instr) (IS_TW(instr) || IS_TWI(instr)) | ||
77 | #endif | ||
73 | 78 | ||
74 | #define ARCH_SUPPORTS_KRETPROBES | 79 | #define ARCH_SUPPORTS_KRETPROBES |
75 | #define ARCH_INACTIVE_KPROBE_COUNT 1 | 80 | #define ARCH_INACTIVE_KPROBE_COUNT 1 |
diff --git a/include/asm-powerpc/libata-portmap.h b/include/asm-powerpc/libata-portmap.h new file mode 100644 index 000000000000..4d8518049f4d --- /dev/null +++ b/include/asm-powerpc/libata-portmap.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef __ASM_POWERPC_LIBATA_PORTMAP_H | ||
2 | #define __ASM_POWERPC_LIBATA_PORTMAP_H | ||
3 | |||
4 | #define ATA_PRIMARY_CMD 0x1F0 | ||
5 | #define ATA_PRIMARY_CTL 0x3F6 | ||
6 | #define ATA_PRIMARY_IRQ(dev) pci_get_legacy_ide_irq(dev, 0) | ||
7 | |||
8 | #define ATA_SECONDARY_CMD 0x170 | ||
9 | #define ATA_SECONDARY_CTL 0x376 | ||
10 | #define ATA_SECONDARY_IRQ(dev) pci_get_legacy_ide_irq(dev, 1) | ||
11 | |||
12 | #endif | ||
diff --git a/include/asm-powerpc/sstep.h b/include/asm-powerpc/sstep.h index 630a9889c07c..f593b0f9b627 100644 --- a/include/asm-powerpc/sstep.h +++ b/include/asm-powerpc/sstep.h | |||
@@ -21,6 +21,7 @@ struct pt_regs; | |||
21 | */ | 21 | */ |
22 | #define IS_MTMSRD(instr) (((instr) & 0xfc0007be) == 0x7c000124) | 22 | #define IS_MTMSRD(instr) (((instr) & 0xfc0007be) == 0x7c000124) |
23 | #define IS_RFID(instr) (((instr) & 0xfc0007fe) == 0x4c000024) | 23 | #define IS_RFID(instr) (((instr) & 0xfc0007fe) == 0x4c000024) |
24 | #define IS_RFI(instr) (((instr) & 0xfc0007fe) == 0x4c000064) | ||
24 | 25 | ||
25 | /* Emulate instructions that cause a transfer of control. */ | 26 | /* Emulate instructions that cause a transfer of control. */ |
26 | extern int emulate_step(struct pt_regs *regs, unsigned int instr); | 27 | extern int emulate_step(struct pt_regs *regs, unsigned int instr); |