Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209966
b: refs/heads/master
c: 7af048d
h: refs/heads/master
v: v3
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Aug 24, 2010
1 parent 60c2c63 commit c59cefe
Show file tree
Hide file tree
Showing 106 changed files with 5,051 additions and 1,199 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 32e2f63bcc8903487975506d8db5931a8c4bbb1f
refs/heads/master: 7af048dc7639db5202c56fecf2346c310647a218
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-imx/mach-cpuimx27.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,13 @@ static void __init eukrea_cpuimx27_init(void)
#if defined(CONFIG_USB_ULPI)
if (otg_mode_host) {
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);

mxc_register_device(&mxc_otg_host, &otg_pdata);
}

usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);

mxc_register_device(&mxc_usbh2, &usbh2_pdata);
#endif
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-imx/mach-pca100.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,13 @@ static void __init pca100_init(void)
#if defined(CONFIG_USB_ULPI)
if (otg_mode_host) {
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);

mxc_register_device(&mxc_otg_host, &otg_pdata);
}

usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);

mxc_register_device(&mxc_usbh2, &usbh2_pdata);
#endif
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-mx25/mach-cpuimx25.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ static void __init eukrea_cpuimx25_init(void)
#if defined(CONFIG_USB_ULPI)
if (otg_mode_host) {
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);

mxc_register_device(&mxc_otg, &otg_pdata);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-mx3/mach-cpuimx35.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static void __init mxc_board_init(void)
#if defined(CONFIG_USB_ULPI)
if (otg_mode_host) {
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);

mxc_register_device(&mxc_otg_host, &otg_pdata);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/
all: zImage

# With make 3.82 we cannot mix normal and wildcard targets
BOOT_TARGETS1 := zImage zImage.initrd uImage
BOOT_TARGETS1 := zImage zImage.initrd uImaged
BOOT_TARGETS2 := zImage% dtbImage% treeImage.% cuImage.% simpleImage.%

PHONY += $(BOOT_TARGETS1) $(BOOT_TARGETS2)
Expand Down
8 changes: 0 additions & 8 deletions trunk/arch/powerpc/boot/dts/canyonlands.dts
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,6 @@
interrupts = <0x1e 4>;
};

SATA0: sata@bffd1000 {
compatible = "amcc,sata-460ex";
reg = <4 0xbffd1000 0x800 4 0xbffd0800 0x400>;
interrupt-parent = <&UIC3>;
interrupts = <0x0 0x4 /* SATA */
0x5 0x4>; /* AHBDMA */
};

POB0: opb {
compatible = "ibm,opb-460ex", "ibm,opb";
#address-cells = <1>;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/include/asm/mmu-hash64.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ typedef struct {
* with. However gcc is not clever enough to compute the
* modulus (2^n-1) without a second multiply.
*/
#define vsid_scramble(protovsid, size) \
#define vsid_scrample(protovsid, size) \
((((protovsid) * VSID_MULTIPLIER_##size) % VSID_MODULUS_##size))

#else /* 1 */
Expand Down
9 changes: 1 addition & 8 deletions trunk/arch/powerpc/include/asm/reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -951,14 +951,7 @@
#ifdef CONFIG_PPC64

extern void ppc64_runlatch_on(void);
extern void __ppc64_runlatch_off(void);

#define ppc64_runlatch_off() \
do { \
if (cpu_has_feature(CPU_FTR_CTRL) && \
test_thread_flag(TIF_RUNLATCH)) \
__ppc64_runlatch_off(); \
} while (0)
extern void ppc64_runlatch_off(void);

extern unsigned long scom970_read(unsigned int address);
extern void scom970_write(unsigned int address, unsigned long value);
Expand Down
64 changes: 27 additions & 37 deletions trunk/arch/powerpc/include/asm/rwsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,15 @@
/*
* the semaphore definition
*/
#ifdef CONFIG_PPC64
# define RWSEM_ACTIVE_MASK 0xffffffffL
#else
# define RWSEM_ACTIVE_MASK 0x0000ffffL
#endif

#define RWSEM_UNLOCKED_VALUE 0x00000000L
#define RWSEM_ACTIVE_BIAS 0x00000001L
#define RWSEM_WAITING_BIAS (-RWSEM_ACTIVE_MASK-1)
struct rw_semaphore {
/* XXX this should be able to be an atomic_t -- paulus */
signed int count;
#define RWSEM_UNLOCKED_VALUE 0x00000000
#define RWSEM_ACTIVE_BIAS 0x00000001
#define RWSEM_ACTIVE_MASK 0x0000ffff
#define RWSEM_WAITING_BIAS (-0x00010000)
#define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS
#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)

struct rw_semaphore {
long count;
spinlock_t wait_lock;
struct list_head wait_list;
#ifdef CONFIG_DEBUG_LOCK_ALLOC
Expand All @@ -48,13 +43,9 @@ struct rw_semaphore {
# define __RWSEM_DEP_MAP_INIT(lockname)
#endif

#define __RWSEM_INITIALIZER(name) \
{ \
RWSEM_UNLOCKED_VALUE, \
__SPIN_LOCK_UNLOCKED((name).wait_lock), \
LIST_HEAD_INIT((name).wait_list) \
__RWSEM_DEP_MAP_INIT(name) \
}
#define __RWSEM_INITIALIZER(name) \
{ RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \
LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) }

#define DECLARE_RWSEM(name) \
struct rw_semaphore name = __RWSEM_INITIALIZER(name)
Expand All @@ -79,13 +70,13 @@ extern void __init_rwsem(struct rw_semaphore *sem, const char *name,
*/
static inline void __down_read(struct rw_semaphore *sem)
{
if (unlikely(atomic_long_inc_return((atomic_long_t *)&sem->count) <= 0))
if (unlikely(atomic_inc_return((atomic_t *)(&sem->count)) <= 0))
rwsem_down_read_failed(sem);
}

static inline int __down_read_trylock(struct rw_semaphore *sem)
{
long tmp;
int tmp;

while ((tmp = sem->count) >= 0) {
if (tmp == cmpxchg(&sem->count, tmp,
Expand All @@ -101,10 +92,10 @@ static inline int __down_read_trylock(struct rw_semaphore *sem)
*/
static inline void __down_write_nested(struct rw_semaphore *sem, int subclass)
{
long tmp;
int tmp;

tmp = atomic_long_add_return(RWSEM_ACTIVE_WRITE_BIAS,
(atomic_long_t *)&sem->count);
tmp = atomic_add_return(RWSEM_ACTIVE_WRITE_BIAS,
(atomic_t *)(&sem->count));
if (unlikely(tmp != RWSEM_ACTIVE_WRITE_BIAS))
rwsem_down_write_failed(sem);
}
Expand All @@ -116,7 +107,7 @@ static inline void __down_write(struct rw_semaphore *sem)

static inline int __down_write_trylock(struct rw_semaphore *sem)
{
long tmp;
int tmp;

tmp = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE,
RWSEM_ACTIVE_WRITE_BIAS);
Expand All @@ -128,9 +119,9 @@ static inline int __down_write_trylock(struct rw_semaphore *sem)
*/
static inline void __up_read(struct rw_semaphore *sem)
{
long tmp;
int tmp;

tmp = atomic_long_dec_return((atomic_long_t *)&sem->count);
tmp = atomic_dec_return((atomic_t *)(&sem->count));
if (unlikely(tmp < -1 && (tmp & RWSEM_ACTIVE_MASK) == 0))
rwsem_wake(sem);
}
Expand All @@ -140,43 +131,42 @@ static inline void __up_read(struct rw_semaphore *sem)
*/
static inline void __up_write(struct rw_semaphore *sem)
{
if (unlikely(atomic_long_sub_return(RWSEM_ACTIVE_WRITE_BIAS,
(atomic_long_t *)&sem->count) < 0))
if (unlikely(atomic_sub_return(RWSEM_ACTIVE_WRITE_BIAS,
(atomic_t *)(&sem->count)) < 0))
rwsem_wake(sem);
}

/*
* implement atomic add functionality
*/
static inline void rwsem_atomic_add(long delta, struct rw_semaphore *sem)
static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem)
{
atomic_long_add(delta, (atomic_long_t *)&sem->count);
atomic_add(delta, (atomic_t *)(&sem->count));
}

/*
* downgrade write lock to read lock
*/
static inline void __downgrade_write(struct rw_semaphore *sem)
{
long tmp;
int tmp;

tmp = atomic_long_add_return(-RWSEM_WAITING_BIAS,
(atomic_long_t *)&sem->count);
tmp = atomic_add_return(-RWSEM_WAITING_BIAS, (atomic_t *)(&sem->count));
if (tmp < 0)
rwsem_downgrade_wake(sem);
}

/*
* implement exchange and add functionality
*/
static inline long rwsem_atomic_update(long delta, struct rw_semaphore *sem)
static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem)
{
return atomic_long_add_return(delta, (atomic_long_t *)&sem->count);
return atomic_add_return(delta, (atomic_t *)(&sem->count));
}

static inline int rwsem_is_locked(struct rw_semaphore *sem)
{
return sem->count != 0;
return (sem->count != 0);
}

#endif /* __KERNEL__ */
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/powerpc/include/asm/systbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,3 @@ SYSCALL_SPU(perf_event_open)
COMPAT_SYS_SPU(preadv)
COMPAT_SYS_SPU(pwritev)
COMPAT_SYS(rt_tgsigqueueinfo)
SYSCALL(fanotify_init)
COMPAT_SYS(fanotify_mark)
SYSCALL_SPU(prlimit64)
5 changes: 1 addition & 4 deletions trunk/arch/powerpc/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,10 @@
#define __NR_preadv 320
#define __NR_pwritev 321
#define __NR_rt_tgsigqueueinfo 322
#define __NR_fanotify_init 323
#define __NR_fanotify_mark 324
#define __NR_prlimit64 325

#ifdef __KERNEL__

#define __NR_syscalls 326
#define __NR_syscalls 323

#define __NR__exit __NR_exit
#define NR_syscalls __NR_syscalls
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/kernel/cputable.c
Original file line number Diff line number Diff line change
Expand Up @@ -1826,6 +1826,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
.cpu_features = CPU_FTRS_47X,
.cpu_user_features = COMMON_USER_BOOKE |
PPC_FEATURE_HAS_FPU,
.cpu_user_features = COMMON_USER_BOOKE,
.mmu_features = MMU_FTR_TYPE_47x |
MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
.icache_bsize = 32,
Expand Down
24 changes: 11 additions & 13 deletions trunk/arch/powerpc/kernel/crash.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,18 +402,6 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
*/
hard_irq_disable();

/*
* Make a note of crashing cpu. Will be used in machine_kexec
* such that another IPI will not be sent.
*/
crashing_cpu = smp_processor_id();
crash_save_cpu(regs, crashing_cpu);
crash_kexec_prepare_cpus(crashing_cpu);
cpu_set(crashing_cpu, cpus_in_crash);
#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP)
crash_kexec_wait_realmode(crashing_cpu);
#endif

for_each_irq(i) {
struct irq_desc *desc = irq_to_desc(i);

Expand Down Expand Up @@ -450,8 +438,18 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
crash_shutdown_cpu = -1;
__debugger_fault_handler = old_handler;

/*
* Make a note of crashing cpu. Will be used in machine_kexec
* such that another IPI will not be sent.
*/
crashing_cpu = smp_processor_id();
crash_save_cpu(regs, crashing_cpu);
crash_kexec_prepare_cpus(crashing_cpu);
cpu_set(crashing_cpu, cpus_in_crash);
crash_kexec_stop_spus();

#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP)
crash_kexec_wait_realmode(crashing_cpu);
#endif
if (ppc_md.kexec_cpu_down)
ppc_md.kexec_cpu_down(1, 0);
}
4 changes: 0 additions & 4 deletions trunk/arch/powerpc/kernel/head_44x.S
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ _ENTRY(_start);
stw r5, 0(r4) /* Save abatron_pteptrs at a fixed location */
stw r6, 0(r5)

/* Clear the Machine Check Syndrome Register */
li r0,0
mtspr SPRN_MCSR,r0

/* Let's move on */
lis r4,start_kernel@h
ori r4,r4,start_kernel@l
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/powerpc/kernel/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -572,16 +572,16 @@ __secondary_start:
/* Set thread priority to MEDIUM */
HMT_MEDIUM

/* Do early setup for that CPU (stab, slb, hash table pointer) */
bl .early_setup_secondary

/* Initialize the kernel stack. Just a repeat for iSeries. */
LOAD_REG_ADDR(r3, current_set)
sldi r28,r24,3 /* get current_set[cpu#] */
ldx r1,r3,r28
addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD
std r1,PACAKSAVE(r13)

/* Do early setup for that CPU (stab, slb, hash table pointer) */
bl .early_setup_secondary

/* Clear backchain so we get nice backtraces */
li r7,0
mtlr r7
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ void cpu_idle(void)
HMT_medium();
ppc64_runlatch_on();
tick_nohz_restart_sched_tick();
preempt_enable_no_resched();
if (cpu_should_die())
cpu_die();
preempt_enable_no_resched();
schedule();
preempt_disable();
}
Expand Down
Loading

0 comments on commit c59cefe

Please sign in to comment.