diff options
| author | Steve French <sfrench@us.ibm.com> | 2008-05-06 13:55:32 -0400 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2008-05-06 13:55:32 -0400 |
| commit | a815752ac0ffdb910e92958d41d28f4fb28e5296 (patch) | |
| tree | a3aa16a282354da0debe8e3a3a7ed8aac6e54001 /include/asm-powerpc | |
| parent | 5ade9deaaa3e1f7291467d97b238648e43eae15e (diff) | |
| parent | a15306365a16380f3bafee9e181ba01231d4acd7 (diff) | |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/asm-powerpc')
| -rw-r--r-- | include/asm-powerpc/futex.h | 2 | ||||
| -rw-r--r-- | include/asm-powerpc/io.h | 8 | ||||
| -rw-r--r-- | include/asm-powerpc/irq.h | 2 | ||||
| -rw-r--r-- | include/asm-powerpc/kvm_host.h | 1 | ||||
| -rw-r--r-- | include/asm-powerpc/kvm_ppc.h | 5 | ||||
| -rw-r--r-- | include/asm-powerpc/processor.h | 6 | ||||
| -rw-r--r-- | include/asm-powerpc/ps3.h | 3 | ||||
| -rw-r--r-- | include/asm-powerpc/rio.h | 18 | ||||
| -rw-r--r-- | include/asm-powerpc/syscalls.h | 2 | ||||
| -rw-r--r-- | include/asm-powerpc/system.h | 24 | ||||
| -rw-r--r-- | include/asm-powerpc/types.h | 48 | ||||
| -rw-r--r-- | include/asm-powerpc/unaligned.h | 11 |
12 files changed, 61 insertions, 69 deletions
diff --git a/include/asm-powerpc/futex.h b/include/asm-powerpc/futex.h index 3f3673fd3ff3..6d406c5c5de4 100644 --- a/include/asm-powerpc/futex.h +++ b/include/asm-powerpc/futex.h | |||
| @@ -4,9 +4,9 @@ | |||
| 4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
| 5 | 5 | ||
| 6 | #include <linux/futex.h> | 6 | #include <linux/futex.h> |
| 7 | #include <linux/uaccess.h> | ||
| 7 | #include <asm/errno.h> | 8 | #include <asm/errno.h> |
| 8 | #include <asm/synch.h> | 9 | #include <asm/synch.h> |
| 9 | #include <asm/uaccess.h> | ||
| 10 | #include <asm/asm-compat.h> | 10 | #include <asm/asm-compat.h> |
| 11 | 11 | ||
| 12 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ | 12 | #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ |
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index afae0697e8ce..e0062d73db1c 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #define _ASM_POWERPC_IO_H | 2 | #define _ASM_POWERPC_IO_H |
| 3 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
| 4 | 4 | ||
| 5 | /* | 5 | /* |
| 6 | * This program is free software; you can redistribute it and/or | 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License | 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version | 8 | * as published by the Free Software Foundation; either version |
| @@ -18,6 +18,9 @@ extern int check_legacy_ioport(unsigned long base_port); | |||
| 18 | #define _PNPWRP 0xa79 | 18 | #define _PNPWRP 0xa79 |
| 19 | #define PNPBIOS_BASE 0xf000 | 19 | #define PNPBIOS_BASE 0xf000 |
| 20 | 20 | ||
| 21 | #include <linux/device.h> | ||
| 22 | #include <linux/io.h> | ||
| 23 | |||
| 21 | #include <linux/compiler.h> | 24 | #include <linux/compiler.h> |
| 22 | #include <asm/page.h> | 25 | #include <asm/page.h> |
| 23 | #include <asm/byteorder.h> | 26 | #include <asm/byteorder.h> |
| @@ -744,6 +747,9 @@ static inline void * bus_to_virt(unsigned long address) | |||
| 744 | 747 | ||
| 745 | #define clrsetbits_8(addr, clear, set) clrsetbits(8, addr, clear, set) | 748 | #define clrsetbits_8(addr, clear, set) clrsetbits(8, addr, clear, set) |
| 746 | 749 | ||
| 750 | void __iomem *devm_ioremap_prot(struct device *dev, resource_size_t offset, | ||
| 751 | size_t size, unsigned long flags); | ||
| 752 | |||
| 747 | #endif /* __KERNEL__ */ | 753 | #endif /* __KERNEL__ */ |
| 748 | 754 | ||
| 749 | #endif /* _ASM_POWERPC_IO_H */ | 755 | #endif /* _ASM_POWERPC_IO_H */ |
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h index b5c03127a9b9..5089deb8fec3 100644 --- a/include/asm-powerpc/irq.h +++ b/include/asm-powerpc/irq.h | |||
| @@ -619,8 +619,6 @@ struct pt_regs; | |||
| 619 | 619 | ||
| 620 | #define __ARCH_HAS_DO_SOFTIRQ | 620 | #define __ARCH_HAS_DO_SOFTIRQ |
| 621 | 621 | ||
| 622 | extern void __do_softirq(void); | ||
| 623 | |||
| 624 | #ifdef CONFIG_IRQSTACKS | 622 | #ifdef CONFIG_IRQSTACKS |
| 625 | /* | 623 | /* |
| 626 | * Per-cpu stacks for handling hard and soft interrupts. | 624 | * Per-cpu stacks for handling hard and soft interrupts. |
diff --git a/include/asm-powerpc/kvm_host.h b/include/asm-powerpc/kvm_host.h index 04ffbb8e0a35..81a69d711017 100644 --- a/include/asm-powerpc/kvm_host.h +++ b/include/asm-powerpc/kvm_host.h | |||
| @@ -59,6 +59,7 @@ struct kvm_vcpu_stat { | |||
| 59 | u32 emulated_inst_exits; | 59 | u32 emulated_inst_exits; |
| 60 | u32 dec_exits; | 60 | u32 dec_exits; |
| 61 | u32 ext_intr_exits; | 61 | u32 ext_intr_exits; |
| 62 | u32 halt_wakeup; | ||
| 62 | }; | 63 | }; |
| 63 | 64 | ||
| 64 | struct tlbe { | 65 | struct tlbe { |
diff --git a/include/asm-powerpc/kvm_ppc.h b/include/asm-powerpc/kvm_ppc.h index 7ac820308a7e..b35a7e3ef978 100644 --- a/include/asm-powerpc/kvm_ppc.h +++ b/include/asm-powerpc/kvm_ppc.h | |||
| @@ -77,12 +77,17 @@ static inline void kvmppc_clear_exception(struct kvm_vcpu *vcpu, int exception) | |||
| 77 | clear_bit(priority, &vcpu->arch.pending_exceptions); | 77 | clear_bit(priority, &vcpu->arch.pending_exceptions); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | /* Helper function for "full" MSR writes. No need to call this if only EE is | ||
| 81 | * changing. */ | ||
| 80 | static inline void kvmppc_set_msr(struct kvm_vcpu *vcpu, u32 new_msr) | 82 | static inline void kvmppc_set_msr(struct kvm_vcpu *vcpu, u32 new_msr) |
| 81 | { | 83 | { |
| 82 | if ((new_msr & MSR_PR) != (vcpu->arch.msr & MSR_PR)) | 84 | if ((new_msr & MSR_PR) != (vcpu->arch.msr & MSR_PR)) |
| 83 | kvmppc_mmu_priv_switch(vcpu, new_msr & MSR_PR); | 85 | kvmppc_mmu_priv_switch(vcpu, new_msr & MSR_PR); |
| 84 | 86 | ||
| 85 | vcpu->arch.msr = new_msr; | 87 | vcpu->arch.msr = new_msr; |
| 88 | |||
| 89 | if (vcpu->arch.msr & MSR_WE) | ||
| 90 | kvm_vcpu_block(vcpu); | ||
| 86 | } | 91 | } |
| 87 | 92 | ||
| 88 | #endif /* __POWERPC_KVM_PPC_H__ */ | 93 | #endif /* __POWERPC_KVM_PPC_H__ */ |
diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h index fd98ca998b4f..cf83f2d7e2a5 100644 --- a/include/asm-powerpc/processor.h +++ b/include/asm-powerpc/processor.h | |||
| @@ -138,6 +138,8 @@ typedef struct { | |||
| 138 | 138 | ||
| 139 | struct thread_struct { | 139 | struct thread_struct { |
| 140 | unsigned long ksp; /* Kernel stack pointer */ | 140 | unsigned long ksp; /* Kernel stack pointer */ |
| 141 | unsigned long ksp_limit; /* if ksp <= ksp_limit stack overflow */ | ||
| 142 | |||
| 141 | #ifdef CONFIG_PPC64 | 143 | #ifdef CONFIG_PPC64 |
| 142 | unsigned long ksp_vsid; | 144 | unsigned long ksp_vsid; |
| 143 | #endif | 145 | #endif |
| @@ -182,11 +184,14 @@ struct thread_struct { | |||
| 182 | #define ARCH_MIN_TASKALIGN 16 | 184 | #define ARCH_MIN_TASKALIGN 16 |
| 183 | 185 | ||
| 184 | #define INIT_SP (sizeof(init_stack) + (unsigned long) &init_stack) | 186 | #define INIT_SP (sizeof(init_stack) + (unsigned long) &init_stack) |
| 187 | #define INIT_SP_LIMIT \ | ||
| 188 | (_ALIGN_UP(sizeof(init_thread_info), 16) + (unsigned long) &init_stack) | ||
| 185 | 189 | ||
| 186 | 190 | ||
| 187 | #ifdef CONFIG_PPC32 | 191 | #ifdef CONFIG_PPC32 |
| 188 | #define INIT_THREAD { \ | 192 | #define INIT_THREAD { \ |
| 189 | .ksp = INIT_SP, \ | 193 | .ksp = INIT_SP, \ |
| 194 | .ksp_limit = INIT_SP_LIMIT, \ | ||
| 190 | .fs = KERNEL_DS, \ | 195 | .fs = KERNEL_DS, \ |
| 191 | .pgdir = swapper_pg_dir, \ | 196 | .pgdir = swapper_pg_dir, \ |
| 192 | .fpexc_mode = MSR_FE0 | MSR_FE1, \ | 197 | .fpexc_mode = MSR_FE0 | MSR_FE1, \ |
| @@ -194,6 +199,7 @@ struct thread_struct { | |||
| 194 | #else | 199 | #else |
| 195 | #define INIT_THREAD { \ | 200 | #define INIT_THREAD { \ |
| 196 | .ksp = INIT_SP, \ | 201 | .ksp = INIT_SP, \ |
| 202 | .ksp_limit = INIT_SP_LIMIT, \ | ||
| 197 | .regs = (struct pt_regs *)INIT_SP - 1, /* XXX bogus, I think */ \ | 203 | .regs = (struct pt_regs *)INIT_SP - 1, /* XXX bogus, I think */ \ |
| 198 | .fs = KERNEL_DS, \ | 204 | .fs = KERNEL_DS, \ |
| 199 | .fpr = {0}, \ | 205 | .fpr = {0}, \ |
diff --git a/include/asm-powerpc/ps3.h b/include/asm-powerpc/ps3.h index 9e8ed6824e15..81ffe3b3c1ce 100644 --- a/include/asm-powerpc/ps3.h +++ b/include/asm-powerpc/ps3.h | |||
| @@ -178,9 +178,6 @@ enum ps3_cpu_binding { | |||
| 178 | PS3_BINDING_CPU_1 = 1, | 178 | PS3_BINDING_CPU_1 = 1, |
| 179 | }; | 179 | }; |
| 180 | 180 | ||
| 181 | int ps3_virq_setup(enum ps3_cpu_binding cpu, unsigned long outlet, | ||
| 182 | unsigned int *virq); | ||
| 183 | int ps3_virq_destroy(unsigned int virq); | ||
| 184 | int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet, | 181 | int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet, |
| 185 | unsigned int *virq); | 182 | unsigned int *virq); |
| 186 | int ps3_irq_plug_destroy(unsigned int virq); | 183 | int ps3_irq_plug_destroy(unsigned int virq); |
diff --git a/include/asm-powerpc/rio.h b/include/asm-powerpc/rio.h new file mode 100644 index 000000000000..0018bf80cb25 --- /dev/null +++ b/include/asm-powerpc/rio.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | /* | ||
| 2 | * RapidIO architecture support | ||
| 3 | * | ||
| 4 | * Copyright 2005 MontaVista Software, Inc. | ||
| 5 | * Matt Porter <mporter@kernel.crashing.org> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify it | ||
| 8 | * under the terms of the GNU General Public License as published by the | ||
| 9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 10 | * option) any later version. | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef ASM_PPC_RIO_H | ||
| 14 | #define ASM_PPC_RIO_H | ||
| 15 | |||
| 16 | extern void platform_rio_init(void); | ||
| 17 | |||
| 18 | #endif /* ASM_PPC_RIO_H */ | ||
diff --git a/include/asm-powerpc/syscalls.h b/include/asm-powerpc/syscalls.h index b3ca41fc8bb1..2b8a458f990a 100644 --- a/include/asm-powerpc/syscalls.h +++ b/include/asm-powerpc/syscalls.h | |||
| @@ -30,7 +30,7 @@ asmlinkage int sys_fork(unsigned long p1, unsigned long p2, | |||
| 30 | asmlinkage int sys_vfork(unsigned long p1, unsigned long p2, | 30 | asmlinkage int sys_vfork(unsigned long p1, unsigned long p2, |
| 31 | unsigned long p3, unsigned long p4, unsigned long p5, | 31 | unsigned long p3, unsigned long p4, unsigned long p5, |
| 32 | unsigned long p6, struct pt_regs *regs); | 32 | unsigned long p6, struct pt_regs *regs); |
| 33 | asmlinkage int sys_pipe(int __user *fildes); | 33 | asmlinkage long sys_pipe(int __user *fildes); |
| 34 | asmlinkage long sys_rt_sigaction(int sig, | 34 | asmlinkage long sys_rt_sigaction(int sig, |
| 35 | const struct sigaction __user *act, | 35 | const struct sigaction __user *act, |
| 36 | struct sigaction __user *oact, size_t sigsetsize); | 36 | struct sigaction __user *oact, size_t sigsetsize); |
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h index fab1674b31b6..2b6559a6d113 100644 --- a/include/asm-powerpc/system.h +++ b/include/asm-powerpc/system.h | |||
| @@ -204,7 +204,7 @@ extern int powersave_nap; /* set if nap mode can be used in idle loop */ | |||
| 204 | * Changes the memory location '*ptr' to be val and returns | 204 | * Changes the memory location '*ptr' to be val and returns |
| 205 | * the previous value stored there. | 205 | * the previous value stored there. |
| 206 | */ | 206 | */ |
| 207 | static __inline__ unsigned long | 207 | static __always_inline unsigned long |
| 208 | __xchg_u32(volatile void *p, unsigned long val) | 208 | __xchg_u32(volatile void *p, unsigned long val) |
| 209 | { | 209 | { |
| 210 | unsigned long prev; | 210 | unsigned long prev; |
| @@ -229,7 +229,7 @@ __xchg_u32(volatile void *p, unsigned long val) | |||
| 229 | * Changes the memory location '*ptr' to be val and returns | 229 | * Changes the memory location '*ptr' to be val and returns |
| 230 | * the previous value stored there. | 230 | * the previous value stored there. |
| 231 | */ | 231 | */ |
| 232 | static __inline__ unsigned long | 232 | static __always_inline unsigned long |
| 233 | __xchg_u32_local(volatile void *p, unsigned long val) | 233 | __xchg_u32_local(volatile void *p, unsigned long val) |
| 234 | { | 234 | { |
| 235 | unsigned long prev; | 235 | unsigned long prev; |
| @@ -247,7 +247,7 @@ __xchg_u32_local(volatile void *p, unsigned long val) | |||
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | #ifdef CONFIG_PPC64 | 249 | #ifdef CONFIG_PPC64 |
| 250 | static __inline__ unsigned long | 250 | static __always_inline unsigned long |
| 251 | __xchg_u64(volatile void *p, unsigned long val) | 251 | __xchg_u64(volatile void *p, unsigned long val) |
| 252 | { | 252 | { |
| 253 | unsigned long prev; | 253 | unsigned long prev; |
| @@ -266,7 +266,7 @@ __xchg_u64(volatile void *p, unsigned long val) | |||
| 266 | return prev; | 266 | return prev; |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | static __inline__ unsigned long | 269 | static __always_inline unsigned long |
| 270 | __xchg_u64_local(volatile void *p, unsigned long val) | 270 | __xchg_u64_local(volatile void *p, unsigned long val) |
| 271 | { | 271 | { |
| 272 | unsigned long prev; | 272 | unsigned long prev; |
| @@ -290,7 +290,7 @@ __xchg_u64_local(volatile void *p, unsigned long val) | |||
| 290 | */ | 290 | */ |
| 291 | extern void __xchg_called_with_bad_pointer(void); | 291 | extern void __xchg_called_with_bad_pointer(void); |
| 292 | 292 | ||
| 293 | static __inline__ unsigned long | 293 | static __always_inline unsigned long |
| 294 | __xchg(volatile void *ptr, unsigned long x, unsigned int size) | 294 | __xchg(volatile void *ptr, unsigned long x, unsigned int size) |
| 295 | { | 295 | { |
| 296 | switch (size) { | 296 | switch (size) { |
| @@ -305,7 +305,7 @@ __xchg(volatile void *ptr, unsigned long x, unsigned int size) | |||
| 305 | return x; | 305 | return x; |
| 306 | } | 306 | } |
| 307 | 307 | ||
| 308 | static __inline__ unsigned long | 308 | static __always_inline unsigned long |
| 309 | __xchg_local(volatile void *ptr, unsigned long x, unsigned int size) | 309 | __xchg_local(volatile void *ptr, unsigned long x, unsigned int size) |
| 310 | { | 310 | { |
| 311 | switch (size) { | 311 | switch (size) { |
| @@ -338,7 +338,7 @@ __xchg_local(volatile void *ptr, unsigned long x, unsigned int size) | |||
| 338 | */ | 338 | */ |
| 339 | #define __HAVE_ARCH_CMPXCHG 1 | 339 | #define __HAVE_ARCH_CMPXCHG 1 |
| 340 | 340 | ||
| 341 | static __inline__ unsigned long | 341 | static __always_inline unsigned long |
| 342 | __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) | 342 | __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) |
| 343 | { | 343 | { |
| 344 | unsigned int prev; | 344 | unsigned int prev; |
| @@ -361,7 +361,7 @@ __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) | |||
| 361 | return prev; | 361 | return prev; |
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | static __inline__ unsigned long | 364 | static __always_inline unsigned long |
| 365 | __cmpxchg_u32_local(volatile unsigned int *p, unsigned long old, | 365 | __cmpxchg_u32_local(volatile unsigned int *p, unsigned long old, |
| 366 | unsigned long new) | 366 | unsigned long new) |
| 367 | { | 367 | { |
| @@ -384,7 +384,7 @@ __cmpxchg_u32_local(volatile unsigned int *p, unsigned long old, | |||
| 384 | } | 384 | } |
| 385 | 385 | ||
| 386 | #ifdef CONFIG_PPC64 | 386 | #ifdef CONFIG_PPC64 |
| 387 | static __inline__ unsigned long | 387 | static __always_inline unsigned long |
| 388 | __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new) | 388 | __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new) |
| 389 | { | 389 | { |
| 390 | unsigned long prev; | 390 | unsigned long prev; |
| @@ -406,7 +406,7 @@ __cmpxchg_u64(volatile unsigned long *p, unsigned long old, unsigned long new) | |||
| 406 | return prev; | 406 | return prev; |
| 407 | } | 407 | } |
| 408 | 408 | ||
| 409 | static __inline__ unsigned long | 409 | static __always_inline unsigned long |
| 410 | __cmpxchg_u64_local(volatile unsigned long *p, unsigned long old, | 410 | __cmpxchg_u64_local(volatile unsigned long *p, unsigned long old, |
| 411 | unsigned long new) | 411 | unsigned long new) |
| 412 | { | 412 | { |
| @@ -432,7 +432,7 @@ __cmpxchg_u64_local(volatile unsigned long *p, unsigned long old, | |||
| 432 | if something tries to do an invalid cmpxchg(). */ | 432 | if something tries to do an invalid cmpxchg(). */ |
| 433 | extern void __cmpxchg_called_with_bad_pointer(void); | 433 | extern void __cmpxchg_called_with_bad_pointer(void); |
| 434 | 434 | ||
| 435 | static __inline__ unsigned long | 435 | static __always_inline unsigned long |
| 436 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, | 436 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, |
| 437 | unsigned int size) | 437 | unsigned int size) |
| 438 | { | 438 | { |
| @@ -448,7 +448,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, | |||
| 448 | return old; | 448 | return old; |
| 449 | } | 449 | } |
| 450 | 450 | ||
| 451 | static __inline__ unsigned long | 451 | static __always_inline unsigned long |
| 452 | __cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new, | 452 | __cmpxchg_local(volatile void *ptr, unsigned long old, unsigned long new, |
| 453 | unsigned int size) | 453 | unsigned int size) |
| 454 | { | 454 | { |
diff --git a/include/asm-powerpc/types.h b/include/asm-powerpc/types.h index c243a6ac60e5..d3374bc865ba 100644 --- a/include/asm-powerpc/types.h +++ b/include/asm-powerpc/types.h | |||
| @@ -1,6 +1,12 @@ | |||
| 1 | #ifndef _ASM_POWERPC_TYPES_H | 1 | #ifndef _ASM_POWERPC_TYPES_H |
| 2 | #define _ASM_POWERPC_TYPES_H | 2 | #define _ASM_POWERPC_TYPES_H |
| 3 | 3 | ||
| 4 | #ifdef __powerpc64__ | ||
| 5 | # include <asm-generic/int-l64.h> | ||
| 6 | #else | ||
| 7 | # include <asm-generic/int-ll64.h> | ||
| 8 | #endif | ||
| 9 | |||
| 4 | #ifndef __ASSEMBLY__ | 10 | #ifndef __ASSEMBLY__ |
| 5 | 11 | ||
| 6 | /* | 12 | /* |
| @@ -22,30 +28,6 @@ typedef unsigned int umode_t; | |||
| 22 | typedef unsigned short umode_t; | 28 | typedef unsigned short umode_t; |
| 23 | #endif | 29 | #endif |
| 24 | 30 | ||
| 25 | /* | ||
| 26 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
| 27 | * header files exported to user space | ||
| 28 | */ | ||
| 29 | |||
| 30 | typedef __signed__ char __s8; | ||
| 31 | typedef unsigned char __u8; | ||
| 32 | |||
| 33 | typedef __signed__ short __s16; | ||
| 34 | typedef unsigned short __u16; | ||
| 35 | |||
| 36 | typedef __signed__ int __s32; | ||
| 37 | typedef unsigned int __u32; | ||
| 38 | |||
| 39 | #ifdef __powerpc64__ | ||
| 40 | typedef __signed__ long __s64; | ||
| 41 | typedef unsigned long __u64; | ||
| 42 | #else | ||
| 43 | #if defined(__GNUC__) | ||
| 44 | __extension__ typedef __signed__ long long __s64; | ||
| 45 | __extension__ typedef unsigned long long __u64; | ||
| 46 | #endif | ||
| 47 | #endif /* __powerpc64__ */ | ||
| 48 | |||
| 49 | typedef struct { | 31 | typedef struct { |
| 50 | __u32 u[4]; | 32 | __u32 u[4]; |
| 51 | } __attribute__((aligned(16))) __vector128; | 33 | } __attribute__((aligned(16))) __vector128; |
| @@ -64,24 +46,6 @@ typedef struct { | |||
| 64 | 46 | ||
| 65 | #ifndef __ASSEMBLY__ | 47 | #ifndef __ASSEMBLY__ |
| 66 | 48 | ||
| 67 | |||
| 68 | typedef signed char s8; | ||
| 69 | typedef unsigned char u8; | ||
| 70 | |||
| 71 | typedef signed short s16; | ||
| 72 | typedef unsigned short u16; | ||
| 73 | |||
| 74 | typedef signed int s32; | ||
| 75 | typedef unsigned int u32; | ||
| 76 | |||
| 77 | #ifdef __powerpc64__ | ||
| 78 | typedef signed long s64; | ||
| 79 | typedef unsigned long u64; | ||
| 80 | #else | ||
| 81 | typedef signed long long s64; | ||
| 82 | typedef unsigned long long u64; | ||
| 83 | #endif | ||
| 84 | |||
| 85 | typedef __vector128 vector128; | 49 | typedef __vector128 vector128; |
| 86 | 50 | ||
| 87 | /* Physical address used by some IO functions */ | 51 | /* Physical address used by some IO functions */ |
diff --git a/include/asm-powerpc/unaligned.h b/include/asm-powerpc/unaligned.h index 6c95dfa2652f..5f1b1e3c2137 100644 --- a/include/asm-powerpc/unaligned.h +++ b/include/asm-powerpc/unaligned.h | |||
| @@ -5,15 +5,12 @@ | |||
| 5 | 5 | ||
| 6 | /* | 6 | /* |
| 7 | * The PowerPC can do unaligned accesses itself in big endian mode. | 7 | * The PowerPC can do unaligned accesses itself in big endian mode. |
| 8 | * | ||
| 9 | * The strange macros are there to make sure these can't | ||
| 10 | * be misused in a way that makes them not work on other | ||
| 11 | * architectures where unaligned accesses aren't as simple. | ||
| 12 | */ | 8 | */ |
| 9 | #include <linux/unaligned/access_ok.h> | ||
| 10 | #include <linux/unaligned/generic.h> | ||
| 13 | 11 | ||
| 14 | #define get_unaligned(ptr) (*(ptr)) | 12 | #define get_unaligned __get_unaligned_be |
| 15 | 13 | #define put_unaligned __put_unaligned_be | |
| 16 | #define put_unaligned(val, ptr) ((void)( *(ptr) = (val) )) | ||
| 17 | 14 | ||
| 18 | #endif /* __KERNEL__ */ | 15 | #endif /* __KERNEL__ */ |
| 19 | #endif /* _ASM_POWERPC_UNALIGNED_H */ | 16 | #endif /* _ASM_POWERPC_UNALIGNED_H */ |
