LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 16/16] ehca: PHYP abstraction layer
From: Heiko J Schick @ 2006-04-27 10:49 UTC (permalink / raw)
  To: openib-general, Christoph Raisch, Hoang-Nam Nguyen, Marcus Eder,
	schihei, linux-kernel, linuxppc-dev

Signed-off-by: Heiko J Schick <schickhj@de.ibm.com>


  hcp_phyp.c |   97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  hcp_phyp.h |   97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2 files changed, 194 insertions(+)



--- linux-2.6.17-rc2-orig/drivers/infiniband/hw/ehca/hcp_phyp.h	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.17-rc2/drivers/infiniband/hw/ehca/hcp_phyp.h	2006-03-09 15:05:14.000000000 +0100
@@ -0,0 +1,97 @@
+/*
+ *  IBM eServer eHCA Infiniband device driver for Linux on POWER
+ *
+ *  Firmware calls
+ *
+ *  Authors: Christoph Raisch <raisch@de.ibm.com>
+ *           Hoang-Nam Nguyen <hnguyen@de.ibm.com>
+ *           Waleri Fomin <fomin@de.ibm.com>
+ *           Gerd Bayer <gerd.bayer@de.ibm.com>
+ *
+ *  Copyright (c) 2005 IBM Corporation
+ *
+ *  All rights reserved.
+ *
+ *  This source code is distributed under a dual license of GPL v2.0 and OpenIB
+ *  BSD.
+ *
+ * OpenIB BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  $Id: hcp_phyp.h,v 1.5 2006/03/09 14:05:14 schickhj Exp $
+ */
+
+#ifndef __HCP_PHYP_H__
+#define __HCP_PHYP_H__
+
+
+/* eHCA page (mapped into memory)
+    resource to access eHCA register pages in CPU address space
+*/
+struct h_galpa {
+	u64 fw_handle;
+	/* for pSeries this is a 64bit memory address where
+	   I/O memory is mapped into CPU address space (kv) */
+};
+
+/*
+   resource to access eHCA address space registers, all types
+*/
+struct h_galpas {
+	u32 pid;		/*PID of userspace galpa checking */
+	struct h_galpa user;	/* user space accessible resource,
+				   set to 0 if unused */
+	struct h_galpa kernel;	/* kernel space accessible resource,
+				   set to 0 if unused */
+};
+
+inline static u64 hipz_galpa_load(struct h_galpa galpa, u32 offset)
+{
+	u64 addr = galpa.fw_handle + offset;
+	u64 out;
+	EDEB_EN(7, "addr=%lx offset=%x ", addr, offset);
+	out = *(u64 *) addr;
+	EDEB_EX(7, "addr=%lx value=%lx", addr, out);
+	return out;
+};
+
+inline static void hipz_galpa_store(struct h_galpa galpa, u32 offset, u64 value)
+{
+	u64 addr = galpa.fw_handle + offset;
+	EDEB(7, "addr=%lx offset=%x value=%lx", addr,
+	     offset, value);
+	*(u64 *) addr = value;
+};
+
+int hcp_galpas_ctor(struct h_galpas *galpas,
+		    u64 paddr_kernel, u64 paddr_user);
+
+int hcp_galpas_dtor(struct h_galpas *galpas);
+
+int hcall_map_page(u64 physaddr, u64 * mapaddr);
+
+int hcall_unmap_page(u64 mapaddr);
+
+#endif
--- linux-2.6.17-rc2-orig/drivers/infiniband/hw/ehca/hcp_phyp.c	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.17-rc2/drivers/infiniband/hw/ehca/hcp_phyp.c	2006-03-17 13:31:35.000000000 +0100
@@ -0,0 +1,97 @@
+/*
+ *  IBM eServer eHCA Infiniband device driver for Linux on POWER
+ *
+ *   load store abstraction for ehca register access with tracing
+ *
+ *  Authors: Christoph Raisch <raisch@de.ibm.com>
+ *           Hoang-Nam Nguyen <hnguyen@de.ibm.com>
+ *
+ *  Copyright (c) 2005 IBM Corporation
+ *
+ *  All rights reserved.
+ *
+ *  This source code is distributed under a dual license of GPL v2.0 and OpenIB
+ *  BSD.
+ *
+ * OpenIB BSD License
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  $Id: hcp_phyp.c,v 1.7 2006/03/17 12:31:35 nguyen Exp $
+ */
+
+#define DEB_PREFIX "PHYP"
+
+#include "ehca_kernel.h"
+#include "ehca_classes.h"
+#include "hipz_hw.h"
+
+int hcall_map_page(u64 physaddr, u64 * mapaddr)
+{
+	*mapaddr = (u64)(ioremap(physaddr, 4096));
+
+	EDEB(7, "ioremap physaddr=%lx mapaddr=%lx", physaddr, *mapaddr);
+	return 0;
+}
+
+int hcall_unmap_page(u64 mapaddr)
+{
+	EDEB(7, "mapaddr=%lx", mapaddr);
+	iounmap((volatile void __iomem*)mapaddr);
+	return 0;
+}
+
+int hcp_galpas_ctor(struct h_galpas *galpas,
+		    u64 paddr_kernel, u64 paddr_user)
+{
+	int rc = 0;
+
+	rc = hcall_map_page(paddr_kernel, &galpas->kernel.fw_handle);
+	if (rc != 0)
+		return (rc);
+
+	galpas->user.fw_handle = paddr_user;
+
+	EDEB(7, "paddr_kernel=%lx paddr_user=%lx galpas->kernel=%lx"
+	     " galpas->user=%lx",
+	     paddr_kernel, paddr_user, galpas->kernel.fw_handle,
+	     galpas->user.fw_handle);
+
+	return (rc);
+}
+
+int hcp_galpas_dtor(struct h_galpas *galpas)
+{
+	int rc = 0;
+
+	if (galpas->kernel.fw_handle != 0)
+		rc = hcall_unmap_page(galpas->kernel.fw_handle);
+
+	if (rc != 0)
+		return (rc);
+
+	galpas->user.fw_handle = galpas->kernel.fw_handle = 0;
+
+	return rc;
+}

^ permalink raw reply

* [QUESTION] MPC834x DMA Support
From: KRONSTORFER Horst @ 2006-04-27 10:37 UTC (permalink / raw)
  To: linuxppc-dev

hi!

does anyone know if the mpc834x's dma unit supports dma operation
only between pci and csb or also between csb and csb, f.e. devices
connected via the lbc (f.e. ram and a dsp)?

thanks
-h

^ permalink raw reply

* Re: [PATCH 01/16] ehca: integration in Linux kernel build system
From: Arnd Bergmann @ 2006-04-27 11:07 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: schickhj, linux-kernel, openib-general, Christoph Raisch,
	Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <4450B384.4020601@de.ibm.com>

On Thursday 27 April 2006 14:05, Heiko J Schick wrote:
> Signed-off-by: Heiko J Schick <schickhj@de.ibm.com>
> 

Missing any description whatsoever.

> 
>   Kconfig  |    6 ++++++
>   Makefile |   29 +++++++++++++++++++++++++++++
>   2 files changed, 35 insertions(+)
> 

It would be more practical to put this patch last instead of
first so you don't break the build system with partial applies.

> --- linux-2.6.17-rc2-orig/drivers/infiniband/hw/ehca/Kconfig    1970-01-01 01:00:00.000000000 +0100
> +++ linux-2.6.17-rc2/drivers/infiniband/hw/ehca/Kconfig 2006-01-04 16:29:05.000000000 +0100
> @@ -0,0 +1,6 @@
> +config INFINIBAND_EHCA
> +       tristate "eHCA support"
> +       depends on IBMEBUS && INFINIBAND
> +       ---help---
> +       This is a low level device driver for the IBM
> +       GX based Host channel adapters (HCAs)
> \ No newline at end of file
> --- linux-2.6.17-rc2-orig/drivers/infiniband/hw/ehca/Makefile   1970-01-01 01:00:00.000000000 +0100
> +++ linux-2.6.17-rc2/drivers/infiniband/hw/ehca/Makefile        2006-03-06 12:26:36.000000000 +0100
> @@ -0,0 +1,29 @@
> +#  Authors: Heiko J Schick <schickhj@de.ibm.com>
> +#           Christoph Raisch <raisch@de.ibm.com>
> +#
> +#  Copyright (c) 2005 IBM Corporation
> +#
> +#  All rights reserved.
> +#
> +#  This source code is distributed under a dual license of GPL v2.0 and OpenIB BSD.
> +
> +obj-$(CONFIG_INFINIBAND_EHCA) += hcad_mod.o
> +
> +hcad_mod-objs = ehca_main.o   \
> +               ehca_hca.o    \
> +               ehca_mcast.o  \
> +               ehca_pd.o     \
> +               ehca_av.o     \
> +               ehca_eq.o     \
> +               ehca_cq.o     \
> +               ehca_qp.o     \
> +               ehca_sqp.o    \
> +               ehca_mrmw.o   \
> +               ehca_reqs.o   \
> +               ehca_irq.o    \
> +               ehca_uverbs.o \
> +               hcp_if.o      \
> +               hcp_phyp.o    \
> +               ipz_pt_fn.o
> +
> +CFLAGS += -DEHCA_USE_HCALL -DEHCA_USE_HCALL_KERNEL
> 
Do these need to be on the command line? If you always set them
anyways, you can probably get rid of the #ifdef checking for them.
If you want to keep the code for some reason, it might be better
to have a CONFIG_EHCA_USE_HCALL symbol that is set unconditionally
from Kconfig.

	Arnd <><

^ permalink raw reply

* Re: Xilinx Virtex-2 PRO FPGA ppc 405 on ML310 board
From: Aidan Williams @ 2006-04-27 11:15 UTC (permalink / raw)
  To: Vincent Winstead; +Cc: linuxppc-embedded
In-Reply-To: <20060425222107.97443.qmail@web52006.mail.yahoo.com>

Vincent Winstead wrote:
>   But I still have nothing working with the ML310 board.  I did a "dow 
> image.elf" at the XMD command prompt, then "con" and it showed up with a 
> "RUNNING>" prompt, but nothing showed up on the hyperterminal window.  I 
> compiled using 115200 baud and I changed my hyperterminal to match this, 
> but nothing shows up ...at all.  Where do you think I would need to 
> start looking to resolve this issue?

Ensure that your hardware is working by running one of
the xilinx-supplied demo programs on your design
that outputs stuff from the serial port (e.g. the memory
tester).  If nothing comes out, check your hardware
design carefully, check your serial port settings
(e.g. flow control), etc.

I would also read up on serial port block you are using
and its linux driver.  For example, if you're using the
uartlite, it could be that your hardware and software
don't agree on the baudrate.

e.g. See drivers/char/xilinx_uartlite/xuartlite.h :-

* @file xuartlite.h
*
* This component contains the implementation of the XUartLite component which is
* the driver for the Xilinx UART Lite device. This UART is a minimal hardware
* implementation with minimal features.  Most of the features, including baud
* rate, parity, and number of data bits are only configurable when the hardware
* device is built, rather than at run time by software.


- aidan

^ permalink raw reply

* Re: [PATCH 06/16] ehca: common include files
From: Arnd Bergmann @ 2006-04-27 11:19 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: linux-kernel, openib-general, Christoph Raisch, Hoang-Nam Nguyen,
	Marcus Eder
In-Reply-To: <4450A183.6030405@de.ibm.com>

On Thursday 27 April 2006 12:48, Heiko J Schick wrote:

> +/**
> + * ehca_adr_bad - Handle to be used for adress translation mechanisms,
> + * currently a placeholder.
> + */
> +inline static int ehca_adr_bad(void *adr)

'static inline', not 'inline static', by convention.


> +/* We will remove this lines in SVN when it is included in the Linux kernel.
> + * We don't want to introducte unnecessary dependencies to a patched kernel.
> + */
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)

Well, you should also remove this for submission, I guess ;-)

> +#define EHCA_EDEB_TRACE_MASK_SIZE 32
> +extern u8 ehca_edeb_mask[EHCA_EDEB_TRACE_MASK_SIZE];
> +#define EDEB_ID_TO_U32(str4) (str4[3] | (str4[2] << 8) | (str4[1] << 16) | \
> +			      (str4[0] << 24))
> +
> +inline static u64 ehca_edeb_filter(const u32 level,
> +				   const u32 id, const u32 line)

'static inline' again. best grep all your source for this, there are probably
more places.

> +{
> +	u64 ret = 0;
> +	u32 filenr = 0;
> +	u32 filter_level = 9;
> +	u32 dynamic_level = 0;
> +
> +	/* This is code written for the gcc -O2 optimizer which should colapse
> +	 * to two single ints filter_level is the first level kicked out by
> +	 * compiler means trace everythin below 6. */
> +	if (id == EDEB_ID_TO_U32("ehav")) {
> +		filenr = 0x01;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("clas")) {
> +		filenr = 0x02;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("cqeq")) {
> +		filenr = 0x03;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("shca")) {
> +		filenr = 0x05;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("eirq")) {
> +		filenr = 0x06;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("lMad")) {
> +		filenr = 0x07;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("mcas")) {
> +		filenr = 0x08;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("mrmw")) {
> +		filenr = 0x09;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("vpd ")) {
> +		filenr = 0x0a;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("e_qp")) {
> +		filenr = 0x0b;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("uqes")) {
> +		filenr = 0x0c;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("PHYP")) {
> +		filenr = 0x0d;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("hcpi")) {
> +		filenr = 0x0e;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("iptz")) {
> +		filenr = 0x0f;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("spta")) {
> +		filenr = 0x10;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("simp")) {
> +		filenr = 0x11;
> +		filter_level = 8;
> +	}
> +	if (id == EDEB_ID_TO_U32("reqs")) {
> +		filenr = 0x12;
> +		filter_level = 8;
> +	}

I guess you can convert that to

switch (id) {
	case EBEB_ID_CLAS:
		...
	case EDEB_ID_CQEQ:
		...
}

> +
> +#ifdef EHCA_USE_HCALL_KERNEL
> +#ifdef CONFIG_PPC_PSERIES
> +
> +#include <asm/paca.h>
> +

You could make everything down from here a separate header
for hcall.

^ permalink raw reply

* Re: [PATCH 10/16] ehca: event queue
From: Jörn Engel @ 2006-04-27 11:48 UTC (permalink / raw)
  To: Heiko J Schick
  Cc: linux-kernel, openib-general, linuxppc-dev, Christoph Raisch,
	Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <4450A1AD.7040506@de.ibm.com>

On Thu, 27 April 2006 12:49:17 +0200, Heiko J Schick wrote:
>
> +     	ret = hipz_h_alloc_resource_eq(shca->ipz_hca_handle,

Indentation?

> +				       &eq->pf,
> +				       type,
> +				       length,
> +				       &eq->ipz_eq_handle,
> +				       &eq->length,
> +				       &nr_pages, &eq->ist);
> +
> +	if (ret != H_SUCCESS) {

Common convention is to return 0 on success and -ESOMETHING on eror.
You might want to follow that and remove H_SUCCESS from the complete
code.

> +		if (!(vpage = ipz_qpageit_get_inc(&eq->ipz_queue))) {

I personally despise assignments in conditionals.  Not sure if this is
documented in CodingStyle, but IME most kernel hackers tend to dislike
it as well.

Jörn

-- 
Don't patch bad code, rewrite it.
-- Kernigham and Pike, according to Rusty

^ permalink raw reply

* Re: [PATCH 05/16] ehca: InfiniBand query and multicast functionality
From: Jörn Engel @ 2006-04-27 11:41 UTC (permalink / raw)
  To: Heiko J Schick
  Cc: linux-kernel, openib-general, linuxppc-dev, Christoph Raisch,
	Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <4450A17D.4030708@de.ibm.com>

Some small stuff.

On Thu, 27 April 2006 12:48:29 +0200, Heiko J Schick wrote:
> 
> + *  This source code is distributed under a dual license of GPL v2.0 and 
> OpenIB

Line wrap.  You might want to check your mailer or switch to a
different one.

> +		return (-EINVAL);

Remove brackets.

> +	if (H_SUCCESS != hipz_rc) {

To frown upon reversed grammar, I tend.  Hard to understand, such code
is.

With a decent compiler, there is zero advantage to put the constant
first - assuming you don't ignore warnings.  But it makes the code
just as hard to read as the Yoda-speak above.

> +	return retcode;

People tend to use the shorter "ret" or "err".

Jörn

-- 
You can take my soul, but not my lack of enthusiasm.
-- Wally

^ permalink raw reply

* Re: [PATCH 04/16] ehca: userspace support
From: Jörn Engel @ 2006-04-27 11:43 UTC (permalink / raw)
  To: Heiko J Schick
  Cc: linux-kernel, openib-general, linuxppc-dev, Christoph Raisch,
	Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <4450A176.9000008@de.ibm.com>

More minors.

On Thu, 27 April 2006 12:48:22 +0200, Heiko J Schick wrote:
> +
> +	EDEB_EN(7,
> +		"vm_start=%lx vm_end=%lx vm_page_prot=%lx vm_fileoff=%lx "
> +		"address=%lx",
> +		vma->vm_start, vma->vm_end, vma->vm_page_prot, fileoffset,
> +		address);

Gesundheit!  Seriously, I suspect "EDEB_EN" is not the best possible
name to pick.

> +                if (cq->ownpid!=cur_pid) {

Coding style would require spaces around binary operators.

Jörn

-- 
He that composes himself is wiser than he that composes a book.
-- B. Franklin

^ permalink raw reply

* Re: [Fastboot] Documentation feedback request.
From: Mohan Kumar M @ 2006-04-27 11:57 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev list, fastboot
In-Reply-To: <1146095071.29876.23.camel@localhost.localdomain>

On Thu, Apr 27, 2006 at 09:44:31AM +1000, Michael Ellerman wrote:
> Hi David,
> 
> Nice work. Few comments below ...
> 
> On Wed, 2006-04-26 at 10:49 -0700, David Wilder wrote:
> > Attached is a updated  Documentation/kdump/kdump.txt.  Please provide 
> > comments.  I will incorporate your feedback and send up to Linus.
> > 
> > plain text document attachment (kdump-final-20060425.txt)
> > ================================================================
> > Documentation for Kdump - The kexec-based Crash Dumping Solution
> > ================================================================
> > 
> > This document includes overview, setup and installation, and analysis
> > information.
> > 
> > Overview
> > ========
> > 
> > Kdump uses kexec to quickly boot to a dump-capture kernel whenever a
> > dump of the system kernel's memory needs to be taken (for example, when
> > the system panics). The system kernel's memory image is preserved across
> > the reboot and is accessible to the dump-capture kernel.
> > 
> > You can use common Linux commands, such as cp and scp, to copy the
> > memory image to a dump file on the local disk, or across the network to
> > a remote system.
> > 
> > Kdump and kexec are currently supported on the x86, x86_64, and ppc64
> > architectures.
> 
> s/ppc64/64-bit powerpc/ ?
> 
> > When the system kernel boots, it reserves a small section of memory for
> > the dump-capture kernel. This ensures that ongoing Direct Memory Access
> > (DMA) from the system kernel does not corrupt the dump-capture kernel. 
> > The kexec -p command loads the dump-capture kernel into this reserved
> > memory.
> 
> Well hopefully ;)
> 
> > On x86 machines, the first 640 KB of physical memory is needed to boot,
> > regardless of where the kernel loads. Therefore, kexec backs up this
> > region just before rebooting into the dump-capture kernel.
> > 
> > All of the necessary information about the system kernel's core image is
> > encoded in the ELF format, and stored in a reserved area of memory
> > before a crash. The physical address of the start of the ELF header is
> > passed to the dump-capture kernel through the elfcorehdr= boot
> > parameter.
> > 
> > With the dump-capture kernel, you can access the memory image, or "old
> > memory," in two ways:
> > 
> > - Through a /dev/oldmem device interface. A capture utility can read the
> >   device file and write out the memory in raw format. This is a raw dump
> >   of memory. Analysis and capture tools must be intelligent enough to
> >   determine where to look for the right information.
> > 
> > - Through /proc/vmcore. This exports the dump as an ELF-format file that
> >   you can write out using file copy commands such as cp or scp. Further,
> >   you can use analysis tools such as the GNU Debugger (GDB) and the Crash
> >   tool to debug the dump file. This method ensures that the dump pages are
> >   correctly ordered.
> > 
> > 
> > Setup and Installation
> > ======================
> > 
> > Install kexec-tools and the Kdump patch
> > ---------------------------------------
> > 
> > 1) Login as the root user.
> > 
> > 2) Download the kexec-tools user-space package from the following URL:
> > 
> >    http://www.xmission.com/~ebiederm/files/kexec/kexec-tools-1.101.tar.gz
> > 
> > 3) Unpack the tarball with the tar command, as follows:
> > 
> >    tar xvpzf kexec-tools-1.101.tar.gz
> > 
> > 4) Download the latest consolidated Kdump patch from the following URL:
> > 
> >    http://lse.sourceforge.net/kdump/
> >    
> >    (This location is being used until all the user-space Kdump patches
> >    are integrated with the kexec-tools package.)
> >    
> > 5) Change to the kexec-tools-1.101 directory, as follows:
> > 
> >    cd kexec-tools-1.101
> > 
> > 6) Apply the consolidated patch to the kexec-tools-1.101 source tree
> >    with the patch command, as follows. (Modify the path to the downloaded
> >    patch as necessary.)
> >    
> >    patch -p1 < /path-to-kdump-patch/kexec-tools-1.101-kdump.patch
> > 
> > 7) Configure the package, as follows:
> > 
> >    ./configure
> > 
> > 8) Compile the package, as follows:
> > 
> >    make
> > 
> > 9) Install the package, as follows:
> > 
> >    make install
> > 
> > 
> > Download and build the system and dump-capture kernels
> > ------------------------------------------------------
> > 
> > Download the mainline (vanilla) kernel source code (2.6.13-rc1 or newer)
> > from http://www.kernel.org. Two kernels must be built: a system kernel
> > and a dump-capture kernel. Use the following steps to configure these
> > kernels with the necessary kexec and Kdump features:
> > 
> > System kernel
> > -------------
> > 
> > 1) Enable "kexec system call" in "Processor type and features."
> > 
> >    CONFIG_KEXEC=y
> > 
> > 2) Enable "sysfs file system support" in "Filesystem" -> "Pseudo
> >    filesystems." This is usually enabled by default.
> > 
> >    CONFIG_SYSFS=y
> > 
> >    Note that "sysfs file system support" might not appear in the "Pseudo
> >    filesystems" menu if "Configure standard kernel features (for small
> >    systems)" is not enabled in "General Setup." In this case, check the
> >    .config file itself to ensure that sysfs is turned on, as follows:
> > 
> >    grep 'CONFIG_SYSFS' .config
> 
> Is there a particular requirement for sysfs?
> 
> > 3) Enable "Compile the kernel with debug info" in "Kernel hacking."
> > 
> >    CONFIG_DEBUG_INFO=Y
> > 
> >    This causes the kernel to be built with debug symbols. The dump
> >    analysis tools require a vmlinux with debug symbols in order to read
> >    and analyze a dump file.
> >            
> > 4) Make and install the kernel and its modules. Update the boot loader
> >    (such as grub, yaboot, or lilo) configuration files as necessary.
> > 
> > 5) Boot the system kernel with the boot parameter "crashkernel=Y@X",
> >    where Y specifies how much memory to reserve for the dump-capture kernel
> >    and X specifies the beginning of this reserved memory. For example,
> >    "crashkernel=64M@16M" tells the system kernel to reserve 64 MB of memory
> >    starting at physical address 0x01000000 for the dump-capture kernel.
> 
> Most of this doesn't apply to powerpc.
> 
> >    On x86 and x86_64, use "crashkernel=64M@16M".
> > 
> >    On ppc64, use "crashkernel=128M@32M".
> 
> No just use "crashkernel=128M".
> 
May be this is to follow the same convention in other architectures.

> > The dump-capture kernel
> > -----------------------
> > 
> > 1) Under "General setup," append "-kdump" to the current string in
> >    "Local version."
> > 
> > 2) On x86, enable high memory support under "Processor type and
> >    features":
> > 
> >    CONFIG_HIGHMEM=y
> > 
> > 3) On x86 and x86_64, disable symmetric multi-processing support
> >    under "Processor type and features":
> >    
> >    CONFIG_SMP=n
> > 
> > 4) On ppc64, disable NUMA support and enable EMBEDDED support:
> >    
> >    CONFIG_NUMA=n
> >    CONFIG_EMBEDDED=y
> >    CONFIG_EEH=N for the dump-capture kernel
> 
> Why are we disabling NUMA? AFAIK we work on more systems with NUMA than
> without?
> And why are we turning off EMBEDDED and EEH?
> 
In some systems kdump with NUMA panics. Also EEH gives some oops while kdump booting. To disable EEH, we need to enable CONFIG_EMBEDDED

> > 5) Enable "kernel crash dumps" support under "Processor type and
> >    features":
> > 
> >    CONFIG_CRASH_DUMP=y
> > 
> > 6) Use a suitable value for "Physical address where the kernel is
> >    loaded" (under "Processor type and features"). This only appears when
> >    "kernel crash dumps" is enabled. By default this value is 0x1000000
> >    (16MB). It should be the same as X in the "crashkernel=Y@X" boot
> >    parameter discussed above.
> > 
> >    On x86 and x86_64, use "CONFIG_PHYSICAL_START=0x1000000".
> >       
> >    On ppc64 the value is automatically set at 32MB when
> >    CONFIG_CRASH_DUMP is set.
> 
> This whole step should start "On x86 ..."
> 
> > 6) Optionally enable "/proc/vmcore support" under "Filesystems" ->
> >    "Pseudo filesystems".
> 
> 6 + 1 = 6 :D
> 
> >    CONFIG_PROC_VMCORE=y
> >       
> > 7) Make and install the kernel and its modules. DO NOT add this kernel
> >    to the boot loader configuration files.
> >    
> > 
> > Load the Dump-capture Kernel
> > ============================
> > 
> > After booting to the system kernel, load the dump-capture kernel using
> > the following command:
> > 
> >    kexec -p <dump-capture-kernel> \
> >    --initrd=<initrd-for-dump-capture-kernel> --args-linux \
> >    --append="root=<root-dev> init 1 irqpoll"
> 
> I've never tested irqpoll on powerpc, I'm not sure we want to recommend
> it, has someone tested it?
> 
> > Notes on loading the dump-capture kernel:
> > 
> > * <dump-capture-kernel> must be a vmlinux image (that is, an
> >   uncompressed ELF image). bzImage does not work at this time.
> > 
> > * By default, the ELF headers are stored in ELF64 format to support
> >   systems with more than 4GB memory. The --elf32-core-headers option can
> >   be used to force the generation of ELF32 headers. This is necessary
> >   because GDB currently cannot open vmcore files with ELF64 headers on
> >   32-bit systems. ELF32 headers can be used on non-PAE systems (that is,
> >   less than 4GB of memory).
> > 		 
> > * The "irqpoll" boot parameter reduces driver initialization failures
> >   due to shared interrupts in the dump-capture kernel.
> > 		  
> > * You must specify <root-dev> in the format corresponding to the root
> >   device name in the output of mount command.
> 
> > * "init 1" boots the dump-capture kernel into single-user mode without
> >   networking. If you want networking, use "init 3."
> > 
> > 
> > Kernel Panic
> > ============
> > 
> > After successfully loading the dump-capture kernel as previously
> > described, the system will reboot into the dump-capture kernel if a
> > panic occurs. You can write a module to force the panic, or use
> > "ALT-SysRq-c" to initiate a crash dump for testing purposes.
> > 
> > 
> > Write Out the Dump File
> > =======================
> > 
> > After the dump-capture kernel is booted, write out the dump file with
> > the following command:
> > 
> >    cp /proc/vmcore <dump-file>
> > 
> > You can also access dumped memory as a /dev/oldmem device for a linear
> > and raw view. To create the device, use the following command:
> > 
> >     mknod /dev/oldmem c 1 12
> > 
> > Use the dd command with suitable options for count, bs, and skip to
> > access specific portions of the dump.
> > 
> > To see the entire memory, use the following command:
> >    
> >    dd if=/dev/oldmem of=oldmem.001
> > 
> > 
> > Analysis
> > ========
> > 
> > Before analyzing the dump image, you should reboot into a stable kernel.
> > 
> > You can do limited analysis using GDB on the dump file copied out of
> > /proc/vmcore. Use the debug vmlinux built with -g and run the following
> > command:
> > 
> >    gdb vmlinux <dump-file>
> > 
> > Stack trace for the task on processor 0, register display, and memory
> > display work fine.
> > 
> > Note: GDB cannot analyze core files generated in ELF64 format for x86. 
> > On systems with a maximum of 4GB of memory, you can generate
> > ELF32-format headers using the --elf32-core-headers kernel option on the
> > dump kernel.
> > 
> > You can also use the Crash utility to analyze dump files in Kdump
> > format. Crash is available on Dave Anderson's site at the following URL:
> > 
> >    http://people.redhat.com/~anderson/
> > 
> > 
> > To Do
> > =====
> > 
> > 1) Provide a kernel pages filtering mechanism, so core file size is not
> >    extreme on systems with huge memory banks.
> > 
> > 2) Relocatable kernel can help in maintaining multiple kernels for
> >    crash_dump, and the same kernel as the system kernel can be used to
> >    capture the dump.
> > 
> > 
> > Contact
> > =======
> > 
> > Vivek Goyal (vgoyal@in.ibm.com)
> > Maneesh Soni (maneesh@in.ibm.com)
> 
> fastboot@lists.osdl.org
> 
> 
> cheers
> 
> -- 
> Michael Ellerman
> IBM OzLabs
> 
> wwweb: http://michael.ellerman.id.au
> phone: +61 2 6212 1183 (tie line 70 21183)
> 
> We do not inherit the earth from our ancestors,
> we borrow it from our children. - S.M.A.R.T Person



> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

^ permalink raw reply

* Re: [PATCH 03/16] ehca: structure definitions
From: Jörn Engel @ 2006-04-27 11:57 UTC (permalink / raw)
  To: Heiko J Schick
  Cc: linux-kernel, openib-general, linuxppc-dev, Christoph Raisch,
	Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <4450A16D.7000008@de.ibm.com>

On Thu, 27 April 2006 12:48:13 +0200, Heiko J Schick wrote:
> +
> +#ifdef CONFIG_PPC64
> +#include "ehca_classes_pSeries.h"
> +#endif

Is the #ifdef necessary?  Such conditions around header includes often
indicate problems with the included header.  If that is the case here,
you should fix the header in question in a seperate patch.

> +struct ehca_shca {
> +	struct ib_device ib_device;
> +	struct ibmebus_dev *ibmebus_dev;
> +	u8 num_ports;
        ^^
> +	int hw_level;

This will cause some wasted space due to alignment.  There don't seem
to be other u8 or chars to consolidate with here, though.  Still, you
could take another look that your structures have fields on natural
alignment borders and don't grow without you noticing.

> +struct ehca_mr {
> +	union {
> +		struct ib_mr ib_mr;	/* must always be first in ehca_mr */
> +		struct ib_fmr ib_fmr;	/* must always be first in ehca_mr */
> +	} ib;
> +
> +	spinlock_t mrlock;
> +
> +	/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> +	 * !!! ehca_mr_deletenew() memsets from flags to end of structure
> +	 * !!! DON'T move flags or insert another field before.
> +	 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
> */

Yuck!  Do you have really good reasons to play such games?

> +struct ehca_pfpd {
> +};
> +
> +struct ehca_pfmr {
> +};
> +
> +struct ehca_pfmw {
> +};

Why these?

Jörn

-- 
Those who come seeking peace without a treaty are plotting.
-- Sun Tzu

^ permalink raw reply

* Re: [PATCH 03/16] ehca: structure definitions
From: Christoph Hellwig @ 2006-04-27 11:59 UTC (permalink / raw)
  To: J?rn Engel
  Cc: linux-kernel, openib-general, linuxppc-dev, Christoph Raisch,
	Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <20060427115749.GD32127@wohnheim.fh-wedel.de>

On Thu, Apr 27, 2006 at 01:57:49PM +0200, J?rn Engel wrote:
> On Thu, 27 April 2006 12:48:13 +0200, Heiko J Schick wrote:
> > +
> > +#ifdef CONFIG_PPC64
> > +#include "ehca_classes_pSeries.h"
> > +#endif
> 
> Is the #ifdef necessary?  Such conditions around header includes often
> indicate problems with the included header.  If that is the case here,
> you should fix the header in question in a seperate patch.

The real question is what is that ifdef for at all?  The code subitted
isn't built on anything but ppc64.

^ permalink raw reply

* Re: [PATCH 05/16] ehca: InfiniBand query and multicast functionality
From: Arnd Bergmann @ 2006-04-27 12:05 UTC (permalink / raw)
  To: Jörn Engel
  Cc: linux-kernel, openib-general, linuxppc-dev, Christoph Raisch,
	Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <20060427114104.GA32127@wohnheim.fh-wedel.de>

On Thursday 27 April 2006 13:41, Jörn Engel wrote:
> On Thu, 27 April 2006 12:48:29 +0200, Heiko J Schick wrote:
> > 
> > + *  This source code is distributed under a dual license of GPL v2.0 and 
> > OpenIB
> 
> Line wrap.  You might want to check your mailer or switch to a
> different one.
> 

Looks correct here. Maybe you need to check yours ;-)

	Arnd <><

^ permalink raw reply

* Re: [PATCH 02/16] ehca: module infrastructure
From: Jörn Engel @ 2006-04-27 12:09 UTC (permalink / raw)
  To: Heiko J Schick
  Cc: linux-kernel, openib-general, linuxppc-dev, Christoph Raisch,
	Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <4450A165.4000701@de.ibm.com>

On Thu, 27 April 2006 12:48:05 +0200, Heiko J Schick wrote:
>
> +	if (ehca_module->cache_pd == NULL) {

Hmm.

> +	ret = kmem_cache_destroy(ehca_module->cache_pd);
> +	if (ret != 0)

The " != 0" is completely superfluous.  Above NULL check is a matter
of taste, this one demonstates lack of boolean algebra understanding.

> +	rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL);
> +	if (!rblock) {

Hmm.  And your taste seems to change. :)

> +	if (ehca_hw_level == 0) {

And since we're on the subject.  Ignoring the recent discussion
involving akpm, viro and others, the kernel historically used int both
for integer and boolean, plus return values as a special kind of
"boolean with error indication attached".

For boolean, it is nicer to do things like "if (!error)", for
integers, a comparison as above is nicer.  Return codes fall into the
boolean category.  Pointers after kmalloc() and similar are viewed as
rich boolean by some people, but not by all.

Jörn

-- 
Geld macht nicht glücklich.
Glück macht nicht satt.

^ permalink raw reply

* Re: [PATCH 05/16] ehca: InfiniBand query and multicast functionality
From: Jörn Engel @ 2006-04-27 12:16 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-kernel, openib-general, linuxppc-dev, Christoph Raisch,
	Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <200604271405.36588.arnd@arndb.de>

On Thu, 27 April 2006 14:05:36 +0200, Arnd Bergmann wrote:
> On Thursday 27 April 2006 13:41, Jörn Engel wrote:
> > On Thu, 27 April 2006 12:48:29 +0200, Heiko J Schick wrote:
> > > 
> > > + *  This source code is distributed under a dual license of GPL v2.0 and 
> > > OpenIB
> > 
> > Line wrap.  You might want to check your mailer or switch to a
> > different one.
> > 
> 
> Looks correct here. Maybe you need to check yours ;-)

Weird.  I didn't change anything in the last couple of years and never
had problems before.

Jörn

-- 
The cheapest, fastest and most reliable components of a computer
system are those that aren't there.
-- Gordon Bell, DEC labratories

^ permalink raw reply

* Re: Xilinx SysACE drivers for Linux 2.4
From: Andrei Konovalov @ 2006-04-27 12:18 UTC (permalink / raw)
  To: Stephen Williams; +Cc: linuxppc-embedded
In-Reply-To: <e2opnj$gju$1@sea.gmane.org>

Stephen Williams wrote:
> So I'm now looking at moving from my bk based linuxppc-2.4 devel
> tree to the kernel.org sources, but the latter doesn't have the
> Xilinx SystemACE drivers. Is there a repository for the latest
> port (to kernel 2.4) of this driver, or should I just lift it
> from the kernel tree I have?

The same link Matt mentioned (as regards to PPC405GPr support):
rsync://source.mvista.com/linuxppc-2.4

Here is the most recent Xilinx Virtex stuff MontaVista has for 2.4 kernel.

Thanks,
Andrei

^ permalink raw reply

* Re: [PATCH 13/16] ehca: firmware InfiniBand interface
From: Jörn Engel @ 2006-04-27 12:37 UTC (permalink / raw)
  To: Heiko J Schick
  Cc: linux-kernel, openib-general, linuxppc-dev, Christoph Raisch,
	Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <4450A1C0.3080209@de.ibm.com>

On Thu, 27 April 2006 12:49:36 +0200, Heiko J Schick wrote:
> +u64 hipz_h_alloc_resource_qp(const struct ipz_adapter_handle 
> adapter_handle,
> +			     struct ehca_pfqp *pfqp,
> +			     const u8 servicetype,
> +			     const u8 daqp_ctrl,
> +			     const u8 signalingtype,
> +			     const u8 ud_av_l_key_ctl,
> +			     const struct ipz_cq_handle send_cq_handle,
> +			     const struct ipz_cq_handle receive_cq_handle,
> +			     const struct ipz_eq_handle async_eq_handle,
> +			     const u32 qp_token,
> +			     const struct ipz_pd pd,
> +			     const u16 max_nr_send_wqes,
> +			     const u16 max_nr_receive_wqes,
> +			     const u8 max_nr_send_sges,
> +			     const u8 max_nr_receive_sges,
> +			     const u32 ud_av_l_key,
> +			     struct ipz_qp_handle *qp_handle,
> +			     u32 * qp_nr,
> +			     u16 * act_nr_send_wqes,
> +			     u16 * act_nr_receive_wqes,
> +			     u8 * act_nr_send_sges,
> +			     u8 * act_nr_receive_sges,
> +			     u32 * nr_sq_pages,
> +			     u32 * nr_rq_pages,
> +			     struct h_galpas *h_galpas);

25 parameters?  If you tell me which drugs were involved in this code,
I know what to stay away from.  Might be the current record for any
code ever proposed for inclusion.

The whole patch is full of parameter-happy functions with this one
being the ugly top of the iceberg.  I sincerely hope this is not a
defined ABI and can still be changed.

Jörn

-- 
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.
-- Brian W. Kernighan

^ permalink raw reply

* Re: [PATCH 01/16] ehca: integration in Linux kernel build system
From: Jörn Engel @ 2006-04-27 12:39 UTC (permalink / raw)
  To: Heiko J Schick
  Cc: schickhj, linux-kernel, openib-general, linuxppc-dev,
	Christoph Raisch, Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <4450B384.4020601@de.ibm.com>

On Thu, 27 April 2006 14:05:24 +0200, Heiko J Schick wrote:
> +
> +hcad_mod-objs = ehca_main.o   \
> +		ehca_hca.o    \
> +		ehca_mcast.o  \
> +		ehca_pd.o     \
> +		ehca_av.o     \
> +		ehca_eq.o     \
> +		ehca_cq.o     \
> +		ehca_qp.o     \
> +		ehca_sqp.o    \
> +		ehca_mrmw.o   \
> +		ehca_reqs.o   \
> +		ehca_irq.o    \
> +		ehca_uverbs.o \
> +		hcp_if.o      \
> +		hcp_phyp.o    \
> +		ipz_pt_fn.o

If you don't consolidate this into 2-3 lines, Sam might turn you into
a toad.

Jörn

-- 
Audacity augments courage; hesitation, fear.
-- Publilius Syrus 

^ permalink raw reply

* Re: [PATCH 14/16] ehca: hardware interface
From: Jörn Engel @ 2006-04-27 12:41 UTC (permalink / raw)
  To: Heiko J Schick
  Cc: linux-kernel, openib-general, linuxppc-dev, Christoph Raisch,
	Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <4450A1C8.7090407@de.ibm.com>

On Thu, 27 April 2006 12:49:44 +0200, Heiko J Schick wrote:
> +#ifndef EHCA_USE_HCALL
> +#include "sim_gal.h"
> +#endif

Again, somethin's fishy.  And in this case, your own code seems to
be. ;)

Jörn

-- 
Simplicity is prerequisite for reliability.
-- Edsger W. Dijkstra

^ permalink raw reply

* Re: [PATCH 15/16] ehca: queue page table handling
From: Jörn Engel @ 2006-04-27 12:52 UTC (permalink / raw)
  To: Heiko J Schick
  Cc: linux-kernel, openib-general, linuxppc-dev, Christoph Raisch,
	Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <4450A1CE.80503@de.ibm.com>

On Thu, 27 April 2006 12:49:50 +0200, Heiko J Schick wrote:
> +inline static void *ipz_qeit_get_inc_valid(struct ipz_queue *queue)
> +{
> +	void *retvalue = ipz_qeit_get(queue);
> +	u32 qe = ((struct ehca_cqe *)retvalue)->cqe_flags;
> +	if ((qe >> 7) == (queue->toggle_state & 1)) {
> +		/* this is a good one */
> +		ipz_qeit_get_inc(queue);
> +	} else
> +		retvalue = NULL;
> +	return (retvalue);
> +}

How about:
static inline void *ipz_qeit_get_inc_valid(struct ipz_queue *queue)
{
	struct ehca_cqe *cqe = ipz_qeit_get(queue);
	u32 flags = cqe->cqe_flags;

	if ((flags >> 7) != (queue->toggle_state & 1))
		return NULL;

	ipz_qeit_get_inc(queue);
	return cqe;
}

o "static inline", as Arnd requested,
o no cast for cqe,
o possibly useful identifier for "retvalue",
o trivial to identify error path (hint: only error path is indented),
o directly returns NULL instead of assigning to a variable,
o removed brackets around return value.

I'm still not happy with "ehca_cqe" (just try to pronounce it) and the
weird condition.  But you should get the general idea.  Same goes for
other functions.

Jörn

-- 
The cheapest, fastest and most reliable components of a computer
system are those that aren't there.
-- Gordon Bell, DEC labratories

^ permalink raw reply

* Re: [PATCH 00/16] ehca: IBM eHCA InfiniBand Device Driver
From: Jörn Engel @ 2006-04-27 12:57 UTC (permalink / raw)
  To: Heiko J Schick
  Cc: schickhj, linux-kernel, openib-general, linuxppc-dev,
	Christoph Raisch, Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <4450B378.9000705@de.ibm.com>

On Thu, 27 April 2006 14:05:12 +0200, Heiko J Schick wrote:
> 
> many thanks for your comments. They are very helpful for us. All
> 17 patches have to be applied, otherwise the driver won't compile.

Don't expect much cheer and rejoicing over this.  I suspect that akpm
or Linus will either want the 17 patches merged into one or have a
patchset where every single patch leaves the kernel in a working
state, including working eHCA driver.

Generally, there seemed to be a bit more SHOUTING when compared to
other kernel code.  Might be something to look at as well.

Jörn

-- 
Rules of Optimization:
Rule 1: Don't do it.
Rule 2 (for experts only): Don't do it yet.
-- M.A. Jackson 

^ permalink raw reply

* Re: [PATCH 05/16] ehca: InfiniBand query and multicast functionality
From: Christoph Hellwig @ 2006-04-27 13:45 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-kernel, openib-general, linuxppc-dev, Christoph Raisch,
	Hoang-Nam Nguyen, Marcus Eder, J?rn Engel
In-Reply-To: <200604271405.36588.arnd@arndb.de>

On Thu, Apr 27, 2006 at 02:05:36PM +0200, Arnd Bergmann wrote:
> On Thursday 27 April 2006 13:41, J?rn Engel wrote:
> > On Thu, 27 April 2006 12:48:29 +0200, Heiko J Schick wrote:
> > > 
> > > + * ?This source code is distributed under a dual license of GPL v2.0 and 
> > > OpenIB
> > 
> > Line wrap. ?You might want to check your mailer or switch to a
> > different one.
> > 
> 
> Looks correct here. Maybe you need to check yours ;-)

It's linewrapped here, too.  And the mailer on this box hasn't changed
for more than three years.  OTOH I got strangely looking mails from
you recently :)

^ permalink raw reply

* Re: [PATCH] Wire up *at syscalls
From: Andreas Schwab @ 2006-04-27 13:46 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <jeu08ippb9.fsf@sykes.suse.de>

Updated for 2.6.17-rc2.

Andreas.

Wire up *at syscalls.

Signed-off-by: Andreas Schwab <schwab@suse.de>

---
 arch/powerpc/kernel/systbl.S                |   13 +++++++++++++
 arch/powerpc/platforms/cell/spu_callbacks.c |   13 +++++++++++++
 fs/stat.c                                   |    2 +-
 include/asm-powerpc/unistd.h                |   20 +++++++++++++++++++-
 4 files changed, 46 insertions(+), 2 deletions(-)

Index: linux-2.6.17-rc3/arch/powerpc/kernel/systbl.S
===================================================================
--- linux-2.6.17-rc3.orig/arch/powerpc/kernel/systbl.S	2006-04-27 11:11:28.000000000 +0200
+++ linux-2.6.17-rc3/arch/powerpc/kernel/systbl.S	2006-04-27 11:17:36.000000000 +0200
@@ -325,6 +325,19 @@ SYSCALL(unshare)
 SYSCALL(splice)
 SYSCALL(tee)
 SYSCALL(vmsplice)
+COMPAT_SYS(openat)
+SYSCALL(mkdirat)
+SYSCALL(mknodat)
+SYSCALL(fchownat)
+COMPAT_SYS(futimesat)
+SYSX(sys_newfstatat, sys_fstatat64, sys_fstatat64)
+SYSCALL(unlinkat)
+SYSCALL(renameat)
+SYSCALL(linkat)
+SYSCALL(symlinkat)
+SYSCALL(readlinkat)
+SYSCALL(fchmodat)
+SYSCALL(faccessat)
 
 /*
  * please add new calls to arch/powerpc/platforms/cell/spu_callbacks.c
Index: linux-2.6.17-rc3/include/asm-powerpc/unistd.h
===================================================================
--- linux-2.6.17-rc3.orig/include/asm-powerpc/unistd.h	2006-04-27 11:12:05.000000000 +0200
+++ linux-2.6.17-rc3/include/asm-powerpc/unistd.h	2006-04-27 11:18:21.000000000 +0200
@@ -304,8 +304,25 @@
 #define __NR_splice		283
 #define __NR_tee		284
 #define __NR_vmsplice		285
+#define __NR_openat		286
+#define __NR_mkdirat		287
+#define __NR_mknodat		288
+#define __NR_fchownat		289
+#define __NR_futimesat		290
+#ifdef __powerpc64__
+#define __NR_newfstatat		291
+#else
+#define __NR_fstatat64		291
+#endif
+#define __NR_unlinkat		292
+#define __NR_renameat		293
+#define __NR_linkat		294
+#define __NR_symlinkat		295
+#define __NR_readlinkat		296
+#define __NR_fchmodat		297
+#define __NR_faccessat		298
 
-#define __NR_syscalls		286
+#define __NR_syscalls		299
 
 #ifdef __KERNEL__
 #define __NR__exit __NR_exit
@@ -458,6 +475,7 @@ type name(type1 arg1, type2 arg2, type3 
 #ifdef CONFIG_PPC64
 #define __ARCH_WANT_COMPAT_SYS_TIME
 #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
+#define __ARCH_WANT_SYS_NEWFSTATAT
 #endif
 
 /*
Index: linux-2.6.17-rc3/arch/powerpc/platforms/cell/spu_callbacks.c
===================================================================
--- linux-2.6.17-rc3.orig/arch/powerpc/platforms/cell/spu_callbacks.c	2006-04-27 11:11:28.000000000 +0200
+++ linux-2.6.17-rc3/arch/powerpc/platforms/cell/spu_callbacks.c	2006-04-27 11:18:52.000000000 +0200
@@ -319,6 +319,19 @@ void *spu_syscall_table[] = {
 	[__NR_splice]			sys_splice,
 	[__NR_tee]			sys_tee,
 	[__NR_vmsplice]			sys_vmsplice,
+	[__NR_openat]			sys_openat,
+	[__NR_mkdirat]			sys_mkdirat,
+	[__NR_mknodat]			sys_mknodat,
+	[__NR_fchownat]			sys_fchownat,
+	[__NR_futimesat]		sys_futimesat,
+	[__NR_newfstatat]		sys_newfstatat,
+	[__NR_unlinkat]			sys_unlinkat,
+	[__NR_renameat]			sys_renameat,
+	[__NR_linkat]			sys_linkat,
+	[__NR_symlinkat]		sys_symlinkat,
+	[__NR_readlinkat]		sys_readlinkat,
+	[__NR_fchmodat]			sys_fchmodat,
+	[__NR_faccessat]		sys_faccessat,
 };
 
 long spu_sys_callback(struct spu_syscall_block *s)
Index: linux-2.6.17-rc3/fs/stat.c
===================================================================
--- linux-2.6.17-rc3.orig/fs/stat.c	2006-04-25 01:52:39.000000000 +0200
+++ linux-2.6.17-rc3/fs/stat.c	2006-04-27 11:17:13.000000000 +0200
@@ -261,7 +261,7 @@ asmlinkage long sys_newlstat(char __user
 	return error;
 }
 
-#ifndef __ARCH_WANT_STAT64
+#if !defined(__ARCH_WANT_STAT64) || defined(__ARCH_WANT_SYS_NEWFSTATAT)
 asmlinkage long sys_newfstatat(int dfd, char __user *filename,
 				struct stat __user *statbuf, int flag)
 {

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply

* Re: [PATCH 13/16] ehca: firmware InfiniBand interface
From: Jörn Engel @ 2006-04-27 13:47 UTC (permalink / raw)
  To: Pekka Enberg
  Cc: linux-kernel, openib-general, linuxppc-dev, Christoph Raisch,
	Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <84144f020604270642j788be2ecp82841ac3b3ebcaad@mail.gmail.com>

On Thu, 27 April 2006 16:42:52 +0300, Pekka Enberg wrote:
> On 4/27/06, Jörn Engel <joern@wohnheim.fh-wedel.de> wrote:
> > The whole patch is full of parameter-happy functions with this one
> > being the ugly top of the iceberg.  I sincerely hope this is not a
> > defined ABI and can still be changed.
> 
> It's not in mainline, so it can be changed.

I was thinking more about firmware ABI.

Jörn

-- 
But this is not to say that the main benefit of Linux and other GPL
software is lower-cost. Control is the main benefit--cost is secondary.
-- Bruce Perens

^ permalink raw reply

* Re: [PATCH 13/16] ehca: firmware InfiniBand interface
From: Pekka Enberg @ 2006-04-27 13:42 UTC (permalink / raw)
  To: Jörn Engel
  Cc: linux-kernel, openib-general, linuxppc-dev, Christoph Raisch,
	Hoang-Nam Nguyen, Marcus Eder
In-Reply-To: <20060427123701.GG32127@wohnheim.fh-wedel.de>

On 4/27/06, J=F6rn Engel <joern@wohnheim.fh-wedel.de> wrote:
> The whole patch is full of parameter-happy functions with this one
> being the ugly top of the iceberg.  I sincerely hope this is not a
> defined ABI and can still be changed.

It's not in mainline, so it can be changed.

                                                Pekka

^ permalink raw reply

* QUICC Engine ATM driver
From: Alex Zeffertt @ 2006-04-27 14:11 UTC (permalink / raw)
  To: linuxppc-embedded, linux-atm-general@lists.sourceforge.net

Hi all,

Has anybody ported, or started to port, the mpc8260sar ATM driver for
the "PowerQUICC II" to the "PowerQUICC II Pro" (e.g. the MPC8360).  If
so I'd love to hear from you :)

Regards,

Alex


PS: For the record:

  PowerQUICC I contains a CPM1 which needs the mpc860sar driver
  PowerQUICC II & III contain a CPM2 which needs the mpc8260sar driver
  PowerQUICC II Pro contains a "QUICC Engine" ....

^ 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