diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 11:16:57 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 11:16:57 -0500 |
| commit | 7e4e574c391cdeef516411eb698ac6955f01d673 (patch) | |
| tree | e9f3b05c464b82be608cef1a90688dd3719e1537 /include/asm-powerpc | |
| parent | a4fc7ab1d065a9dd89ed0e74439ef87d4a16e980 (diff) | |
| parent | 97b1b999748d3cde6a3f381e0839e0f1082323e6 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
Diffstat (limited to 'include/asm-powerpc')
| -rw-r--r-- | include/asm-powerpc/paca.h | 1 | ||||
| -rw-r--r-- | include/asm-powerpc/page.h | 2 | ||||
| -rw-r--r-- | include/asm-powerpc/parport.h | 28 | ||||
| -rw-r--r-- | include/asm-powerpc/percpu.h | 56 | ||||
| -rw-r--r-- | include/asm-powerpc/rtas.h | 1 | ||||
| -rw-r--r-- | include/asm-powerpc/udbg.h | 9 |
6 files changed, 92 insertions, 5 deletions
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index 3ae52d9dc9ff..a64b4d425dab 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h | |||
| @@ -65,6 +65,7 @@ struct paca_struct { | |||
| 65 | u64 stab_real; /* Absolute address of segment table */ | 65 | u64 stab_real; /* Absolute address of segment table */ |
| 66 | u64 stab_addr; /* Virtual address of segment table */ | 66 | u64 stab_addr; /* Virtual address of segment table */ |
| 67 | void *emergency_sp; /* pointer to emergency stack */ | 67 | void *emergency_sp; /* pointer to emergency stack */ |
| 68 | u64 data_offset; /* per cpu data offset */ | ||
| 68 | s16 hw_cpu_id; /* Physical processor number */ | 69 | s16 hw_cpu_id; /* Physical processor number */ |
| 69 | u8 cpu_start; /* At startup, processor spins until */ | 70 | u8 cpu_start; /* At startup, processor spins until */ |
| 70 | /* this becomes non-zero. */ | 71 | /* this becomes non-zero. */ |
diff --git a/include/asm-powerpc/page.h b/include/asm-powerpc/page.h index 76d7cb4b4ffc..0b82df483f7f 100644 --- a/include/asm-powerpc/page.h +++ b/include/asm-powerpc/page.h | |||
| @@ -178,7 +178,7 @@ typedef unsigned long pmd_t; | |||
| 178 | #define pmd_val(x) (x) | 178 | #define pmd_val(x) (x) |
| 179 | #define __pmd(x) (x) | 179 | #define __pmd(x) (x) |
| 180 | 180 | ||
| 181 | #ifndef CONFIG_PPC_64K_PAGES | 181 | #if defined(CONFIG_PPC64) && !defined(CONFIG_PPC_64K_PAGES) |
| 182 | typedef unsigned long pud_t; | 182 | typedef unsigned long pud_t; |
| 183 | #define pud_val(x) (x) | 183 | #define pud_val(x) (x) |
| 184 | #define __pud(x) (x) | 184 | #define __pud(x) (x) |
diff --git a/include/asm-powerpc/parport.h b/include/asm-powerpc/parport.h index 897e49a88a6b..3fca21ddf546 100644 --- a/include/asm-powerpc/parport.h +++ b/include/asm-powerpc/parport.h | |||
| @@ -10,10 +10,34 @@ | |||
| 10 | #define _ASM_POWERPC_PARPORT_H | 10 | #define _ASM_POWERPC_PARPORT_H |
| 11 | #ifdef __KERNEL__ | 11 | #ifdef __KERNEL__ |
| 12 | 12 | ||
| 13 | static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); | 13 | #include <asm/prom.h> |
| 14 | |||
| 15 | extern struct parport *parport_pc_probe_port (unsigned long int base, | ||
| 16 | unsigned long int base_hi, | ||
| 17 | int irq, int dma, | ||
| 18 | struct pci_dev *dev); | ||
| 19 | |||
| 14 | static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) | 20 | static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) |
| 15 | { | 21 | { |
| 16 | return parport_pc_find_isa_ports (autoirq, autodma); | 22 | struct device_node *np; |
| 23 | u32 *prop; | ||
| 24 | u32 io1, io2; | ||
| 25 | int propsize; | ||
| 26 | int count = 0; | ||
| 27 | for (np = NULL; (np = of_find_compatible_node(np, | ||
| 28 | "parallel", | ||
| 29 | "pnpPNP,400")) != NULL;) { | ||
| 30 | prop = (u32 *)get_property(np, "reg", &propsize); | ||
| 31 | if (!prop || propsize > 6*sizeof(u32)) | ||
| 32 | continue; | ||
| 33 | io1 = prop[1]; io2 = prop[2]; | ||
| 34 | prop = (u32 *)get_property(np, "interrupts", NULL); | ||
| 35 | if (!prop) | ||
| 36 | continue; | ||
| 37 | if (parport_pc_probe_port(io1, io2, prop[0], autodma, NULL) != NULL) | ||
| 38 | count++; | ||
| 39 | } | ||
| 40 | return count; | ||
| 17 | } | 41 | } |
| 18 | 42 | ||
| 19 | #endif /* __KERNEL__ */ | 43 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/percpu.h b/include/asm-powerpc/percpu.h index 06a959d67234..e31922c50e53 100644 --- a/include/asm-powerpc/percpu.h +++ b/include/asm-powerpc/percpu.h | |||
| @@ -1 +1,57 @@ | |||
| 1 | #ifndef _ASM_POWERPC_PERCPU_H_ | ||
| 2 | #define _ASM_POWERPC_PERCPU_H_ | ||
| 3 | #ifdef __powerpc64__ | ||
| 4 | #include <linux/compiler.h> | ||
| 5 | |||
| 6 | /* | ||
| 7 | * Same as asm-generic/percpu.h, except that we store the per cpu offset | ||
| 8 | * in the paca. Based on the x86-64 implementation. | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifdef CONFIG_SMP | ||
| 12 | |||
| 13 | #include <asm/paca.h> | ||
| 14 | |||
| 15 | #define __per_cpu_offset(cpu) (paca[cpu].data_offset) | ||
| 16 | #define __my_cpu_offset() get_paca()->data_offset | ||
| 17 | |||
| 18 | /* Separate out the type, so (int[3], foo) works. */ | ||
| 19 | #define DEFINE_PER_CPU(type, name) \ | ||
| 20 | __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name | ||
| 21 | |||
| 22 | /* var is in discarded region: offset to particular copy we want */ | ||
| 23 | #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu))) | ||
| 24 | #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __my_cpu_offset())) | ||
| 25 | |||
| 26 | /* A macro to avoid #include hell... */ | ||
| 27 | #define percpu_modcopy(pcpudst, src, size) \ | ||
| 28 | do { \ | ||
| 29 | unsigned int __i; \ | ||
| 30 | for (__i = 0; __i < NR_CPUS; __i++) \ | ||
| 31 | if (cpu_possible(__i)) \ | ||
| 32 | memcpy((pcpudst)+__per_cpu_offset(__i), \ | ||
| 33 | (src), (size)); \ | ||
| 34 | } while (0) | ||
| 35 | |||
| 36 | extern void setup_per_cpu_areas(void); | ||
| 37 | |||
| 38 | #else /* ! SMP */ | ||
| 39 | |||
| 40 | #define DEFINE_PER_CPU(type, name) \ | ||
| 41 | __typeof__(type) per_cpu__##name | ||
| 42 | |||
| 43 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var)) | ||
| 44 | #define __get_cpu_var(var) per_cpu__##var | ||
| 45 | |||
| 46 | #endif /* SMP */ | ||
| 47 | |||
| 48 | #define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name | ||
| 49 | |||
| 50 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) | ||
| 51 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) | ||
| 52 | |||
| 53 | #else | ||
| 1 | #include <asm-generic/percpu.h> | 54 | #include <asm-generic/percpu.h> |
| 55 | #endif | ||
| 56 | |||
| 57 | #endif /* _ASM_POWERPC_PERCPU_H_ */ | ||
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h index 3428889e27b7..f43c6835e62a 100644 --- a/include/asm-powerpc/rtas.h +++ b/include/asm-powerpc/rtas.h | |||
| @@ -161,7 +161,6 @@ extern struct rtas_t rtas; | |||
| 161 | extern void enter_rtas(unsigned long); | 161 | extern void enter_rtas(unsigned long); |
| 162 | extern int rtas_token(const char *service); | 162 | extern int rtas_token(const char *service); |
| 163 | extern int rtas_call(int token, int, int, int *, ...); | 163 | extern int rtas_call(int token, int, int, int *, ...); |
| 164 | extern void call_rtas_display_status(unsigned char); | ||
| 165 | extern void rtas_restart(char *cmd); | 164 | extern void rtas_restart(char *cmd); |
| 166 | extern void rtas_power_off(void); | 165 | extern void rtas_power_off(void); |
| 167 | extern void rtas_halt(void); | 166 | extern void rtas_halt(void); |
diff --git a/include/asm-powerpc/udbg.h b/include/asm-powerpc/udbg.h index 479f2d8ff74a..5c4236c342bb 100644 --- a/include/asm-powerpc/udbg.h +++ b/include/asm-powerpc/udbg.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * c 2001 PPC 64 Team, IBM Corp | 2 | * (c) 2001, 2006 IBM Corporation. |
| 3 | * | 3 | * |
| 4 | * This program is free software; you can redistribute it and/or | 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License | 5 | * modify it under the terms of the GNU General Public License |
| @@ -36,5 +36,12 @@ extern void udbg_scc_init(int force_scc); | |||
| 36 | extern int udbg_adb_init(int force_btext); | 36 | extern int udbg_adb_init(int force_btext); |
| 37 | extern void udbg_adb_init_early(void); | 37 | extern void udbg_adb_init_early(void); |
| 38 | 38 | ||
| 39 | extern void __init udbg_early_init(void); | ||
| 40 | extern void __init udbg_init_debug_lpar(void); | ||
| 41 | extern void __init udbg_init_pmac_realmode(void); | ||
| 42 | extern void __init udbg_init_maple_realmode(void); | ||
| 43 | extern void __init udbg_init_iseries(void); | ||
| 44 | extern void __init udbg_init_rtas(void); | ||
| 45 | |||
| 39 | #endif /* __KERNEL__ */ | 46 | #endif /* __KERNEL__ */ |
| 40 | #endif /* _ASM_POWERPC_UDBG_H */ | 47 | #endif /* _ASM_POWERPC_UDBG_H */ |
