Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91574
b: refs/heads/master
c: eb0cd5f
h: refs/heads/master
v: v3
  • Loading branch information
Kumar Gala committed Apr 17, 2008
1 parent 76fa4eb commit f6cd27e
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 31 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: 858c52d15f186e055dc33a1872f5b45a66d42296
refs/heads/master: eb0cd5fd295f469b4782d8088f3e39019da44707
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/kernel/head_44x.S
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ skpinv: addi r4,r4,1 /* Increment */
SET_IVOR(12, WatchdogTimer);
SET_IVOR(13, DataTLBError);
SET_IVOR(14, InstructionTLBError);
SET_IVOR(15, Debug);
SET_IVOR(15, DebugCrit);

/* Establish the interrupt vector base */
lis r4,interrupt_base@h /* IVPR only uses the high 16-bits */
Expand Down Expand Up @@ -578,7 +578,7 @@ interrupt_base:
b InstructionStorage

/* Debug Interrupt */
DEBUG_EXCEPTION
DEBUG_CRIT_EXCEPTION

/*
* Local functions
Expand Down
33 changes: 20 additions & 13 deletions trunk/arch/powerpc/kernel/head_booke.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,17 @@
* is necessary since the MMU is always on, for Book-E parts, and the stacks
* are offset from KERNELBASE.
*
* There is some space optimization to be had here if desired. However
* to allow for a common kernel with support for debug exceptions either
* going to critical or their own debug level we aren't currently
* providing configurations that micro-optimize space usage.
*/
#define BOOKE_EXCEPTION_STACK_SIZE (8192)
#ifdef CONFIG_44x
#define NUM_EXCEPTION_LVLS 2
#else
#define NUM_EXCEPTION_LVLS 3
#endif
#define BOOKE_EXCEPTION_STACK_SIZE (4096 * NUM_EXCEPTION_LVLS)

/* CRIT_SPRG only used in critical exception handling */
#define CRIT_SPRG SPRN_SPRG2
Expand All @@ -68,7 +77,7 @@
#define CRIT_STACK_TOP (exception_stack_top)

/* only on e200 for now */
#define DEBUG_STACK_TOP (exception_stack_top - 4096)
#define DEBUG_STACK_TOP (exception_stack_top - 8192)
#define DEBUG_SPRG SPRN_SPRG6W

#ifdef CONFIG_SMP
Expand Down Expand Up @@ -212,9 +221,8 @@
* save (and later restore) the MSR via SPRN_CSRR1, which will still have
* the MSR_DE bit set.
*/
#ifdef CONFIG_E200
#define DEBUG_EXCEPTION \
START_EXCEPTION(Debug); \
#define DEBUG_DEBUG_EXCEPTION \
START_EXCEPTION(DebugDebug); \
DEBUG_EXCEPTION_PROLOG; \
\
/* \
Expand All @@ -234,8 +242,8 @@
cmplw r12,r10; \
blt+ 2f; /* addr below exception vectors */ \
\
lis r10,Debug@h; \
ori r10,r10,Debug@l; \
lis r10,DebugDebug@h; \
ori r10,r10,DebugDebug@l; \
cmplw r12,r10; \
bgt+ 2f; /* addr above exception vectors */ \
\
Expand Down Expand Up @@ -265,9 +273,9 @@
2: mfspr r4,SPRN_DBSR; \
addi r3,r1,STACK_FRAME_OVERHEAD; \
EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, debug_transfer_to_handler, ret_from_debug_exc)
#else
#define DEBUG_EXCEPTION \
START_EXCEPTION(Debug); \

#define DEBUG_CRIT_EXCEPTION \
START_EXCEPTION(DebugCrit); \
CRITICAL_EXCEPTION_PROLOG; \
\
/* \
Expand All @@ -287,8 +295,8 @@
cmplw r12,r10; \
blt+ 2f; /* addr below exception vectors */ \
\
lis r10,Debug@h; \
ori r10,r10,Debug@l; \
lis r10,DebugCrit@h; \
ori r10,r10,DebugCrit@l; \
cmplw r12,r10; \
bgt+ 2f; /* addr above exception vectors */ \
\
Expand Down Expand Up @@ -318,7 +326,6 @@
2: mfspr r4,SPRN_DBSR; \
addi r3,r1,STACK_FRAME_OVERHEAD; \
EXC_XFER_TEMPLATE(DebugException, 0x2002, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), NOCOPY, crit_transfer_to_handler, ret_from_crit_exc)
#endif

#define INSTRUCTION_STORAGE_EXCEPTION \
START_EXCEPTION(InstructionStorage) \
Expand Down
10 changes: 8 additions & 2 deletions trunk/arch/powerpc/kernel/head_fsl_booke.S
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,10 @@ skpinv: addi r6,r6,1 /* Increment */
SET_IVOR(12, WatchdogTimer);
SET_IVOR(13, DataTLBError);
SET_IVOR(14, InstructionTLBError);
SET_IVOR(15, Debug);
SET_IVOR(15, DebugDebug);
#if defined(CONFIG_E500)
SET_IVOR(15, DebugCrit);
#endif
SET_IVOR(32, SPEUnavailable);
SET_IVOR(33, SPEFloatingPointData);
SET_IVOR(34, SPEFloatingPointRound);
Expand Down Expand Up @@ -738,7 +741,10 @@ interrupt_base:


/* Debug Interrupt */
DEBUG_EXCEPTION
DEBUG_DEBUG_EXCEPTION
#if defined(CONFIG_E500)
DEBUG_CRIT_EXCEPTION
#endif

/*
* Local functions
Expand Down
8 changes: 2 additions & 6 deletions trunk/arch/powerpc/platforms/cell/spufs/coredump.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ static struct spu_context *coredump_next_context(int *fd)
if (ctx->flags & SPU_CREATE_NOSCHED)
continue;

/* start searching the next fd next time we're called */
(*fd)++;
break;
}

Expand All @@ -155,9 +157,6 @@ int spufs_coredump_extra_notes_size(void)
break;

size += rc;

/* start searching the next fd next time */
fd++;
}

return size;
Expand Down Expand Up @@ -240,9 +239,6 @@ int spufs_coredump_extra_notes_write(struct file *file, loff_t *foffset)
}

spu_release_saved(ctx);

/* start searching the next fd next time */
fd++;
}

return 0;
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/powerpc/platforms/cell/spufs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ static u64 spufs_signal1_type_get(struct spu_context *ctx)
return ctx->ops->signal1_type_get(ctx);
}
DEFINE_SPUFS_ATTRIBUTE(spufs_signal1_type, spufs_signal1_type_get,
spufs_signal1_type_set, "%llu\n", SPU_ATTR_ACQUIRE);
spufs_signal1_type_set, "%llu", SPU_ATTR_ACQUIRE);


static int spufs_signal2_type_set(void *data, u64 val)
Expand All @@ -1359,7 +1359,7 @@ static u64 spufs_signal2_type_get(struct spu_context *ctx)
return ctx->ops->signal2_type_get(ctx);
}
DEFINE_SPUFS_ATTRIBUTE(spufs_signal2_type, spufs_signal2_type_get,
spufs_signal2_type_set, "%llu\n", SPU_ATTR_ACQUIRE);
spufs_signal2_type_set, "%llu", SPU_ATTR_ACQUIRE);

#if SPUFS_MMAP_4K
static unsigned long spufs_mss_mmap_nopfn(struct vm_area_struct *vma,
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/powerpc/platforms/cell/spufs/run.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,6 @@ static int spu_process_callback(struct spu_context *ctx)
return -EINTR;
}

/* need to re-get the ls, as it may have changed when we released the
* spu */
ls = (void __iomem *)ctx->ops->get_ls(ctx);

/* write result, jump over indirect pointer */
memcpy_toio(ls + ls_pointer, &spu_ret, sizeof(spu_ret));
ctx->ops->npc_write(ctx, npc);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/cell/spufs/switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,6 @@ static void save_csa(struct spu_state *prev, struct spu *spu)
save_mfc_csr_ato(prev, spu); /* Step 24. */
save_mfc_tclass_id(prev, spu); /* Step 25. */
set_mfc_tclass_id(prev, spu); /* Step 26. */
save_mfc_cmd(prev, spu); /* Step 26a - moved from 44. */
purge_mfc_queue(prev, spu); /* Step 27. */
wait_purge_complete(prev, spu); /* Step 28. */
setup_mfc_sr1(prev, spu); /* Step 30. */
Expand All @@ -1832,6 +1831,7 @@ static void save_csa(struct spu_state *prev, struct spu *spu)
save_ppuint_mb(prev, spu); /* Step 41. */
save_ch_part1(prev, spu); /* Step 42. */
save_spu_mb(prev, spu); /* Step 43. */
save_mfc_cmd(prev, spu); /* Step 44. */
reset_ch(prev, spu); /* Step 45. */
}

Expand Down

0 comments on commit f6cd27e

Please sign in to comment.