LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] implement error event delivery to user space
From: Arnd Bergmann @ 2006-06-23 19:12 UTC (permalink / raw)
  To: cbe-oss-dev; +Cc: linuxppc-dev

From: Christoph Hellwig <hch@infradead.org>

This tries to fix spufs so we have an interface closer
to what is specified in the man page for events
returned in the third argument of spu_run.

Fortunately, libspe has never been using the returned
contents of that register, as they were the same
as the return code of spu_run (duh!).

This returns what we need from libspe, but only
when a flag was set on spu_create. Now that flag
was previously not documented, so we're actually
extending the semantics here.

One big question that keeps nagging me is whether
we want to actually allow a thread to run on after
it has hit a critical error like invalid DMA addresses
or illegal opcodes. I can't really think of an example
where we would want to do that, so I tend to go down
the easy route of not supporting that, but there may
be scenarios that I haven't thought of.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>

Index: linus-2.6/arch/powerpc/platforms/cell/spu_base.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/spu_base.c
+++ linus-2.6/arch/powerpc/platforms/cell/spu_base.c
@@ -46,21 +46,21 @@ EXPORT_SYMBOL_GPL(spu_priv1_ops);
 static int __spu_trap_invalid_dma(struct spu *spu)
 {
 	pr_debug("%s\n", __FUNCTION__);
-	force_sig(SIGBUS, /* info, */ current);
+	spu->dma_callback(spu, SPE_EVENT_INVALID_DMA);
 	return 0;
 }
 
 static int __spu_trap_dma_align(struct spu *spu)
 {
 	pr_debug("%s\n", __FUNCTION__);
-	force_sig(SIGBUS, /* info, */ current);
+	spu->dma_callback(spu, SPE_EVENT_DMA_ALIGNMENT);
 	return 0;
 }
 
 static int __spu_trap_error(struct spu *spu)
 {
 	pr_debug("%s\n", __FUNCTION__);
-	force_sig(SIGILL, /* info, */ current);
+	spu->dma_callback(spu, SPE_EVENT_SPE_ERROR);
 	return 0;
 }
 
Index: linus-2.6/arch/powerpc/platforms/cell/spufs/inode.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/spufs/inode.c
+++ linus-2.6/arch/powerpc/platforms/cell/spufs/inode.c
@@ -225,7 +225,8 @@ struct file_operations spufs_context_fop
 };
 
 static int
-spufs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
+spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags,
+		int mode)
 {
 	int ret;
 	struct inode *inode;
@@ -245,6 +246,8 @@ spufs_mkdir(struct inode *dir, struct de
 	if (!ctx)
 		goto out_iput;
 
+	ctx->flags = flags;
+
 	inode->i_op = &spufs_dir_inode_operations;
 	inode->i_fop = &simple_dir_operations;
 	ret = spufs_fill_dir(dentry, spufs_dir_contents, mode, ctx);
@@ -305,7 +308,7 @@ long spufs_create_thread(struct nameidat
 		goto out;
 
 	/* all flags are reserved */
-	if (flags)
+	if (flags & (~SPU_CREATE_FLAG_ALL))
 		goto out;
 
 	dentry = lookup_create(nd, 1);
@@ -318,7 +321,7 @@ long spufs_create_thread(struct nameidat
 		goto out_dput;
 
 	mode &= ~current->fs->umask;
-	ret = spufs_mkdir(nd->dentry->d_inode, dentry, mode & S_IRWXUGO);
+	ret = spufs_mkdir(nd->dentry->d_inode, dentry, flags, mode & S_IRWXUGO);
 	if (ret)
 		goto out_dput;
 
Index: linus-2.6/arch/powerpc/platforms/cell/spufs/run.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/spufs/run.c
+++ linus-2.6/arch/powerpc/platforms/cell/spufs/run.c
@@ -14,6 +14,26 @@ void spufs_stop_callback(struct spu *spu
 	wake_up_all(&ctx->stop_wq);
 }
 
+void spufs_dma_callback(struct spu *spu, int type)
+{
+	struct spu_context *ctx = spu->ctx;
+
+	if (ctx->flags & SPU_CREATE_EVENTS_ENABLED) {
+		ctx->event_return |= type;
+		wake_up_all(&ctx->stop_wq);
+	} else {
+		switch (type) {
+		case SPE_EVENT_DMA_ALIGNMENT:
+		case SPE_EVENT_INVALID_DMA:
+			force_sig(SIGBUS, /* info, */ current);
+			break;
+		case SPE_EVENT_SPE_ERROR:
+			force_sig(SIGILL, /* info */ current);
+			break;
+		}
+	}
+}
+
 static inline int spu_stopped(struct spu_context *ctx, u32 * stat)
 {
 	struct spu *spu;
@@ -28,8 +48,7 @@ static inline int spu_stopped(struct spu
 	return (!(*stat & 0x1) || pte_fault || spu->class_0_pending) ? 1 : 0;
 }
 
-static inline int spu_run_init(struct spu_context *ctx, u32 * npc,
-			       u32 * status)
+static inline int spu_run_init(struct spu_context *ctx, u32 * npc)
 {
 	int ret;
 
@@ -72,7 +91,7 @@ static inline int spu_reacquire_runnable
 		       SPU_STATUS_STOPPED_BY_HALT)) {
 		return *status;
 	}
-	if ((ret = spu_run_init(ctx, npc, status)) != 0)
+	if ((ret = spu_run_init(ctx, npc)) != 0)
 		return ret;
 	return 0;
 }
@@ -177,46 +196,49 @@ static inline int spu_process_events(str
 }
 
 long spufs_run_spu(struct file *file, struct spu_context *ctx,
-		   u32 * npc, u32 * status)
+		   u32 *npc, u32 *event)
 {
 	int ret;
+	u32 status;
 
 	if (down_interruptible(&ctx->run_sema))
 		return -ERESTARTSYS;
 
-	ret = spu_run_init(ctx, npc, status);
+	ctx->event_return = 0;
+	ret = spu_run_init(ctx, npc);
 	if (ret)
 		goto out;
 
 	do {
-		ret = spufs_wait(ctx->stop_wq, spu_stopped(ctx, status));
+		ret = spufs_wait(ctx->stop_wq, spu_stopped(ctx, &status));
 		if (unlikely(ret))
 			break;
-		if ((*status & SPU_STATUS_STOPPED_BY_STOP) &&
-		    (*status >> SPU_STOP_STATUS_SHIFT == 0x2104)) {
+		if ((status & SPU_STATUS_STOPPED_BY_STOP) &&
+		    (status >> SPU_STOP_STATUS_SHIFT == 0x2104)) {
 			ret = spu_process_callback(ctx);
 			if (ret)
 				break;
-			*status &= ~SPU_STATUS_STOPPED_BY_STOP;
+			status &= ~SPU_STATUS_STOPPED_BY_STOP;
 		}
 		if (unlikely(ctx->state != SPU_STATE_RUNNABLE)) {
-			ret = spu_reacquire_runnable(ctx, npc, status);
+			ret = spu_reacquire_runnable(ctx, npc, &status);
 			if (ret)
 				goto out;
 			continue;
 		}
 		ret = spu_process_events(ctx);
 
-	} while (!ret && !(*status & (SPU_STATUS_STOPPED_BY_STOP |
+	} while (!ret && !(status & (SPU_STATUS_STOPPED_BY_STOP |
 				      SPU_STATUS_STOPPED_BY_HALT)));
 
 	ctx->ops->runcntl_stop(ctx);
-	ret = spu_run_fini(ctx, npc, status);
+	ret = spu_run_fini(ctx, npc, &status);
 	if (!ret)
-		ret = *status;
+		ret = status;
 	spu_yield(ctx);
 
 out:
+	*event = ctx->event_return;
 	up(&ctx->run_sema);
 	return ret;
 }
Index: linus-2.6/arch/powerpc/platforms/cell/spufs/sched.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/spufs/sched.c
+++ linus-2.6/arch/powerpc/platforms/cell/spufs/sched.c
@@ -102,7 +102,6 @@ static inline void bind_context(struct s
 		 spu->number, spu->node);
 	spu->ctx = ctx;
 	spu->flags = 0;
-	ctx->flags = 0;
 	ctx->spu = spu;
 	ctx->ops = &spu_hw_ops;
 	spu->pid = current->pid;
@@ -113,6 +112,7 @@ static inline void bind_context(struct s
 	spu->wbox_callback = spufs_wbox_callback;
 	spu->stop_callback = spufs_stop_callback;
 	spu->mfc_callback = spufs_mfc_callback;
+	spu->dma_callback = spufs_dma_callback;
 	mb();
 	spu_unmap_mappings(ctx);
 	spu_restore(&ctx->csa, spu);
@@ -134,12 +134,12 @@ static inline void unbind_context(struct
 	spu->wbox_callback = NULL;
 	spu->stop_callback = NULL;
 	spu->mfc_callback = NULL;
+	spu->dma_callback = NULL;
 	spu->mm = NULL;
 	spu->pid = 0;
 	spu->prio = MAX_PRIO;
 	ctx->ops = &spu_backing_ops;
 	ctx->spu = NULL;
-	ctx->flags = 0;
 	spu->flags = 0;
 	spu->ctx = NULL;
 }
Index: linus-2.6/arch/powerpc/platforms/cell/spufs/spufs.h
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/spufs/spufs.h
+++ linus-2.6/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -67,7 +67,8 @@ struct spu_context {
 	u32 tagwait;
 	struct spu_context_ops *ops;
 	struct work_struct reap_work;
-	u64 flags;
+	unsigned long flags;
+	unsigned long event_return;
 };
 
 struct mfc_dma_command {
@@ -184,5 +185,6 @@ void spufs_ibox_callback(struct spu *spu
 void spufs_wbox_callback(struct spu *spu);
 void spufs_stop_callback(struct spu *spu);
 void spufs_mfc_callback(struct spu *spu);
+void spufs_dma_callback(struct spu *spu, int type);
 
 #endif
Index: linus-2.6/include/asm-powerpc/spu.h
===================================================================
--- linus-2.6.orig/include/asm-powerpc/spu.h
+++ linus-2.6/include/asm-powerpc/spu.h
@@ -138,6 +138,7 @@ struct spu {
 	void (* ibox_callback)(struct spu *spu);
 	void (* stop_callback)(struct spu *spu);
 	void (* mfc_callback)(struct spu *spu);
+	void (* dma_callback)(struct spu *spu, int type);
 
 	char irq_c0[8];
 	char irq_c1[8];
@@ -169,6 +170,19 @@ extern struct spufs_calls {
 	struct module *owner;
 } spufs_calls;
 
+/* return status from spu_run, same as in libspe */
+#define SPE_EVENT_DMA_ALIGNMENT		0x0008	/*A DMA alignment error */
+#define SPE_EVENT_SPE_ERROR		0x0010	/*An illegal instruction error*/
+#define SPE_EVENT_SPE_DATA_SEGMENT	0x0020	/*A DMA segmentation error    */
+#define SPE_EVENT_SPE_DATA_STORAGE	0x0040	/*A DMA storage error */
+#define SPE_EVENT_INVALID_DMA		0x0800	/* Invalid MFC DMA */
+
+/*
+ * Flags for sys_spu_create.
+ */
+#define SPU_CREATE_EVENTS_ENABLED	0x0001
+#define SPU_CREATE_FLAG_ALL		0x0001 /* mask of all valid flags */
+
 #ifdef CONFIG_SPU_FS_MODULE
 int register_spu_syscalls(struct spufs_calls *calls);
 void unregister_spu_syscalls(struct spufs_calls *calls);
Index: linus-2.6/arch/powerpc/platforms/cell/spufs/syscalls.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/spufs/syscalls.c
+++ linus-2.6/arch/powerpc/platforms/cell/spufs/syscalls.c
@@ -38,7 +38,7 @@ static long do_spu_run(struct file *filp
 	u32 npc, status;
 
 	ret = -EFAULT;
-	if (get_user(npc, unpc) || get_user(status, ustatus))
+	if (get_user(npc, unpc))
 		goto out;
 
 	/* check if this file was created by spu_create */
@@ -49,7 +49,10 @@ static long do_spu_run(struct file *filp
 	i = SPUFS_I(filp->f_dentry->d_inode);
 	ret = spufs_run_spu(filp, i->i_ctx, &npc, &status);
 
-	if (put_user(npc, unpc) || put_user(status, ustatus))
+	if (put_user(npc, unpc))
+		ret = -EFAULT;
+
+	if (ustatus && put_user(status, ustatus))
 		ret = -EFAULT;
 out:
 	return ret;

^ permalink raw reply

* Re: "merge" branch reset in powerpc.git tree
From: Josh Boyer @ 2006-06-23 19:10 UTC (permalink / raw)
  To: Dave C Boutcher; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <17564.6980.694265.974713@hound.rchland.ibm.com>

On Fri, 2006-06-23 at 11:48 -0500, Dave C Boutcher wrote:
> On Fri, 23 Jun 2006 21:44:58 +1000, Paul Mackerras <paulus@samba.org> said:
> > 
> > If you are following the powerpc.git tree, and you pull the "merge"
> > branch, you will need to reset it to have commit ID
> > 5fa21d821f6972e70942f2c555ec29dde962bdb2 as its head.  That's also the
> > head of the "master" branch and of Linus' linux-2.6 tree at the
> > moment.
> 
> At risk of appearing like a git ignoramous...could you post the
> command to perform such a reset?

Run the following in that branch:

git reset --hard 5fa21d821f6972e70942f2c555ec29dde962bdb2

That will reset the branch to the commit ID.  NOTE:  If you have local
changes on top, they will be wiped out.

There might be a way to do it without losing local changes, but I'm a
git idiot myself still.

josh

^ permalink raw reply

* [PATCH 0/5] trivial spufs fixes
From: arnd @ 2006-06-23 19:03 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev, cbe-oss-dev, linux-kernel

These bug fixes have come up since the previous submission.
Please merge for 2.6.18.

	Arnd <><

^ permalink raw reply

* [PATCH 5/5] spufs: fix spufs_mfc_flush prototype
From: arnd @ 2006-06-23 18:57 UTC (permalink / raw)
  To: paulus; +Cc: Arnd Bergmann, linuxppc-dev, cbe-oss-dev, linux-kernel
In-Reply-To: <20060623185746.037897000@klappe.arndb.de>

The prototype for the flush file operation now has another
argument in 2.6.18.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Index: linus-2.6/arch/powerpc/platforms/cell/spufs/file.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/spufs/file.c
+++ linus-2.6/arch/powerpc/platforms/cell/spufs/file.c
@@ -1150,7 +1150,7 @@ static unsigned int spufs_mfc_poll(struc
 	return mask;
 }
 
-static int spufs_mfc_flush(struct file *file)
+static int spufs_mfc_flush(struct file *file, fl_owner_t id)
 {
 	struct spu_context *ctx = file->private_data;
 	int ret;
@@ -1176,7 +1176,7 @@ out:
 static int spufs_mfc_fsync(struct file *file, struct dentry *dentry,
 			   int datasync)
 {
-	return spufs_mfc_flush(file);
+	return spufs_mfc_flush(file, 0);
 }
 
 static int spufs_mfc_fasync(int fd, struct file *file, int on)

--

^ permalink raw reply

* [PATCH 4/5] spufs: fix class0 interrupt assignment
From: arnd @ 2006-06-23 18:57 UTC (permalink / raw)
  To: paulus; +Cc: Arnd Bergmann, linuxppc-dev, cbe-oss-dev, linux-kernel
In-Reply-To: <20060623185746.037897000@klappe.arndb.de>

The class zero interrupt handling for spus
was confusing alignment and error interrupts,
so swap them.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Index: linus-2.6/arch/powerpc/platforms/cell/spu_base.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/spu_base.c
+++ linus-2.6/arch/powerpc/platforms/cell/spu_base.c
@@ -168,12 +168,12 @@ spu_irq_class_0_bottom(struct spu *spu)
 
 	stat &= mask;
 
-	if (stat & 1) /* invalid MFC DMA */
-		__spu_trap_invalid_dma(spu);
-
-	if (stat & 2) /* invalid DMA alignment */
+	if (stat & 1) /* invalid DMA alignment */
 		__spu_trap_dma_align(spu);
 
+	if (stat & 2) /* invalid MFC DMA */
+		__spu_trap_invalid_dma(spu);
+
 	if (stat & 4) /* error on SPU */
 		__spu_trap_error(spu);
 

--

^ permalink raw reply

* [PATCH 3/5] spufs: fix memory hotplug dependency
From: arnd @ 2006-06-23 18:57 UTC (permalink / raw)
  To: paulus; +Cc: Arnd Bergmann, linuxppc-dev, cbe-oss-dev, linux-kernel
In-Reply-To: <20060623185746.037897000@klappe.arndb.de>

From: Geoff Levand <geoffrey.levand@am.sony.com>

spufs_base.c calls __add_pages, which depends on CONFIG_MEMORY_HOTPLUG.

Moved the selection of CONFIG_MEMORY_HOTPLUG from CONFIG_SPUFS_MMAP
to CONFIG_SPU_FS.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>

Index: linus-2.6/arch/powerpc/platforms/cell/Kconfig
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/Kconfig
+++ linus-2.6/arch/powerpc/platforms/cell/Kconfig
@@ -6,6 +6,7 @@ config SPU_FS
 	default m
 	depends on PPC_CELL
 	select SPU_BASE
+	select MEMORY_HOTPLUG
 	help
 	  The SPU file system is used to access Synergistic Processing
 	  Units on machines implementing the Broadband Processor
@@ -18,7 +19,6 @@ config SPU_BASE
 config SPUFS_MMAP
 	bool
 	depends on SPU_FS && SPARSEMEM
-	select MEMORY_HOTPLUG
 	default y
 
 config CBE_RAS

--

^ permalink raw reply

* [PATCH 2/5] spufs: fix MFC command queue purge
From: arnd @ 2006-06-23 18:57 UTC (permalink / raw)
  To: paulus; +Cc: Arnd Bergmann, linuxppc-dev, cbe-oss-dev, linux-kernel
In-Reply-To: <20060623185746.037897000@klappe.arndb.de>

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

In the context save/restore code, the SPU MFC command queue purge
code has a bug:

static inline void wait_purge_complete(struct spu_state *csa, struct
				       spu *spu)
{
    struct spu_priv2 __iomem *priv2 = spu->priv2;

    /* Save, Step 28:
     *     Poll MFC_CNTL[Ps] until value '11' is
     *     read
     *      (purge complete).
     */
    POLL_WHILE_FALSE(in_be64(&priv2->mfc_control_RW)
		     & MFC_CNTL_PURGE_DMA_COMPLETE);
}

This will exit as soon as _one_ of the 2 bits that compose
MFC_CNTL_PURGE_DMA_COMPLETE is set, and one of them happens to be
"purge in progress"...  which means that we'll happily continue
restoring the MFC while it's being purged at the same time.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Index: linus-2.6/arch/powerpc/platforms/cell/spufs/switch.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/spufs/switch.c
+++ linus-2.6/arch/powerpc/platforms/cell/spufs/switch.c
@@ -464,7 +464,8 @@ static inline void wait_purge_complete(s
 	 *     Poll MFC_CNTL[Ps] until value '11' is read
 	 *     (purge complete).
 	 */
-	POLL_WHILE_FALSE(in_be64(&priv2->mfc_control_RW) &
+	POLL_WHILE_FALSE((in_be64(&priv2->mfc_control_RW) &
+			 MFC_CNTL_PURGE_DMA_STATUS_MASK) ==
 			 MFC_CNTL_PURGE_DMA_COMPLETE);
 }
 
@@ -1028,7 +1029,8 @@ static inline void wait_suspend_mfc_comp
 	 * Restore, Step 47.
 	 *     Poll MFC_CNTL[Ss] until 11 is returned.
 	 */
-	POLL_WHILE_FALSE(in_be64(&priv2->mfc_control_RW) &
+	POLL_WHILE_FALSE((in_be64(&priv2->mfc_control_RW) &
+			 MFC_CNTL_SUSPEND_DMA_STATUS_MASK) ==
 			 MFC_CNTL_SUSPEND_COMPLETE);
 }
 

--

^ permalink raw reply

* [PATCH 1/5] spufs: map mmio space as guarded into user space
From: arnd @ 2006-06-23 18:57 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev, cbe-oss-dev, linux-kernel
In-Reply-To: <20060623185746.037897000@klappe.arndb.de>

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

This fixes a bug where we don't properly map SPE MMIO space as guarded,
causing various test cases to fail, probably due to write combining and other
niceties caused by the lack of the G bit.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Index: linus-2.6/arch/powerpc/platforms/cell/spufs/file.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/spufs/file.c
+++ linus-2.6/arch/powerpc/platforms/cell/spufs/file.c
@@ -204,7 +204,7 @@ static int spufs_cntl_mmap(struct file *
 
 	vma->vm_flags |= VM_RESERVED;
 	vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
-				     | _PAGE_NO_CACHE);
+				     | _PAGE_NO_CACHE | _PAGE_GUARDED);
 
 	vma->vm_ops = &spufs_cntl_mmap_vmops;
 	return 0;
@@ -675,7 +675,7 @@ static int spufs_signal1_mmap(struct fil
 
 	vma->vm_flags |= VM_RESERVED;
 	vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
-				     | _PAGE_NO_CACHE);
+				     | _PAGE_NO_CACHE | _PAGE_GUARDED);
 
 	vma->vm_ops = &spufs_signal1_mmap_vmops;
 	return 0;
@@ -762,7 +762,7 @@ static int spufs_signal2_mmap(struct fil
 	/* FIXME: */
 	vma->vm_flags |= VM_RESERVED;
 	vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
-				     | _PAGE_NO_CACHE);
+				     | _PAGE_NO_CACHE | _PAGE_GUARDED);
 
 	vma->vm_ops = &spufs_signal2_mmap_vmops;
 	return 0;
@@ -850,7 +850,7 @@ static int spufs_mss_mmap(struct file *f
 
 	vma->vm_flags |= VM_RESERVED;
 	vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
-				     | _PAGE_NO_CACHE);
+				     | _PAGE_NO_CACHE | _PAGE_GUARDED);
 
 	vma->vm_ops = &spufs_mss_mmap_vmops;
 	return 0;
@@ -899,7 +899,7 @@ static int spufs_mfc_mmap(struct file *f
 
 	vma->vm_flags |= VM_RESERVED;
 	vma->vm_page_prot = __pgprot(pgprot_val(vma->vm_page_prot)
-				     | _PAGE_NO_CACHE);
+				     | _PAGE_NO_CACHE | _PAGE_GUARDED);
 
 	vma->vm_ops = &spufs_mfc_mmap_vmops;
 	return 0;

--

^ permalink raw reply

* Re: 8641 open nits
From: Kumar Gala @ 2006-06-23 18:12 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev@ozlabs.org list
In-Reply-To: <E1Ftncn-0008Kb-PT@jdl.com>


On Jun 23, 2006, at 10:31 AM, Jon Loeliger wrote:

> So, like, the other day Kumar Gala mumbled:
>> Jon,
>>
>> Any update on the following nits:
>> * duplication of entry in cputable
>
> Earlier, we discussed it internally, and there are a few
> issues differentiating the cores, so the sentiment was to
> leave it as is for now.

Can this be explained, I dont like the idea of having an entry to  
matches on specific version and does have any differences with the  
generic match.  Why not remove it now and when you have something  
that is special for 864x that we add it then.

>> * include of <platforms/86xx/mpc8641_hpcn.h> in asm-powerpc/mpc86xx.h
>
> That has to stay unless the IRQ patch is applied first.
> Ben said "No" to that one so far.  The include stays for now.

I dont follow, what IRQ information is in mpc8641_hpcn.h that is  
needed by mpc86xx.h?

>> * mpc86xx_exclude_device cleanup and movement to pci.c
>> * fixing up mpc86xx_hpcn_probe()
>
> Those are all going to be cleaned up pending Ben's IRQ rewrite.

What does probe have to do with Ben's IRQ rewrite?

- kumar

^ permalink raw reply

* "merge" branch reset in powerpc.git tree
From: Dave C Boutcher @ 2006-06-23 16:48 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <17563.54330.600099.894958@cargo.ozlabs.ibm.com>

On Fri, 23 Jun 2006 21:44:58 +1000, Paul Mackerras <paulus@samba.org> said:
> 
> If you are following the powerpc.git tree, and you pull the "merge"
> branch, you will need to reset it to have commit ID
> 5fa21d821f6972e70942f2c555ec29dde962bdb2 as its head.  That's also the
> head of the "master" branch and of Linus' linux-2.6 tree at the
> moment.

At risk of appearing like a git ignoramous...could you post the
command to perform such a reset?

Thanks

Dave B

^ permalink raw reply

* Re: 8641 open nits
From: Jon Loeliger @ 2006-06-23 15:31 UTC (permalink / raw)
  To: linuxppc-dev@ozlabs.org list
In-Reply-To: <6C66805F-22DD-4EC2-B852-101BF1E84612@kernel.crashing.org>

So, like, the other day Kumar Gala mumbled:
> Jon,
> 
> Any update on the following nits:
> * duplication of entry in cputable

Earlier, we discussed it internally, and there are a few
issues differentiating the cores, so the sentiment was to
leave it as is for now.

> * include of <platforms/86xx/mpc8641_hpcn.h> in asm-powerpc/mpc86xx.h

That has to stay unless the IRQ patch is applied first.
Ben said "No" to that one so far.  The include stays for now.

> * mpc86xx_exclude_device cleanup and movement to pci.c
> * fixing up mpc86xx_hpcn_probe()

Those are all going to be cleaned up pending Ben's IRQ rewrite.

Thanks,
jdl

^ permalink raw reply

* Re: [PATCH] powerpc: Extra sanity check in EEH code
From: Linas Vepstas @ 2006-06-23 15:13 UTC (permalink / raw)
  To: Anton Blanchard; +Cc: linuxppc-dev, paulus
In-Reply-To: <20060620080158.GB30974@krispykreme>


As nominal maintainer of the EEH code, I'll add

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>

On Tue, Jun 20, 2006 at 06:01:58PM +1000, Anton Blanchard wrote:
> 
> From: Nathan Lynch <ntl@pobox.com>
> 
> Don't dereference a device node that isn't there.  A "shouldn't
> happen" case, but someone ran into it with a possibly misconfigured
> device tree.
> 
> Signed-off-by: Nathan Lynch <ntl@pobox.com>
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
> 
> Index: build/arch/powerpc/platforms/pseries/eeh_cache.c
> ===================================================================
> --- build.orig/arch/powerpc/platforms/pseries/eeh_cache.c	2006-06-08 10:57:36.000000000 +1000
> +++ build/arch/powerpc/platforms/pseries/eeh_cache.c	2006-06-20 12:01:49.000000000 +1000
> @@ -304,6 +304,8 @@ void __init pci_addr_cache_build(void)
>  		pci_addr_cache_insert_device(dev);
>  
>  		dn = pci_device_to_OF_node(dev);
> +		if (!dn)
> +			continue;
>  		pci_dev_get (dev);  /* matching put is in eeh_remove_device() */
>  		PCI_DN(dn)->pcidev = dev;
>  	}

^ permalink raw reply

* 8641 open nits
From: Kumar Gala @ 2006-06-23 15:11 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev@ozlabs.org list
In-Reply-To: <D9D3C577-D46A-47BA-A1E0-844B95061F57@kernel.crashing.org>

Jon,

Any update on the following nits:
* duplication of entry in cputable
* include of <platforms/86xx/mpc8641_hpcn.h> in asm-powerpc/mpc86xx.h
* mpc86xx_exclude_device cleanup and movement to pci.c
* fixing up mpc86xx_hpcn_probe()

- kumar

^ permalink raw reply

* Re: cpu power "management" for non-dfs chips with no pmu (for instance, 750cxe and mpc7447 in pegasos)
From: Raquel Velasco and Bill Buck @ 2006-06-23 14:38 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev
In-Reply-To: <E1Ftmcb-0007rG-QS@jdl.com>

Jon, we appreciate the effort that you, Kate and Becky are making. ;-)
R&B
On Jun 23, 2006, at 9:26 AM, Jon Loeliger wrote:

> So, like, the other day "Matt Sealey" mumbled:
>>
>> I have nothing real to contribute other than I would like to see  
>> it :)
>
> Disbelief.  :-)
>
>> Before I asked I checked Google (as is expected of anyone these days)
>> and found some discussions on debian-powerpc from 2002 but nobody
>> really did anything and nothing really came of it. I know 4 years  
>> later
>> all we have is powernowd which pokes up cpufreq which only supports
>> DFS and certain kinds of Mac PMU.
>
> Which is why it is all being revitalized now... :-)
> There was a mini symposium a couple months ago that started
> a few working groups to help kick start this back into viability.
>
>> ICTC is such a simple thing to support and you can slow down the CPU
>> pretty comprehensively (from halving to 255x in theory) with an on  
>> and
>> off flag. I am surprised nobody implemented a cpufreq governer  
>> even if
>> it is totally useless and gives no perceivable benefits..
>
> See?  You _are_ contributing already.  I encourage
> you to hit the linux-pm@lists.osdl.org list for a spell!
>
> You could start here:
> 	https://lists.osdl.org/mailman/listinfo/linux-pm
>
> Thanks,
> jdl
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply

* RE: cpu power "management" for non-dfs chips with no pmu (for instance, 750cxe and mpc7447 in pegasos)
From: Matt Sealey @ 2006-06-23 14:31 UTC (permalink / raw)
  To: 'Jon Loeliger'; +Cc: linuxppc-dev
In-Reply-To: <E1Ftmcb-0007rG-QS@jdl.com>



> You could start here:
> 	https://lists.osdl.org/mailman/listinfo/linux-pm

Hmm it says the certificate isn't valid :3

Maybe on Monday..

-- 
Matt Sealey <matt@genesi-usa.com>
Manager, Genesi, Developer Relations

^ permalink raw reply

* Re: cpu power "management" for non-dfs chips with no pmu (for instance, 750cxe and mpc7447 in pegasos)
From: Jon Loeliger @ 2006-06-23 14:26 UTC (permalink / raw)
  To: matt; +Cc: linuxppc-dev
In-Reply-To: <01ca01c696cd$2e453f30$99dfdfdf@bakuhatsu.net>

So, like, the other day "Matt Sealey" mumbled:
> 
> I have nothing real to contribute other than I would like to see it :)

Disbelief.  :-)

> Before I asked I checked Google (as is expected of anyone these days)
> and found some discussions on debian-powerpc from 2002 but nobody
> really did anything and nothing really came of it. I know 4 years later
> all we have is powernowd which pokes up cpufreq which only supports
> DFS and certain kinds of Mac PMU. 

Which is why it is all being revitalized now... :-)
There was a mini symposium a couple months ago that started
a few working groups to help kick start this back into viability.

> ICTC is such a simple thing to support and you can slow down the CPU
> pretty comprehensively (from halving to 255x in theory) with an on and
> off flag. I am surprised nobody implemented a cpufreq governer even if
> it is totally useless and gives no perceivable benefits..

See?  You _are_ contributing already.  I encourage
you to hit the linux-pm@lists.osdl.org list for a spell!

You could start here:
	https://lists.osdl.org/mailman/listinfo/linux-pm

Thanks,
jdl

^ permalink raw reply

* release early... powermac g5 suspend to disk
From: Johannes Berg @ 2006-06-23 10:16 UTC (permalink / raw)
  To: linuxppc-dev list; +Cc: linux-pm

Wow. 2 days and a mostly destroyed XFS filesystem (it's still running
but I better not touch some directories or it goes belly up, xfs_repair
craps out too) I actually suspended my quad powermac a few times.

Half of the time I'll be told by the softlockup watchdog that it locked
up, but sometimes it actually works, that is, it suspends and resumes.

Issues: I don't save MPIC state. Hence, anything that is compiled in as
modules will no longer get IRQs after resume. Like USB on my system. So
I only ohci_hcd and ehci_hcd before suspend, reload later (from a
script) and I can still use the keyboard after ;)

Same goes for tg3 even though it is built-in. Well, I held off looking
at the MPIC because Ben said he was rewriting the whole interrupt stuff
anyway.

Other issues: yeah, this is extremely ugly. If you like your machine,
don't take a look.

There must be dozens of bad and undocumented assumptions too. Like
running with the same hashtables while copying back as before, etc. Not
restoring the MSR because, well, it crashes then ;) Very strange code to
flush caches, not sure it's even correct. Etc. etc. Oh and yes, I really
am that clueless and don't see the bigger issues ;)

Oh and as you can see in the first hunk here, I had to modify the
generic code too...

--- linux-2.6-git.orig/kernel/power/snapshot.c	2006-06-23 11:37:23.433885225 +0200
+++ linux-2.6-git/kernel/power/snapshot.c	2006-06-23 11:39:03.352985945 +0200
@@ -177,7 +177,13 @@
 		return 0;
 
 	page = pfn_to_page(pfn);
+/*
+    I currently mark the physical memory that we reserve
+    and _don't_ map for kernel access as Nosave so we won't
+    try to save it... Not sure what to do.
+
 	BUG_ON(PageReserved(page) && PageNosave(page));
+*/
 	if (PageNosave(page))
 		return 0;
 	if (PageReserved(page) && pfn_is_nosave(pfn))
@@ -185,7 +191,8 @@
 	if (PageNosaveFree(page))
 		return 0;
 
-	return 1;
+	/* we have a memory hole for PCI accesses! */
+	return page_is_ram(pfn);
 }
 
 unsigned int count_data_pages(void)
--- linux-2.6-git.orig/arch/powerpc/kernel/Makefile	2006-06-23 11:37:23.108888150 +0200
+++ linux-2.6-git/arch/powerpc/kernel/Makefile	2006-06-23 11:39:03.333986116 +0200
@@ -37,6 +37,7 @@
 obj-$(CONFIG_6xx)		+= idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o
 obj-$(CONFIG_TAU)		+= tau_6xx.o
 obj32-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_32.o
+obj64-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_64.o swsusp_asm64.o
 obj32-$(CONFIG_MODULES)		+= module_32.o
 obj-$(CONFIG_E500)		+= perfmon_fsl_booke.o
 
--- linux-2.6-git.orig/kernel/power/Kconfig	2006-06-23 11:37:23.391885603 +0200
+++ linux-2.6-git/kernel/power/Kconfig	2006-06-23 11:39:03.335986098 +0200
@@ -38,7 +38,7 @@
 
 config SOFTWARE_SUSPEND
 	bool "Software Suspend"
-	depends on PM && SWAP && (X86 && (!SMP || SUSPEND_SMP)) || ((FRV || PPC32) && !SMP)
+	depends on PM && SWAP && ((X86 || PPC64) && (!SMP || SUSPEND_SMP)) || ((FRV || PPC32) && !SMP)
 	---help---
 	  Enable the possibility of suspending the machine.
 	  It doesn't need ACPI or APM.
@@ -96,5 +96,5 @@
 
 config SUSPEND_SMP
 	bool
-	depends on HOTPLUG_CPU && X86 && PM
+	depends on HOTPLUG_CPU && (X86 || PPC64) && PM
 	default y
--- linux-2.6-git.orig/arch/powerpc/platforms/powermac/setup.c	2006-06-23 11:38:31.484272766 +0200
+++ linux-2.6-git/arch/powerpc/platforms/powermac/setup.c	2006-06-23 11:39:16.652866245 +0200
@@ -457,8 +457,10 @@
 {
 	printk(KERN_DEBUG "%s(%d)\n", __FUNCTION__, state);
 
+#ifdef CONFIG_PPC32
 	/* Restore userland MMU context */
 	set_context(current->active_mm->context, current->active_mm->pgd);
+#endif
 
 	return 0;
 }
@@ -490,6 +492,7 @@
 {
 	initializing = 0;
 #ifdef CONFIG_SOFTWARE_SUSPEND
+	iommu_init_late();
 	pm_set_ops(&pmac_pm_ops);
 #endif /* CONFIG_SOFTWARE_SUSPEND */
 	/* this is udbg (which is __init) and we can later use it during
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6-git/include/asm/suspend.h	2006-06-23 11:39:03.341986044 +0200
@@ -0,0 +1,9 @@
+#ifndef __ASM_POWERPC_SUSPEND_H
+#define __ASM_POWERPC_SUSPEND_H
+
+static inline int arch_prepare_suspend(void)
+{
+	return 0;
+}
+
+#endif /* __ASM_POWERPC_SUSPEND_H */
Index: linux-2.6-git/include/linux/suspend.h
===================================================================
--- linux-2.6-git.orig/include/linux/suspend.h	2006-06-23 11:37:23.502884604 +0200
+++ linux-2.6-git/include/linux/suspend.h	2006-06-23 11:39:03.343986026 +0200
@@ -1,7 +1,7 @@
 #ifndef _LINUX_SWSUSP_H
 #define _LINUX_SWSUSP_H
 
-#if defined(CONFIG_X86) || defined(CONFIG_FRV) || defined(CONFIG_PPC32)
+#if defined(CONFIG_X86) || defined(CONFIG_FRV) || defined(CONFIG_PPC32) || defined(CONFIG_PPC64)
 #include <asm/suspend.h>
 #endif
 #include <linux/swap.h>
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6-git/arch/powerpc/kernel/swsusp_64.c	2006-06-23 11:39:03.345986008 +0200
@@ -0,0 +1,37 @@
+/*
+ * PowerPC 64-bit swsusp implementation
+ *
+ * Copyright 2006 Johannes Berg <johannes@sipsolutions.net>
+ *
+ * GPLv2
+ */
+
+#include <asm/system.h>
+
+void save_processor_state(void)
+{
+}
+
+void restore_processor_state(void)
+{
+}
+
+static int set_up_temporary_mappings(void)
+{
+	/* uh oh. we should do something here! */
+	return 0;
+}
+
+/* in swsusp_asm64.S */
+extern int restore_image(void);
+
+int swsusp_arch_resume(void)
+{
+	int err;
+
+	err = set_up_temporary_mappings();
+	if (err)
+		return err;
+	/* well, in reality, restore_image() won't return (to here) */
+	return restore_image();
+}
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6-git/arch/powerpc/kernel/swsusp_asm64.S	2006-06-23 11:39:03.348985981 +0200
@@ -0,0 +1,218 @@
+/*
+ * PowerPC 64-bit swsusp implementation
+ *
+ * Copyright 2006 Johannes Berg <johannes@sipsolutions.net>
+ *
+ * GPLv2
+ */
+
+#include <linux/config.h>
+#include <linux/threads.h>
+#include <asm/processor.h>
+#include <asm/page.h>
+#include <asm/cputable.h>
+#include <asm/thread_info.h>
+#include <asm/ppc_asm.h>
+#include <asm/asm-offsets.h>
+
+/*
+ * Structure for storing CPU registers on the save area.
+ */
+#define SL_r1		0x00	/* stack pointer */
+#define SL_PC		0x08
+#define SL_MSR		0x10
+#define SL_SDR1		0x18
+#define SL_XER		0x20
+#define SL_TB		0x40
+#define SL_r2		0x48	/* 'current' (I think) */
+#define SL_CR		0x50
+#define SL_LR		0x58
+#define SL_r12		0x60
+#define SL_r13		0x68
+#define SL_r14		0x70
+#define SL_r15		0x78
+#define SL_r16		0x80
+#define SL_r17		0x88
+#define SL_r18		0x90
+#define SL_r19		0x98
+#define SL_r20		0xa0
+#define SL_r21		0xa8
+#define SL_r22		0xb0
+#define SL_r23		0xb8
+#define SL_r24		0xc0
+#define SL_r25		0xc8
+#define SL_r26		0xd0
+#define SL_r27		0xd8
+#define SL_r28		0xe0
+#define SL_r29		0xe8
+#define SL_r30		0xf0
+#define SL_r31		0xf8
+#define SL_SIZE		SL_r31+8
+
+/* these macros rely on the save area being
+ * pointed to by r11 */
+#define SAVE_SPECIAL(special)		\
+	mf##special	r0		;\
+	std	r0, SL_##special(r11)
+#define RESTORE_SPECIAL(special)	\
+	ld	r0, SL_##special(r11)	;\
+	mt##special	r0
+#define SAVE_REGISTER(reg)		\
+	std	reg, SL_##reg(r11)
+#define RESTORE_REGISTER(reg)		\
+	ld	reg, SL_##reg(r11)
+
+/* space for storing cpu state */
+	.section .data
+	.align  5
+swsusp_save_area:
+	.space SL_SIZE
+
+	.section ".toc","aw"
+swsusp_save_area_ptr:
+	.tc	swsusp_save_area[TC],swsusp_save_area
+pagedir_nosave_ptr:
+	.tc	pagedir_nosave[TC],pagedir_nosave
+
+	.section .text
+	.align  5
+_GLOBAL(swsusp_arch_suspend)
+	ld	r11,swsusp_save_area_ptr@toc(r2)
+	SAVE_SPECIAL(LR)
+	SAVE_REGISTER(r1)
+	SAVE_SPECIAL(CR)
+	SAVE_SPECIAL(TB)
+	SAVE_REGISTER(r2)
+	SAVE_REGISTER(r12)
+	SAVE_REGISTER(r13)
+	SAVE_REGISTER(r14)
+	SAVE_REGISTER(r15)
+	SAVE_REGISTER(r16)
+	SAVE_REGISTER(r17)
+	SAVE_REGISTER(r18)
+	SAVE_REGISTER(r19)
+	SAVE_REGISTER(r20)
+	SAVE_REGISTER(r21)
+	SAVE_REGISTER(r22)
+	SAVE_REGISTER(r23)
+	SAVE_REGISTER(r24)
+	SAVE_REGISTER(r25)
+	SAVE_REGISTER(r26)
+	SAVE_REGISTER(r27)
+	SAVE_REGISTER(r28)
+	SAVE_REGISTER(r29)
+	SAVE_REGISTER(r30)
+	SAVE_REGISTER(r31)
+	SAVE_SPECIAL(MSR)
+	SAVE_SPECIAL(SDR1)
+	SAVE_SPECIAL(XER)
+
+	/* we push the stack up 128 bytes but don't store the
+	 * stack pointer on the stack like a real stackframe */
+	addi	r1,r1,-128
+
+#ifdef	CONFIG_U3_DART
+	bl dart_save
+#endif
+
+	bl swsusp_save
+
+	/* restore LR */
+	ld	r11,swsusp_save_area_ptr@toc(r2)
+	RESTORE_SPECIAL(LR)
+	addi	r1,r1,128
+
+	blr
+
+/* Resume code */
+_GLOBAL(restore_image)
+	/* Stop pending alitvec streams and memory accesses */
+BEGIN_FTR_SECTION
+	DSSALL
+END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
+	sync
+
+	ld	r12,pagedir_nosave_ptr@toc(r2)
+	ld	r12,0(r12)
+
+	cmpdi	r12,0
+	beq-	nothing_to_copy
+	li	r15,512
+copyloop:
+	ld	r13,pbe_address(r12)
+	ld	r14,pbe_orig_address(r12)
+
+	mtctr	r15
+	li	r10,0
+copy_page_loop:
+	ldx	r0,r10,r13
+	stdx	r0,r10,r14
+	addi	r10,r10,8
+	bdnz copy_page_loop
+
+	ld	r12,pbe_next(r12)
+	cmpdi	r12,0
+	bne+	copyloop
+nothing_to_copy:
+
+#if 1
+	/* flush caches */
+	lis	r3, 0x10
+	mtctr	r3
+	li	r3, 0
+	ori	r3, r3, CONFIG_KERNEL_START>>48
+	li	r0, 48
+	sld	r3, r3, r0
+	li	r0, 0
+1:
+	dcbf	r0,r3
+	addi	r3,r3,0x20
+	bdnz	1b
+#endif
+	sync
+
+	tlbia
+
+	ld	r11,swsusp_save_area_ptr@toc(r2)
+
+	RESTORE_SPECIAL(CR)
+	ld	r0, SL_TB(r11)
+	mttbl	r0
+	RESTORE_REGISTER(r1)
+	RESTORE_REGISTER(r2)
+	RESTORE_REGISTER(r12)
+	RESTORE_REGISTER(r13)
+	RESTORE_REGISTER(r14)
+	RESTORE_REGISTER(r15)
+	RESTORE_REGISTER(r16)
+	RESTORE_REGISTER(r17)
+	RESTORE_REGISTER(r18)
+	RESTORE_REGISTER(r19)
+	RESTORE_REGISTER(r20)
+	RESTORE_REGISTER(r21)
+	RESTORE_REGISTER(r22)
+	RESTORE_REGISTER(r23)
+	RESTORE_REGISTER(r24)
+	RESTORE_REGISTER(r25)
+	RESTORE_REGISTER(r26)
+	RESTORE_REGISTER(r27)
+	RESTORE_REGISTER(r28)
+	RESTORE_REGISTER(r29)
+	RESTORE_REGISTER(r30)
+	RESTORE_REGISTER(r31)
+	/* can't use RESTORE_SPECIAL(MSR) */
+//	ld	r0, SL_MSR(r11)
+//	mtmsrd	r0,0
+	RESTORE_SPECIAL(SDR1)
+	RESTORE_SPECIAL(XER)
+
+	addi	r1,r1,-128
+	bl	dart_restore
+	bl	touch_softlockup_watchdog
+	addi	r1,r1,128
+
+	ld	r11,swsusp_save_area_ptr@toc(r2)
+	RESTORE_SPECIAL(LR)
+
+	li	r3, 0
+	blr
--- linux-2.6-git.orig/arch/powerpc/sysdev/dart_iommu.c	2006-06-23 11:37:23.357885909 +0200
+++ linux-2.6-git/arch/powerpc/sysdev/dart_iommu.c	2006-06-23 11:39:03.350985963 +0200
@@ -58,6 +58,9 @@
 
 /* Virtual base address of the DART table */
 static u32 *dart_vbase;
+#ifdef CONFIG_SOFTWARE_SUSPEND
+static u32 *dart_copy;
+#endif
 
 /* Mapped base address for the dart */
 static unsigned int __iomem *dart;
@@ -368,6 +371,45 @@
 	pci_direct_iommu_init();
 }
 
+#ifdef CONFIG_SOFTWARE_SUSPEND
+void iommu_init_late(void)
+{
+	unsigned long i;
+	struct page *p;
+
+	/* phew. suckers. this 16MB area is left unmapped
+	 * at another place but they don't bother to mark it so */
+	for (i = 0; i < (1<<24); i+= PAGE_SIZE)
+		SetPageNosave(virt_to_page((void*)((unsigned long)dart_tablebase + i)));
+
+	if (dart_tablebase == 0 || dart_tablesize == 0)
+		return;
+
+	p = alloc_pages(GFP_KERNEL, 9);
+	BUG_ON(!p);
+	dart_copy = page_address(p);
+}
+
+void dart_save(void)
+{
+	if (dart_tablebase == 0 || dart_tablesize == 0)
+		return;
+
+	memcpy(dart_copy, dart_vbase, 2*1024*1024);
+	printk(KERN_INFO "dart copied\n");
+}
+
+void dart_restore(void)
+{
+	if (dart_tablebase == 0 || dart_tablesize == 0)
+		return;
+
+	printk("going to restore dart\n");
+	memcpy(dart_vbase, dart_copy, 2*1024*1024);
+	printk("copied over dart entries\n");
+	dart_tlb_invalidate_all();
+}
+#endif
 
 void __init alloc_dart_table(void)
 {
--- linux-2.6-git.orig/include/asm-powerpc/iommu.h	2006-06-23 11:37:23.548884190 +0200
+++ linux-2.6-git/include/asm-powerpc/iommu.h	2006-06-23 11:39:03.354985927 +0200
@@ -97,6 +97,9 @@
 #endif
 
 extern void alloc_dart_table(void);
+#ifdef CONFIG_SOFTWARE_SUSPEND
+extern void iommu_init_late(void);
+#endif
 
 #endif /* __KERNEL__ */
 #endif /* _ASM_IOMMU_H */
--- linux-2.6-git.orig/arch/powerpc/kernel/asm-offsets.c	2006-06-23 11:37:23.197887349 +0200
+++ linux-2.6-git/arch/powerpc/kernel/asm-offsets.c	2006-06-23 11:39:03.356985909 +0200
@@ -22,12 +22,12 @@
 #include <linux/types.h>
 #include <linux/mman.h>
 #include <linux/mm.h>
+#include <linux/suspend.h>
 #ifdef CONFIG_PPC64
 #include <linux/time.h>
 #include <linux/hardirq.h>
 #else
 #include <linux/ptrace.h>
-#include <linux/suspend.h>
 #endif
 
 #include <asm/io.h>
@@ -243,11 +243,11 @@
 	DEFINE(CPU_SPEC_FEATURES, offsetof(struct cpu_spec, cpu_features));
 	DEFINE(CPU_SPEC_SETUP, offsetof(struct cpu_spec, cpu_setup));
 
-#ifndef CONFIG_PPC64
 	DEFINE(pbe_address, offsetof(struct pbe, address));
 	DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address));
 	DEFINE(pbe_next, offsetof(struct pbe, next));
 
+#ifndef CONFIG_PPC64
 	DEFINE(TASK_SIZE, TASK_SIZE);
 	DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28);
 #endif /* ! CONFIG_PPC64 */
--- linux-2.6-git.orig/arch/powerpc/kernel/idle.c	2006-06-23 11:37:23.234887016 +0200
+++ linux-2.6-git/arch/powerpc/kernel/idle.c	2006-06-23 11:39:03.357985900 +0200
@@ -34,8 +34,11 @@
 #include <asm/smp.h>
 
 #ifdef CONFIG_HOTPLUG_CPU
+/* this is used for software suspend, and that shuts down
+ * CPUs even while the system is still booting... */
 #define cpu_should_die()	(cpu_is_offline(smp_processor_id()) && \
-				 system_state == SYSTEM_RUNNING)
+				   (system_state == SYSTEM_RUNNING     \
+				 || system_state == SYSTEM_BOOTING))
 #else
 #define cpu_should_die()	0
 #endif

^ permalink raw reply

* [PATCH] windfarm: proper try_to_freeze / signal_pending handling
From: Johannes Berg @ 2006-06-23 10:05 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, linux-pm
In-Reply-To: <1150847482.16662.13.camel@johannes>

This seems to work for me:
---
This patch makes windfarm handle signal_pending()/try_to_freeze()
better.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

--- linux-2.6-git.orig/drivers/macintosh/windfarm_core.c	2006-06-22 16:41:18.182172154 +0200
+++ linux-2.6-git/drivers/macintosh/windfarm_core.c	2006-06-22 16:42:49.045354378 +0200
@@ -93,8 +93,6 @@ static int wf_thread_func(void *data)
 	DBG("wf: thread started\n");
 
 	while(!kthread_should_stop()) {
-		try_to_freeze();
-
 		if (time_after_eq(jiffies, next)) {
 			wf_notify(WF_EVENT_TICK, NULL);
 			if (wf_overtemp) {
@@ -117,8 +115,8 @@ static int wf_thread_func(void *data)
 		if (delay <= HZ)
 			schedule_timeout_interruptible(delay);
 
-		/* there should be no signal, but oh well */
-		if (signal_pending(current)) {
+		/* there should be no non-suspend signal, but oh well */
+		if (signal_pending(current) && !try_to_freeze()) {
 			printk(KERN_WARNING "windfarm: thread got sigl !\n");
 			break;
 		}

^ permalink raw reply

* [RFC] cpu hotplug in powermac g5
From: Johannes Berg @ 2006-06-23 10:03 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Michael Buesch
In-Reply-To: <1150845770.16662.7.camel@johannes>

Never mind the previous patch :) This one works much better.

Note that for software suspend, the generic cpu hotplug are not usable
because they don't re-sync timebase etc. Hence, I here only use the
generic die routines but the loop in which offline processors are is
custom, and we use the regular CPU bring-up sequence instead of just
exiting the loop.

---
This patch makes CPU hotplug work on my pm11,2. It works by reusing the
normal smp_core99_kick_cpu routine for wakeup, and introducing a new
routine that offline CPUs idle in, which is modeled after the idle loop
but has no way out (except for taking the soft reset exception triggered
by kick_cpu). This is required because the generic cpu hotplug code
doesn't completely re-initialise the CPU when bringing it online again,
which is required for software suspend.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

--- linux-2.6-git.orig/arch/powerpc/platforms/powermac/smp.c	2006-06-23 11:32:49.254352863 +0200
+++ linux-2.6-git/arch/powerpc/platforms/powermac/smp.c	2006-06-23 11:37:23.311886323 +0200
@@ -895,7 +895,7 @@
 	cpu_dead[cpu] = 0;
 }
 
-#endif
+#endif /* CONFIG_HOTPLUG_CPU && CONFIG_PP32 */
 
 /* Core99 Macs (dual G4s and G5s) */
 struct smp_ops_t core99_smp_ops = {
@@ -905,8 +905,16 @@
 	.setup_cpu	= smp_core99_setup_cpu,
 	.give_timebase	= smp_core99_give_timebase,
 	.take_timebase	= smp_core99_take_timebase,
-#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC32)
+#if defined(CONFIG_HOTPLUG_CPU)
+# if defined(CONFIG_PPC32)
 	.cpu_disable	= smp_core99_cpu_disable,
 	.cpu_die	= smp_core99_cpu_die,
+# endif
+# if defined(CONFIG_PPC64)
+	.cpu_disable	= generic_cpu_disable,
+	.cpu_die	= generic_cpu_die,
+	/* intentionally do *NOT* assign cpu_enable,
+	 * the generic code will use kick_cpu then! */
+# endif
 #endif
 };
--- linux-2.6-git.orig/arch/powerpc/platforms/powermac/setup.c	2006-06-23 11:32:49.309352368 +0200
+++ linux-2.6-git/arch/powerpc/platforms/powermac/setup.c	2006-06-23 11:38:31.484272766 +0200
@@ -492,6 +492,9 @@
 #ifdef CONFIG_SOFTWARE_SUSPEND
 	pm_set_ops(&pmac_pm_ops);
 #endif /* CONFIG_SOFTWARE_SUSPEND */
+	/* this is udbg (which is __init) and we can later use it during
+	 * cpu hotplug (in smp_core99_kick_cpu) */
+	ppc_md.progress = NULL;
 	return 0;
 }
 
@@ -728,6 +731,32 @@
 		return PCI_PROBE_NORMAL;
 	return PCI_PROBE_DEVTREE;
 }
+
+#ifdef CONFIG_HOTPLUG_CPU
+/* access per cpu vars from generic smp.c */
+DECLARE_PER_CPU(int, cpu_state);
+
+static void pmac_cpu_die(void)
+{
+	/* turn off as much as possible, we'll be
+	 * kicked out as this will only be invoked
+	 * on core99 platforms for now ... */
+	local_irq_disable();
+	printk(KERN_DEBUG "CPU#%d offline\n", smp_processor_id());
+	__get_cpu_var(cpu_state) = CPU_DEAD;
+	smp_wmb();
+	while (1) {
+		ppc64_runlatch_off();
+		if (ppc_md.power_save) {
+			ppc_md.power_save();
+		} else {
+			HMT_low();
+			HMT_very_low();
+		}
+	}
+}
+#endif
+
 #endif
 
 define_machine(powermac) {
@@ -766,6 +795,6 @@
 	.phys_mem_access_prot	= pci_phys_mem_access_prot,
 #endif
 #if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC64)
-	.cpu_die		= generic_mach_cpu_die,
+	.cpu_die		= pmac_cpu_die,
 #endif
 };

^ permalink raw reply

* 8641 HPCN Flat Device Tree (was: [PATCH] Use IRQ and senses from OF-tree on 8641hpcn.)
From: Jon Loeliger @ 2006-06-23 14:11 UTC (permalink / raw)
  To: linuxppc-dev@ozlabs.org
In-Reply-To: <1151021497.4046.79.camel@localhost.localdomain>


Folks,

For reference, here is the complete MPC8641 HPCN Device Tree Source
file that we have been using.  Please feel free to comment on it.
(And yes, I know we need to change the ethernet "address" property
names -- that's on the Big To Do List still (for all the FSL boards)).

Thanks!
jdl

PS -- This version matches up with assuming the
        "Use IRQ and senses from OF-tree on 8641hpcn"
    patch has been applied.



/*
 * MPC8641 HPCN Device Tree Source
 *
 * Copyright 2006 Freescale Semiconductor Inc.
 *
 * This program is free software; you can redistribute  it and/or modify it
 * under  the terms of  the GNU General  Public License as published by the
 * Free Software Foundation;  either version 2 of the  License, or (at your
 * option) any later version.
 */


/ {
	model = "MPC8641HPCN";
	compatible = "mpc86xx";
	#address-cells = <1>;
	#size-cells = <1>;
	linux,phandle = <100>;

	cpus {
		#cpus = <2>;
		#address-cells = <1>;
		#size-cells = <0>;
		linux,phandle = <200>;

		PowerPC,8641@0 {
			device_type = "cpu";
			reg = <0>;
			d-cache-line-size = <20>;	// 32 bytes
			i-cache-line-size = <20>;	// 32 bytes
			d-cache-size = <8000>;		// L1, 32K
			i-cache-size = <8000>;		// L1, 32K
			timebase-frequency = <0>;	// 33 MHz, from uboot
			bus-frequency = <0>;		// From uboot
			clock-frequency = <0>;		// From uboot
			32-bit;
			linux,phandle = <201>;
			linux,boot-cpu;
		};
		PowerPC,8641@1 {
			device_type = "cpu";
			reg = <1>;
			d-cache-line-size = <20>;	// 32 bytes
			i-cache-line-size = <20>;	// 32 bytes
			d-cache-size = <8000>;		// L1, 32K
			i-cache-size = <8000>;		// L1, 32K
			timebase-frequency = <0>;	// 33 MHz, from uboot
			bus-frequency = <0>;		// From uboot
			clock-frequency = <0>;		// From uboot
			32-bit;
			linux,phandle = <202>;
		};
	};

	memory {
		device_type = "memory";
		linux,phandle = <300>;
		reg = <00000000 40000000>;	// 1G at 0x0
	};

	soc8641@f8000000 {
		#address-cells = <1>;
		#size-cells = <1>;
		#interrupt-cells = <2>;
		device_type = "soc";
		ranges = <0 f8000000 00100000>;
		reg = <f8000000 00100000>;	// CCSRBAR 1M
		bus-frequency = <0>;

		i2c@3000 {
			device_type = "i2c";
			compatible = "fsl-i2c";
			reg = <3000 100>;
			interrupts = <2b 2>;
			interrupt-parent = <40000>;
			dfsrr;
		};

		i2c@3100 {
			device_type = "i2c";
			compatible = "fsl-i2c";
			reg = <3100 100>;
			interrupts = <2b 2>;
			interrupt-parent = <40000>;
			dfsrr;
		};

		mdio@24520 {
			#address-cells = <1>;
			#size-cells = <0>;
			device_type = "mdio";
			compatible = "gianfar";
			reg = <24520 20>;
			linux,phandle = <24520>;
			ethernet-phy@0 {
				linux,phandle = <2452000>;
				interrupt-parent = <40000>;
				interrupts = <4a 1>;
				reg = <0>;
				device_type = "ethernet-phy";
			};
			ethernet-phy@1 {
				linux,phandle = <2452001>;
				interrupt-parent = <40000>;
				interrupts = <4a 1>;
				reg = <1>;
				device_type = "ethernet-phy";
			};
			ethernet-phy@2 {
				linux,phandle = <2452002>;
				interrupt-parent = <40000>;
				interrupts = <4a 1>;
				reg = <2>;
				device_type = "ethernet-phy";
			};
			ethernet-phy@3 {
				linux,phandle = <2452003>;
				interrupt-parent = <40000>;
				interrupts = <4a 1>;
				reg = <3>;
				device_type = "ethernet-phy";
			};
		};

		ethernet@24000 {
			#address-cells = <1>;
			#size-cells = <0>;
			device_type = "network";
			model = "TSEC";
			compatible = "gianfar";
			reg = <24000 1000>;
			address = [ 00 E0 0C 00 73 00 ];
			interrupts = <1d 2 1e 2 22 2>;
			interrupt-parent = <40000>;
			phy-handle = <2452000>;
		};

		ethernet@25000 {
			#address-cells = <1>;
			#size-cells = <0>;
			device_type = "network";
			model = "TSEC";
			compatible = "gianfar";
			reg = <25000 1000>;
			address = [ 00 E0 0C 00 73 01 ];
			interrupts = <23 2 24 2 28 2>;
			interrupt-parent = <40000>;
			phy-handle = <2452001>;
		};
		
		ethernet@26000 {
			#address-cells = <1>;
			#size-cells = <0>;
			device_type = "network";
			model = "TSEC";
			compatible = "gianfar";
			reg = <26000 1000>;
			address = [ 00 E0 0C 00 02 FD ];
			interrupts = <1F 2 20 2 21 2>;
			interrupt-parent = <40000>;
			phy-handle = <2452002>;
		};

		ethernet@27000 {
			#address-cells = <1>;
			#size-cells = <0>;
			device_type = "network";
			model = "TSEC";
			compatible = "gianfar";
			reg = <27000 1000>;
			address = [ 00 E0 0C 00 03 FD ];
			interrupts = <25 2 26 2 27 2>;
			interrupt-parent = <40000>;
			phy-handle = <2452003>;
		};
		serial@4500 {
			device_type = "serial";
			compatible = "ns16550";
			reg = <4500 100>;
			clock-frequency = <0>;
			interrupts = <2a 2>;
			interrupt-parent = <40000>;
		};

		serial@4600 {
			device_type = "serial";
			compatible = "ns16550";
			reg = <4600 100>;
			clock-frequency = <0>;
			interrupts = <2a 2>;
			interrupt-parent = <40000>;
		};

		pci@8000 {
			compatible = "86xx";
			device_type = "pci";
			linux,phandle = <8000>;
			#interrupt-cells = <1>;
			#size-cells = <2>;
			#address-cells = <3>;
			reg = <8000 1000>;
			bus-range = <0 fe>;
			ranges = <02000000 0 80000000 80000000 0 20000000
				  01000000 0 00000000 e2000000 0 00100000>;
			clock-frequency = <1fca055>;
			interrupt-parent = <40000>;
			interrupts = <18 2>;
			interrupt-map-mask = <f800 0 0 f>;
			interrupt-map = <
				/* IDSEL 0x11 */
				8800 0 0 1 40000 3 0
				8800 0 0 2 40000 4 0
				8800 0 0 3 40000 5 0
				8800 0 0 4 40000 6 0

				/* IDSEL 0x12 */
				9000 0 0 1 40000 4 0
				9000 0 0 2 40000 5 0
				9000 0 0 3 40000 6 0
				9000 0 0 4 40000 3 0

				/* IDSEL 0x13 */
				9800 0 0 1 40000 0 0
				9800 0 0 2 40000 0 0
				9800 0 0 3 40000 0 0
				9800 0 0 4 40000 0 0

				/* IDSEL 0x14 */
				a000 0 0 1 40000 0 0
				a000 0 0 2 40000 0 0
				a000 0 0 3 40000 0 0
				a000 0 0 4 40000 0 0

				/* IDSEL 0x15 */
				a800 0 0 1 40000 0 0
				a800 0 0 2 40000 0 0
				a800 0 0 3 40000 0 0
				a800 0 0 4 40000 0 0

				/* IDSEL 0x16 */
				b000 0 0 1 40000 0 0
				b000 0 0 2 40000 0 0
				b000 0 0 3 40000 0 0
				b000 0 0 4 40000 0 0

				/* IDSEL 0x17 */
				b800 0 0 1 40000 0 0
				b800 0 0 2 40000 0 0
				b800 0 0 3 40000 0 0
				b800 0 0 4 40000 0 0

				/* IDSEL 0x18 */
				c000 0 0 1 40000 0 0
				c000 0 0 2 40000 0 0
				c000 0 0 3 40000 0 0
				c000 0 0 4 40000 0 0

				/* IDSEL 0x19 */
				c800 0 0 1 40000 0 0
				c800 0 0 2 40000 0 0
				c800 0 0 3 40000 0 0
				c800 0 0 4 40000 0 0

				/* IDSEL 0x1a */
				d000 0 0 1 40000 6 0
				d000 0 0 2 40000 3 0
				d000 0 0 3 40000 4 0
				d000 0 0 4 40000 5 0


				/* IDSEL 0x1b */
				d800 0 0 1 40000 5 0
				d800 0 0 2 40000 0 0
				d800 0 0 3 40000 0 0
				d800 0 0 4 40000 0 0

				/* IDSEL 0x1c */
				e000 0 0 1 40000 9 0
				e000 0 0 2 40000 a 0
				e000 0 0 3 40000 c 0
				e000 0 0 4 40000 7 0

				/* IDSEL 0x1d */
				e800 0 0 1 40000 9 0
				e800 0 0 2 40000 a 0
				e800 0 0 3 40000 b 0
				e800 0 0 4 40000 0 0

				/* IDSEL 0x1e */
				f000 0 0 1 40000 c 0
				f000 0 0 2 40000 0 0
				f000 0 0 3 40000 0 0
				f000 0 0 4 40000 0 0

				/* IDSEL 0x1f */
				f800 0 0 1 40000 6 0
				f800 0 0 2 40000 0 0
				f800 0 0 3 40000 0 0
				f800 0 0 4 40000 0 0
				>;
		};
		pic@40000 {
			linux,phandle = <40000>;
			clock-frequency = <0>;
			interrupt-controller;
			#address-cells = <0>;
			#interrupt-cells = <2>;
			reg = <40000 40000>;
			built-in;
			compatible = "chrp,open-pic";
			device_type = "open-pic";
                        big-endian;
			interrupts = <
				10 2 11 2 12 2 13 2
				14 2 15 2 16 2 17 2
				18 2 19 2 1a 2 1b 2
				1c 2 1d 2 1e 2 1f 2
				20 2 21 2 22 2 23 2
				24 2 25 2 26 2 27 2
				28 2 29 2 2a 2 2b 2
				2c 2 2d 2 2e 2 2f 2
				30 2 31 2 32 2 33 2
				34 2 35 2 36 2 37 2
				38 2 39 2 2a 2 3b 2
				3c 2 3d 2 3e 2 3f 2
				48 1 49 2 4a 1
				>;
			interrupt-parent = <40000>;
		};
	};
};

^ permalink raw reply

* Re: [PATCH] Use IRQ and senses from OF-tree on 8641hpcn.
From: Jon Loeliger @ 2006-06-23 14:06 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <1151021497.4046.79.camel@localhost.localdomain>

So, like, the other day Benjamin Herrenschmidt mumbled:
> 
> > +	shift = __ilog2((~interrupt_mask[0] + 1) & 0xffff);
> 
> Nice hack :)

We aim to please. :-)

> But not something mergeable as it strictly relies on the specific format
> of the interrupt map on that platform :)

Hrm.

> I have a generic parser on the way, it's hot and will be released for
> public consumption later today or this week-end along with the rest of
> the irq patches.

Chomp, chomp.

> I'll need you guys to help porting the few embedded boards already in
> arch/powerpc.

Of course.  We've also lined Andy Fleming up to help
with some 85xx parts, and Kim Phillips to help with
some 83xx parts.  (Hi guys!)

BTW and for (your) references, I will follow up with
the complete MPC8641 HPCN DTS file here!

Thanks,
jdl

^ permalink raw reply

* RE: cpu power "management" for non-dfs chips with no pmu (for instance, 750cxe and mpc7447 in pegasos)
From: Matt Sealey @ 2006-06-23 13:58 UTC (permalink / raw)
  To: 'Jon Loeliger'; +Cc: linuxppc-dev
In-Reply-To: <E1FtlnK-0007Zt-Tx@jdl.com>


I have nothing real to contribute other than I would like to see it :)

Before I asked I checked Google (as is expected of anyone these days)
and found some discussions on debian-powerpc from 2002 but nobody
really did anything and nothing really came of it. I know 4 years later
all we have is powernowd which pokes up cpufreq which only supports
DFS and certain kinds of Mac PMU. 

ICTC is such a simple thing to support and you can slow down the CPU
pretty comprehensively (from halving to 255x in theory) with an on and
off flag. I am surprised nobody implemented a cpufreq governer even if
it is totally useless and gives no perceivable benefits..

-- 
Matt Sealey <matt@genesi-usa.com>
Manager, Genesi, Developer Relations


> -----Original Message-----
> From: Jon Loeliger [mailto:jdl@jdl.com] 
> Sent: Friday, June 23, 2006 8:34 AM
> To: matt@genesi-usa.com
> Cc: linuxppc-dev@ozlabs.org
> Subject: Re: cpu power "management" for non-dfs chips with no 
> pmu (for instance, 750cxe and mpc7447 in pegasos) 
> 
> So, like, the other day "Matt Sealey" mumbled:
> > 
> > I am basically trying to evaluate if we can do ANYTHING to reduce 
> > power consumption of systems which are idle, as I have noticed that 
> > ...
> > 
> > Comments? :)
> 
> Hi Matt,
> 
> There is an effort afoot to revitalize some of the Linux 
> Power Management issues, erm, currently going on over on the 
> linux-pm list these days.  No immediate results (yet), but 
> there is some concerted effort.  It should include some 
> PowerPC presence.
> 
> Please feel free to contribute, of course. :-)
> 
> jdl
> 

^ permalink raw reply

* Re: cpu power "management" for non-dfs chips with no pmu (for instance, 750cxe and mpc7447 in pegasos)
From: Jon Loeliger @ 2006-06-23 13:33 UTC (permalink / raw)
  To: matt; +Cc: linuxppc-dev
In-Reply-To: <018201c696b1$e942ba40$99dfdfdf@bakuhatsu.net>

So, like, the other day "Matt Sealey" mumbled:
> 
> I am basically trying to evaluate if we can do ANYTHING to reduce
> power consumption of systems which are idle, as I have noticed that
> ...
> 
> Comments? :)

Hi Matt,

There is an effort afoot to revitalize some of the Linux Power
Management issues, erm, currently going on over on the linux-pm
list these days.  No immediate results (yet), but there is some
concerted effort.  It should include some PowerPC presence.

Please feel free to contribute, of course. :-)

jdl

^ permalink raw reply

* Reg RISC timers in MPC 8260
From: Jagan @ 2006-06-23 13:16 UTC (permalink / raw)
  To: linuxppc-embedded

Hi

We have a requirement of starting a 1 millisecond
periodic timer in kernel space . The OS is monta vista
linux kernel version 2.4 and
Target is MPC 8260 . We are planning to use the RISC
timers in CPM
module. Can anyone send some sample reference code for
starting a
periodic timer for 1 millisecond using the RISC
timers?

Thanks in Advance
Morphics 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply

* "merge" branch reset in powerpc.git tree
From: Paul Mackerras @ 2006-06-23 11:44 UTC (permalink / raw)
  To: linuxppc-dev

If you are following the powerpc.git tree, and you pull the "merge"
branch, you will need to reset it to have commit ID
5fa21d821f6972e70942f2c555ec29dde962bdb2 as its head.  That's also the
head of the "master" branch and of Linus' linux-2.6 tree at the
moment.

This is because there was a merge between the "master" branch and the
linux-2.6 tree which Linus didn't pull - instead he did a new merge.
The merge I did is now redundant, and needs to be removed to keep the
powerpc and linux-2.6 trees in sync.

Paul.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox