* [PATCH 1/2] kexec: Added generic --reuseinitrd option
From: Michael Neuling @ 2007-04-23 8:30 UTC (permalink / raw)
To: kexec; +Cc: linuxppc-dev, horms, Fastboot mailing list, miltonm
In-Reply-To: <5129.1176956949@neuling.org>
Adds a generic --reuseinitrd option and performs some sanity checks on
it. Can be used with the retain_initrd kernel option.
---
This series attempts to address some of Milton's concerns.
kexec/kexec.c | 33 +++++++++++++++++++++++++++++++++
kexec/kexec.h | 2 ++
2 files changed, 35 insertions(+)
Index: kexec-tools-testing/kexec/kexec.c
===================================================================
--- kexec-tools-testing.orig/kexec/kexec.c
+++ kexec-tools-testing/kexec/kexec.c
@@ -748,6 +748,7 @@ void usage(void)
" load code into.\n"
" --mem-max=<addr> Specify the highest memory address to\n"
" load code into.\n"
+ " --reuseinird Reuse initrd from first boot.\n"
"\n"
"Supported kernel file types and options: \n");
for (i = 0; i < file_types; i++) {
@@ -772,6 +773,29 @@ static int kexec_loaded(void)
return ret;
}
+/* check we retained the initrd */
+void check_reuse_initrd(void)
+{
+ FILE * fp;
+ char * line = NULL;
+ size_t len = 0;
+ ssize_t read;
+
+ fp = fopen("/proc/cmdline", "r");
+ if (fp == NULL)
+ die("unable to open /proc/cmdline\n");
+ read = getline(&line, &len, fp);
+ if (strstr(line, "retain_initrd") == NULL)
+ die("unrecoverable error: current boot didn't "
+ "retain the initrd for reuse.\n");
+}
+
+/* Arch hook for reuse_initrd */
+void __attribute__((weak)) arch_reuse_initrd(void)
+{
+ die("--reuseinitrd not implemented on this architecture\n");
+}
+
int main(int argc, char *argv[])
{
int do_load = 1;
@@ -780,6 +804,7 @@ int main(int argc, char *argv[])
int do_sync = 1;
int do_ifdown = 0;
int do_unload = 0;
+ int do_reuse_initrd = 0;
unsigned long kexec_flags = 0;
char *type = 0;
char *endptr;
@@ -860,6 +885,9 @@ int main(int argc, char *argv[])
return 1;
}
break;
+ case OPT_REUSE_INITRD:
+ do_reuse_initrd = 1;
+ break;
default:
break;
}
@@ -890,6 +918,11 @@ int main(int argc, char *argv[])
}
}
+ if (do_reuse_initrd){
+ check_reuse_initrd();
+ arch_reuse_initrd();
+ }
+
if (do_unload) {
result = k_unload(kexec_flags);
}
Index: kexec-tools-testing/kexec/kexec.h
===================================================================
--- kexec-tools-testing.orig/kexec/kexec.h
+++ kexec-tools-testing/kexec/kexec.h
@@ -163,6 +163,7 @@ extern int file_types;
#define OPT_MEM_MIN 256
#define OPT_MEM_MAX 257
#define OPT_MAX 258
+#define OPT_REUSE_INITRD 259
#define KEXEC_OPTIONS \
{ "help", 0, 0, OPT_HELP }, \
{ "version", 0, 0, OPT_VERSION }, \
@@ -175,6 +176,7 @@ extern int file_types;
{ "load-panic", 0, 0, OPT_PANIC }, \
{ "mem-min", 1, 0, OPT_MEM_MIN }, \
{ "mem-max", 1, 0, OPT_MEM_MAX }, \
+ { "reuseinitrd", 0, 0, OPT_REUSE_INITRD }, \
#define KEXEC_OPT_STR "hvdfxluet:p"
^ permalink raw reply
* [PATCH 2/2] kexec ppc64: Add arch specific --reuseinitrd hooks
From: Michael Neuling @ 2007-04-23 8:30 UTC (permalink / raw)
To: kexec; +Cc: linuxppc-dev, horms, Fastboot mailing list, miltonm
In-Reply-To: <13112.1177317015@neuling.org>
Adds ppc64 specific hooks for the --reuseinitrd option.
--
kexec/arch/ppc64/fs2dt.c | 30 ++++++++++++++++++++++--------
kexec/arch/ppc64/kexec-elf-ppc64.c | 13 ++++++++++++-
kexec/arch/ppc64/kexec-ppc64.h | 1 +
3 files changed, 35 insertions(+), 9 deletions(-)
Index: kexec-tools-testing/kexec/arch/ppc64/fs2dt.c
===================================================================
--- kexec-tools-testing.orig/kexec/arch/ppc64/fs2dt.c
+++ kexec-tools-testing/kexec/arch/ppc64/fs2dt.c
@@ -66,11 +66,11 @@ void reserve(unsigned long long where, u
}
/* look for properties we need to reserve memory space for */
-static void checkprop(char *name, unsigned *data)
+static void checkprop(char *name, unsigned *data, int len)
{
- static unsigned long long base, size;
+ static unsigned long long base, size, end;
- if ((data == NULL) && (base || size))
+ if ((data == NULL) && (base || size || end))
die("unrecoverable error: no property data");
else if (!strcmp(name, "linux,rtas-base"))
base = *data;
@@ -79,11 +79,24 @@ static void checkprop(char *name, unsign
else if (!strcmp(name, "rtas-size") ||
!strcmp(name, "linux,tce-size"))
size = *data;
+ else if (reuse_initrd && !strcmp(name, "linux,initrd-start"))
+ if (len == 8)
+ base = *(unsigned long long *) data;
+ else
+ base = *data;
+ else if (reuse_initrd && !strcmp(name, "linux,initrd-end"))
+ end = *(unsigned long long *) data;
+ if (size && end)
+ die("unrecoverable error: size and end set at same time\n");
if (base && size) {
reserve(base, size);
base = size = 0;
}
+ if (base && end) {
+ reserve(base, end-base);
+ base = end = 0;
+ }
}
/*
@@ -213,10 +226,11 @@ static void putprops(char *fn, struct di
continue;
/* This property will be created/modified later in putnode()
- * So ignore it.
+ * So ignore it, unless we are reusing the initrd.
*/
- if (!strcmp(dp->d_name, "linux,initrd-start") ||
- !strcmp(dp->d_name, "linux,initrd-end"))
+ if ((!strcmp(dp->d_name, "linux,initrd-start") ||
+ !strcmp(dp->d_name, "linux,initrd-end")) &&
+ !reuse_initrd)
continue;
if (! S_ISREG(statbuf.st_mode))
@@ -241,7 +255,7 @@ static void putprops(char *fn, struct di
die("unrecoverable error: could not read \"%s\": %s\n",
pathname, strerror(errno));
- checkprop(fn, dt);
+ checkprop(fn, dt, len);
/* Get the cmdline from the device-tree and modify it */
if (!strcmp(dp->d_name, "bootargs")) {
@@ -282,7 +296,7 @@ static void putprops(char *fn, struct di
}
fn[0] = '\0';
- checkprop(pathname, NULL);
+ checkprop(pathname, NULL, 0);
}
/*
Index: kexec-tools-testing/kexec/arch/ppc64/kexec-elf-ppc64.c
===================================================================
--- kexec-tools-testing.orig/kexec/arch/ppc64/kexec-elf-ppc64.c
+++ kexec-tools-testing/kexec/arch/ppc64/kexec-elf-ppc64.c
@@ -43,6 +43,8 @@
#define BOOTLOADER_VERSION VERSION
unsigned long initrd_base, initrd_size;
+unsigned char reuse_initrd = 0;
+const char *ramdisk;
int create_flatten_tree(struct kexec_info *, unsigned char **, unsigned long *,
char *);
@@ -69,12 +71,17 @@ int elf_ppc64_probe(const char *buf, off
return result;
}
+void arch_reuse_initrd(void)
+{
+ reuse_initrd = 1;
+}
+
int elf_ppc64_load(int argc, char **argv, const char *buf, off_t len,
struct kexec_info *info)
{
struct mem_ehdr ehdr;
char *cmdline, *modified_cmdline;
- const char *ramdisk, *devicetreeblob;
+ const char *devicetreeblob;
int cmdline_len, modified_cmdline_len;
unsigned long long max_addr, hole_addr;
unsigned char *seg_buf = NULL;
@@ -148,6 +155,10 @@ int elf_ppc64_load(int argc, char **argv
else
fprintf(stdout, "Warning: append= option is not passed. Using the first kernel root partition\n");
+ if (ramdisk && reuse_initrd)
+ die("Can't specify --ramdisk or --initrd with "
+ "--reuseinitrd\n");
+
setup_memory_ranges(info->kexec_flags);
/* Need to append some command line parameters internally in case of
Index: kexec-tools-testing/kexec/arch/ppc64/kexec-ppc64.h
===================================================================
--- kexec-tools-testing.orig/kexec/arch/ppc64/kexec-ppc64.h
+++ kexec-tools-testing/kexec/arch/ppc64/kexec-ppc64.h
@@ -16,6 +16,7 @@ void reserve(unsigned long long where, u
extern unsigned long initrd_base, initrd_size;
extern int max_memory_ranges;
+extern unsigned char reuse_initrd;
/* boot block version 2 as defined by the linux kernel */
struct bootblock {
^ permalink raw reply
* Re: [PATCH 7/7] MPIC MSI backend
From: Michael Ellerman @ 2007-04-23 8:31 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: Olof Johansson, linuxppc-dev, linux-pci, Milton Miller
In-Reply-To: <829d8b36a3c78c662f29437c59290609@kernel.crashing.org>
[-- Attachment #1: Type: text/plain, Size: 889 bytes --]
On Mon, 2007-04-23 at 10:24 +0200, Segher Boessenkool wrote:
> >> mpic_htmsi deals with MSIs that come in over hypertransport
> >> to the MPIC on CPC925/CPC945; this has nothing to
> >> do with HT APICs.
> >
> > Maybe it should be named mpic_cpc9x5msi instead?
>
> Yeah probably, esp. since there are more MSI sources
> on those chips, not just HT; and if support for those
> sources gets added later, it should go to this file :-)
Actually I think I'll call it mpic_u3_msi.c, which although not quite as
accurate as cpc9x5, is more inline with the rest of the code that refers
to U3 - which really means U3/U4.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
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
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* [PATCH] Rename MPIC_BROKEN_U3 to MPIC_U3_HT_IRQS
From: Michael Ellerman @ 2007-04-23 8:47 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Olof Johannsson, linuxppc-dev
Rename MPIC_BROKEN_U3 to something a little more descriptive. Its
effect is to enable support for HT irqs behind the PCI-X/HT bridge on
U3/U4 (aka. CPC9x5) parts.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/configs/g5_defconfig | 2 +-
arch/powerpc/configs/maple_defconfig | 2 +-
arch/powerpc/configs/ppc64_defconfig | 2 +-
arch/powerpc/platforms/Kconfig | 2 +-
arch/powerpc/platforms/maple/Kconfig | 2 +-
arch/powerpc/platforms/maple/setup.c | 2 +-
arch/powerpc/platforms/powermac/Kconfig | 2 +-
arch/powerpc/platforms/powermac/pic.c | 2 +-
arch/powerpc/sysdev/mpic.c | 24 ++++++++++++------------
include/asm-powerpc/mpic.h | 12 ++++++------
10 files changed, 26 insertions(+), 26 deletions(-)
Index: msi-new/arch/powerpc/configs/g5_defconfig
===================================================================
--- msi-new.orig/arch/powerpc/configs/g5_defconfig
+++ msi-new/arch/powerpc/configs/g5_defconfig
@@ -143,7 +143,7 @@ CONFIG_PPC_NATIVE=y
CONFIG_U3_DART=y
# CONFIG_PPC_RTAS is not set
# CONFIG_MMIO_NVRAM is not set
-CONFIG_MPIC_BROKEN_U3=y
+CONFIG_MPIC_U3_HT_IRQS=y
# CONFIG_PPC_MPC106 is not set
CONFIG_PPC_970_NAP=y
# CONFIG_PPC_INDIRECT_IO is not set
Index: msi-new/arch/powerpc/configs/maple_defconfig
===================================================================
--- msi-new.orig/arch/powerpc/configs/maple_defconfig
+++ msi-new/arch/powerpc/configs/maple_defconfig
@@ -146,7 +146,7 @@ CONFIG_PPC_RTAS=y
CONFIG_RTAS_PROC=y
# CONFIG_RTAS_FLASH is not set
# CONFIG_MMIO_NVRAM is not set
-CONFIG_MPIC_BROKEN_U3=y
+CONFIG_MPIC_U3_HT_IRQS=y
# CONFIG_PPC_MPC106 is not set
CONFIG_PPC_970_NAP=y
# CONFIG_PPC_INDIRECT_IO is not set
Index: msi-new/arch/powerpc/configs/ppc64_defconfig
===================================================================
--- msi-new.orig/arch/powerpc/configs/ppc64_defconfig
+++ msi-new/arch/powerpc/configs/ppc64_defconfig
@@ -152,7 +152,7 @@ CONFIG_RTAS_ERROR_LOGGING=y
CONFIG_RTAS_PROC=y
CONFIG_RTAS_FLASH=m
CONFIG_MMIO_NVRAM=y
-CONFIG_MPIC_BROKEN_U3=y
+CONFIG_MPIC_U3_HT_IRQS=y
CONFIG_IBMVIO=y
# CONFIG_IBMEBUS is not set
# CONFIG_PPC_MPC106 is not set
Index: msi-new/arch/powerpc/platforms/Kconfig
===================================================================
--- msi-new.orig/arch/powerpc/platforms/Kconfig
+++ msi-new/arch/powerpc/platforms/Kconfig
@@ -104,7 +104,7 @@ config MMIO_NVRAM
bool
default n
-config MPIC_BROKEN_U3
+config MPIC_U3_HT_IRQS
bool
depends on PPC_MAPLE
default y
Index: msi-new/arch/powerpc/platforms/maple/Kconfig
===================================================================
--- msi-new.orig/arch/powerpc/platforms/maple/Kconfig
+++ msi-new/arch/powerpc/platforms/maple/Kconfig
@@ -3,7 +3,7 @@ config PPC_MAPLE
bool "Maple 970FX Evaluation Board"
select MPIC
select U3_DART
- select MPIC_BROKEN_U3
+ select MPIC_U3_HT_IRQS
select GENERIC_TBSYNC
select PPC_UDBG_16550
select PPC_970_NAP
Index: msi-new/arch/powerpc/platforms/maple/setup.c
===================================================================
--- msi-new.orig/arch/powerpc/platforms/maple/setup.c
+++ msi-new/arch/powerpc/platforms/maple/setup.c
@@ -264,7 +264,7 @@ static void __init maple_init_IRQ(void)
flags |= MPIC_BIG_ENDIAN;
/* XXX Maple specific bits */
- flags |= MPIC_BROKEN_U3 | MPIC_WANTS_RESET;
+ flags |= MPIC_U3_HT_IRQS | MPIC_WANTS_RESET;
/* All U3/U4 are big-endian, older SLOF firmware doesn't encode this */
flags |= MPIC_BIG_ENDIAN;
Index: msi-new/arch/powerpc/platforms/powermac/Kconfig
===================================================================
--- msi-new.orig/arch/powerpc/platforms/powermac/Kconfig
+++ msi-new/arch/powerpc/platforms/powermac/Kconfig
@@ -12,7 +12,7 @@ config PPC_PMAC64
depends on PPC_PMAC && POWER4
select MPIC
select U3_DART
- select MPIC_BROKEN_U3
+ select MPIC_U3_HT_IRQS
select GENERIC_TBSYNC
select PPC_970_NAP
default y
Index: msi-new/arch/powerpc/platforms/powermac/pic.c
===================================================================
--- msi-new.orig/arch/powerpc/platforms/powermac/pic.c
+++ msi-new/arch/powerpc/platforms/powermac/pic.c
@@ -489,7 +489,7 @@ static struct mpic * __init pmac_setup_o
* but works until I find a better way
*/
if (master && (flags & MPIC_BIG_ENDIAN))
- flags |= MPIC_BROKEN_U3;
+ flags |= MPIC_U3_HT_IRQS;
mpic = mpic_alloc(np, r.start, flags, 0, 0, name);
if (mpic == NULL)
Index: msi-new/arch/powerpc/sysdev/mpic.c
===================================================================
--- msi-new.orig/arch/powerpc/sysdev/mpic.c
+++ msi-new/arch/powerpc/sysdev/mpic.c
@@ -304,7 +304,7 @@ static void __init mpic_test_broken_ipi(
}
}
-#ifdef CONFIG_MPIC_BROKEN_U3
+#ifdef CONFIG_MPIC_U3_HT_IRQS
/* Test if an interrupt is sourced from HyperTransport (used on broken U3s)
* to force the edge setting on the MPIC and do the ack workaround.
@@ -476,7 +476,7 @@ static void __init mpic_scan_ht_pics(str
}
}
-#else /* CONFIG_MPIC_BROKEN_U3 */
+#else /* CONFIG_MPIC_U3_HT_IRQS */
static inline int mpic_is_ht_interrupt(struct mpic *mpic, unsigned int source)
{
@@ -487,7 +487,7 @@ static void __init mpic_scan_ht_pics(str
{
}
-#endif /* CONFIG_MPIC_BROKEN_U3 */
+#endif /* CONFIG_MPIC_U3_HT_IRQS */
#define mpic_irq_to_hw(virq) ((unsigned int)irq_map[virq].hwirq)
@@ -615,7 +615,7 @@ static void mpic_end_irq(unsigned int ir
mpic_eoi(mpic);
}
-#ifdef CONFIG_MPIC_BROKEN_U3
+#ifdef CONFIG_MPIC_U3_HT_IRQS
static void mpic_unmask_ht_irq(unsigned int irq)
{
@@ -665,7 +665,7 @@ static void mpic_end_ht_irq(unsigned int
mpic_ht_end_irq(mpic, src);
mpic_eoi(mpic);
}
-#endif /* !CONFIG_MPIC_BROKEN_U3 */
+#endif /* !CONFIG_MPIC_U3_HT_IRQS */
#ifdef CONFIG_SMP
@@ -788,7 +788,7 @@ static struct irq_chip mpic_ipi_chip = {
};
#endif /* CONFIG_SMP */
-#ifdef CONFIG_MPIC_BROKEN_U3
+#ifdef CONFIG_MPIC_U3_HT_IRQS
static struct irq_chip mpic_irq_ht_chip = {
.startup = mpic_startup_ht_irq,
.shutdown = mpic_shutdown_ht_irq,
@@ -797,7 +797,7 @@ static struct irq_chip mpic_irq_ht_chip
.eoi = mpic_end_ht_irq,
.set_type = mpic_set_irq_type,
};
-#endif /* CONFIG_MPIC_BROKEN_U3 */
+#endif /* CONFIG_MPIC_U3_HT_IRQS */
static int mpic_host_match(struct irq_host *h, struct device_node *node)
@@ -837,11 +837,11 @@ static int mpic_host_map(struct irq_host
/* Default chip */
chip = &mpic->hc_irq;
-#ifdef CONFIG_MPIC_BROKEN_U3
+#ifdef CONFIG_MPIC_U3_HT_IRQS
/* Check for HT interrupts, override vecpri */
if (mpic_is_ht_interrupt(mpic, hw))
chip = &mpic->hc_ht_irq;
-#endif /* CONFIG_MPIC_BROKEN_U3 */
+#endif /* CONFIG_MPIC_U3_HT_IRQS */
DBG("mpic: mapping to irq chip @%p\n", chip);
@@ -937,12 +937,12 @@ struct mpic * __init mpic_alloc(struct d
mpic->hc_irq.typename = name;
if (flags & MPIC_PRIMARY)
mpic->hc_irq.set_affinity = mpic_set_affinity;
-#ifdef CONFIG_MPIC_BROKEN_U3
+#ifdef CONFIG_MPIC_U3_HT_IRQS
mpic->hc_ht_irq = mpic_irq_ht_chip;
mpic->hc_ht_irq.typename = name;
if (flags & MPIC_PRIMARY)
mpic->hc_ht_irq.set_affinity = mpic_set_affinity;
-#endif /* CONFIG_MPIC_BROKEN_U3 */
+#endif /* CONFIG_MPIC_U3_HT_IRQS */
#ifdef CONFIG_SMP
mpic->hc_ipi = mpic_ipi_chip;
@@ -1142,7 +1142,7 @@ void __init mpic_init(struct mpic *mpic)
/* Do the HT PIC fixups on U3 broken mpic */
DBG("MPIC flags: %x\n", mpic->flags);
- if ((mpic->flags & MPIC_BROKEN_U3) && (mpic->flags & MPIC_PRIMARY))
+ if ((mpic->flags & MPIC_U3_HT_IRQS) && (mpic->flags & MPIC_PRIMARY))
mpic_scan_ht_pics(mpic);
for (i = 0; i < mpic->num_sources; i++) {
Index: msi-new/include/asm-powerpc/mpic.h
===================================================================
--- msi-new.orig/include/asm-powerpc/mpic.h
+++ msi-new/include/asm-powerpc/mpic.h
@@ -199,7 +199,7 @@ enum {
};
-#ifdef CONFIG_MPIC_BROKEN_U3
+#ifdef CONFIG_MPIC_U3_HT_IRQS
/* Fixup table entry */
struct mpic_irq_fixup
{
@@ -208,7 +208,7 @@ struct mpic_irq_fixup
u32 data;
unsigned int index;
};
-#endif /* CONFIG_MPIC_BROKEN_U3 */
+#endif /* CONFIG_MPIC_U3_HT_IRQS */
enum mpic_reg_type {
@@ -239,7 +239,7 @@ struct mpic
/* The "linux" controller struct */
struct irq_chip hc_irq;
-#ifdef CONFIG_MPIC_BROKEN_U3
+#ifdef CONFIG_MPIC_U3_HT_IRQS
struct irq_chip hc_ht_irq;
#endif
#ifdef CONFIG_SMP
@@ -268,7 +268,7 @@ struct mpic
/* Spurious vector to program into unused sources */
unsigned int spurious_vec;
-#ifdef CONFIG_MPIC_BROKEN_U3
+#ifdef CONFIG_MPIC_U3_HT_IRQS
/* The fixup table */
struct mpic_irq_fixup *fixups;
spinlock_t fixup_lock;
@@ -313,7 +313,7 @@ struct mpic
/* Set this for a big-endian MPIC */
#define MPIC_BIG_ENDIAN 0x00000002
/* Broken U3 MPIC */
-#define MPIC_BROKEN_U3 0x00000004
+#define MPIC_U3_HT_IRQS 0x00000004
/* Broken IPI registers (autodetected) */
#define MPIC_BROKEN_IPI 0x00000008
/* MPIC wants a reset */
@@ -352,7 +352,7 @@ struct mpic
* @senses_num: number of entries in the array
*
* Note about the sense array. If none is passed, all interrupts are
- * setup to be level negative unless MPIC_BROKEN_U3 is set in which
+ * setup to be level negative unless MPIC_U3_HT_IRQS is set in which
* case they are edge positive (and the array is ignored anyway).
* The values in the array start at the first source of the MPIC,
* that is senses[0] correspond to linux irq "irq_offset".
^ permalink raw reply
* Re: [PATCH][RFC] i2c: adds support for i2c bus on 8xx
From: Jean Delvare @ 2007-04-23 9:19 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-dev@ozlabs.org, lkml
In-Reply-To: <20070422152937.7332fc31@localhost.localdomain>
Hi Vitaly,
On Sun, 22 Apr 2007 15:29:37 +0400, Vitaly Bordug wrote:
> On Sat, 21 Apr 2007 09:57:07 +0200 Jean Delvare wrote:
> > I wonder what's the point of having a separate i2c algorithm driver.
> > We don't expect any other driver than i2c-rpx to ever use it, do we?
> > In that case, all the code should be added to i2c-rpx directly, this
> > will makes things more simple and more efficient.
>
> That is how it was back in 2.4 - if you see combine is a good move,
> I'm OK with it. But what shouldn't be rpc then - basically rpx(lite) is
> 8xx-based target, so let's call it all mpc8xx then.
Sure, I'm fine with a name change. If it makes more sense to name that
driver i2c-mpc8xx, that's OK with me.
> > > + tmo = jiffies + 1 * HZ;
> > > + while (!(in_8(&i2c->i2c_i2cer) & 0x11 || time_after(jiffies, tmo))) ;/* Busy wait, with a timeout */
> >
> > This could result in a one-second busy loop, not very friendly for
> > other drivers. It should sleep while waiting. Line too long, please
> > fold.
>
> Can you please elaborate a little here (or just point to the
> similar code)? I assume we should not block here, handling timeout
> in a waitqueue...
Blocking is not a problem. The problem is that you are keeping the CPU
for yourself while waiting, for up to one full second. That's not
acceptable. You should at least call schedule() or cond_resced() (I
don't know the difference, I admit) and/or cpu_relax() as is done in
i2c-mpc, i2c-ibm_iic and scx200_acb, or even sleep, as is done in
i2c-omap. Search for "time_after" in these 4 drivers for examples. I
believe that sleeping is more friendly.
> > You do not appear to handle repeated start. I can tell because the
> > code handles all messages the exact same way, be they the first,
> > second or last message of a group. This means that you don't really
> > implement the I2C protocol, but an approximation of it. It might be
> > sufficient for some I2C chips, but others will break. Look in the
> > specifications of your device for how this could be fixed.
>
> I doubt 8xx has a full-fledged i2c protocol stuff onboard, and basic
> code that were residing in 2.4 repo suite my needs quite well (afaict
> many others just don't care :)).
> I just think it is silly to drop the code already implemented and working
> even if it requires some efforts to bring it up to shape.
Well as far as I can see, only the repeated start is missing, so it's
not that far from a complete implementation. If the hardware can do it,
you simply have to add it to the driver. If the hardware really doesn't
do it (which would surprise me, but you never know), of course you
cannot implement it in the driver and we'll have to live with (well,
without) it. But that's definitely an issue to keep in mind if I2C chip
drivers start failing when used together with this bus driver.
> > > +static struct i2c_adapter rpx_ops = {
> >
> > Could be const?
> >
> prolly yes.
> > > + .owner = THIS_MODULE,
> > > + .name = "m8xx",
> >
> > Find a better name (e.g. "i2c-rpx").
> >
> What about mpc8xx?
i2c-mpc8xx then, OK.
> > > +/* Structure for a device driver */
> > > +static struct device_driver i2c_rpx_driver = {
> > > + .name = "fsl-i2c-cpm",
> > > + .bus = &platform_bus_type,
> > > + .probe = i2c_rpx_probe,
> > > + .remove = i2c_rpx_remove,
> > > +};
> >
> > Why don't you declare it as a struct platform_driver, register it with
> > platform_driver_register() and unregister it with
> > platform_driver_unregister()?
>
> Well. This stuff belongs to CPM1, of the mpc8xx family, but the
> target boards are different, and they may/should provide board
> specific inits and filling of platform data. With
> platform_driver_register we may end up with ifdef stuff here
> (which is evil).
I don't follow you here, sorry. Platform devices are declared by
board-specific code which can include all the needed initialization.
And device-specific data can be carried to the platform driver for
further use. The platform device/driver infrastructure is meant to
handle that kind of situation, so there really is no excuse that I can
see not to use it. i2c-omap and i2c-mpc use it. As a matter of fact you
_are_ declaring a platform driver (.bus = &platform_bus_type), just not
using the standard way.
--
Jean Delvare
^ permalink raw reply
* Re: [PATCH] [v2] powerpc: save trap number in bad_stack
From: Gabriel Paubert @ 2007-04-23 9:29 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev, paulus, anton
In-Reply-To: <20070422233821.GB28479@lixom.net>
On Sun, Apr 22, 2007 at 06:38:21PM -0500, Olof Johansson wrote:
> Save the trap number in the case of getting a bad stack in an exception
> handler. It is sometimes useful to know what exception it was that caused
> this to happen. Without this, no trap is reported.
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
>
> ---
>
> Changes since last time: Reduce to a u16 and move it.
>
> Index: powerpc/arch/powerpc/kernel/asm-offsets.c
> ===================================================================
> --- powerpc.orig/arch/powerpc/kernel/asm-offsets.c
> +++ powerpc/arch/powerpc/kernel/asm-offsets.c
> @@ -139,6 +139,7 @@ int main(void)
> DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time));
> DEFINE(PACA_SLBSHADOWPTR, offsetof(struct paca_struct, slb_shadow_ptr));
> DEFINE(PACA_DATA_OFFSET, offsetof(struct paca_struct, data_offset));
> + DEFINE(PACA_TRAP_SAVE, offsetof(struct paca_struct, trap_save));
>
> DEFINE(SLBSHADOW_STACKVSID,
> offsetof(struct slb_shadow, save_area[SLB_NUM_BOLTED - 1].vsid));
> Index: powerpc/include/asm-powerpc/paca.h
> ===================================================================
> --- powerpc.orig/include/asm-powerpc/paca.h
> +++ powerpc/include/asm-powerpc/paca.h
> @@ -68,6 +68,7 @@ struct paca_struct {
> void *emergency_sp; /* pointer to emergency stack */
> u64 data_offset; /* per cpu data offset */
> s16 hw_cpu_id; /* Physical processor number */
> + u16 trap_save; /* Used when bad stack is encountered */
> u8 cpu_start; /* At startup, processor spins until */
> /* this becomes non-zero. */
> struct slb_shadow *slb_shadow_ptr;
> Index: powerpc/arch/powerpc/kernel/head_64.S
> ===================================================================
> --- powerpc.orig/arch/powerpc/kernel/head_64.S
> +++ powerpc/arch/powerpc/kernel/head_64.S
> @@ -278,8 +278,12 @@ exception_marker:
> beq- 1f; \
> ld r1,PACAKSAVE(r13); /* kernel stack to use */ \
> 1: cmpdi cr1,r1,0; /* check if r1 is in userspace */ \
> - bge- cr1,bad_stack; /* abort if it is */ \
> - std r9,_CCR(r1); /* save CR in stackframe */ \
> + bge- cr1,2f; /* abort if it is */ \
> + b 3f; \
> +2: li r1,(n); /* will be reloaded later */ \
> + stw r1,PACA_TRAP_SAVE(r13); \
stW to an u16? stH seems safer!
> + b bad_stack; \
> +3: std r9,_CCR(r1); /* save CR in stackframe */ \
> std r11,_NIP(r1); /* save SRR0 in stackframe */ \
> std r12,_MSR(r1); /* save SRR1 in stackframe */ \
> std r10,0(r1); /* make stack chain pointer */ \
> @@ -940,6 +944,8 @@ bad_stack:
> SAVE_2GPRS(7,r1)
> SAVE_10GPRS(12,r1)
> SAVE_10GPRS(22,r1)
> + lwz r12,PACA_TRAP_SAVE(r13)
Same, well actually lwz->lhz.
> + std r12,_TRAP(r1)
> addi r11,r1,INT_FRAME_SIZE
> std r11,0(r1)
> li r12,0
Gabriel
^ permalink raw reply
* Re: [PATCH] [v2] powerpc: save trap number in bad_stack
From: Olof Johansson @ 2007-04-23 11:49 UTC (permalink / raw)
To: Gabriel Paubert; +Cc: linuxppc-dev, paulus, anton
In-Reply-To: <20070423092919.GA25145@iram.es>
On Mon, Apr 23, 2007 at 11:29:19AM +0200, Gabriel Paubert wrote:
> stW to an u16? stH seems safer!
Yes, thanks. my bad.
-Olof
^ permalink raw reply
* PCF8563 realtime clock does not initialize
From: Floris Lambrechts @ 2007-04-23 11:38 UTC (permalink / raw)
To: linuxppc-embedded
Hi all,
I have a custom board with an ppc8540 cpu. I'm using a vanilla Linux
kernel 2.6.20.3.
The RTC chip is a PCF8563, connected to 8540's i2c controller at
address 0x51. In u-boot the clock works fine ('date' command) so the
hardware is alright.
In Linux however, I get this at boot:
(...)
i2c /dev entries driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
(...)
I have compiled in the PCF8563 rtc driver (not as module), and have
support for RTC class, /dev, /proc and /sys. However, the entries in
/proc and /sys relevant to the RTC remain empty.
I have created a device node /dev/rtc0 with major/minor 254, 0 (254
being what is listed as rtc in /proc/devices).
For some reason, PCF8563 driver does not initialize correctly. I'm
looking for a hint where to look for finding the cause of this...
Some further info:
ARCH=ppc, CROSS_COMPILE=ppc_85xx- (from ELDK 4), boot loader is u-boot 1.2.0.
Thansk for any help.
Regards
Floris
^ permalink raw reply
* [PATCH] [v3] powerpc: save trap number in bad_stack
From: Olof Johansson @ 2007-04-23 12:19 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev, anton
In-Reply-To: <20070422233821.GB28479@lixom.net>
Save the trap number in the case of getting a bad stack in an exception
handler. It is sometimes useful to know what exception it was that caused
this to happen. Without this, no trap is reported.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: powerpc/arch/powerpc/kernel/asm-offsets.c
===================================================================
--- powerpc.orig/arch/powerpc/kernel/asm-offsets.c
+++ powerpc/arch/powerpc/kernel/asm-offsets.c
@@ -139,6 +139,7 @@ int main(void)
DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time));
DEFINE(PACA_SLBSHADOWPTR, offsetof(struct paca_struct, slb_shadow_ptr));
DEFINE(PACA_DATA_OFFSET, offsetof(struct paca_struct, data_offset));
+ DEFINE(PACA_TRAP_SAVE, offsetof(struct paca_struct, trap_save));
DEFINE(SLBSHADOW_STACKVSID,
offsetof(struct slb_shadow, save_area[SLB_NUM_BOLTED - 1].vsid));
Index: powerpc/include/asm-powerpc/paca.h
===================================================================
--- powerpc.orig/include/asm-powerpc/paca.h
+++ powerpc/include/asm-powerpc/paca.h
@@ -68,6 +68,7 @@ struct paca_struct {
void *emergency_sp; /* pointer to emergency stack */
u64 data_offset; /* per cpu data offset */
s16 hw_cpu_id; /* Physical processor number */
+ u16 trap_save; /* Used when bad stack is encountered */
u8 cpu_start; /* At startup, processor spins until */
/* this becomes non-zero. */
struct slb_shadow *slb_shadow_ptr;
Index: powerpc/arch/powerpc/kernel/head_64.S
===================================================================
--- powerpc.orig/arch/powerpc/kernel/head_64.S
+++ powerpc/arch/powerpc/kernel/head_64.S
@@ -278,8 +278,12 @@ exception_marker:
beq- 1f; \
ld r1,PACAKSAVE(r13); /* kernel stack to use */ \
1: cmpdi cr1,r1,0; /* check if r1 is in userspace */ \
- bge- cr1,bad_stack; /* abort if it is */ \
- std r9,_CCR(r1); /* save CR in stackframe */ \
+ bge- cr1,2f; /* abort if it is */ \
+ b 3f; \
+2: li r1,(n); /* will be reloaded later */ \
+ sth r1,PACA_TRAP_SAVE(r13); \
+ b bad_stack; \
+3: std r9,_CCR(r1); /* save CR in stackframe */ \
std r11,_NIP(r1); /* save SRR0 in stackframe */ \
std r12,_MSR(r1); /* save SRR1 in stackframe */ \
std r10,0(r1); /* make stack chain pointer */ \
@@ -940,6 +944,8 @@ bad_stack:
SAVE_2GPRS(7,r1)
SAVE_10GPRS(12,r1)
SAVE_10GPRS(22,r1)
+ lhz r12,PACA_TRAP_SAVE(r13)
+ std r12,_TRAP(r1)
addi r11,r1,INT_FRAME_SIZE
std r11,0(r1)
li r12,0
^ permalink raw reply
* [PATCH/RESEND] ehea: fix for dlpar and sysfs entries
From: Jan-Bernd Themann @ 2007-04-23 11:58 UTC (permalink / raw)
To: Jeff Garzik
Cc: Thomas Klein, Jan-Bernd Themann, netdev, linux-kernel, linux-ppc,
Christoph Raisch, Marcus Eder, Stefan Roscher
This patch includes:
- dlpar fix:
certain resources may only be allocated when first
logical port is available, and must be removed when
last logical port has been removed
- sysfs entries:
create symbolic link from each logical port to ehea driver
Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
---
This patch applies on top of the netdev upstream branch for 2.6.22
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h
index 1405d0b..173994d 100644
--- a/drivers/net/ehea/ehea.h
+++ b/drivers/net/ehea/ehea.h
@@ -39,7 +39,7 @@ #include <asm/abs_addr.h>
#include <asm/io.h>
#define DRV_NAME "ehea"
-#define DRV_VERSION "EHEA_0055"
+#define DRV_VERSION "EHEA_0056"
#define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \
| NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index a36a023..f9f3133 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -78,6 +78,28 @@ MODULE_PARM_DESC(sq_entries, " Number of
__MODULE_STRING(EHEA_DEF_ENTRIES_SQ) ")");
MODULE_PARM_DESC(use_mcs, " 0:NAPI, 1:Multiple receive queues, Default = 1 ");
+static int port_name_cnt = 0;
+
+static int __devinit ehea_probe_adapter(struct ibmebus_dev *dev,
+ const struct of_device_id *id);
+
+static int __devexit ehea_remove(struct ibmebus_dev *dev);
+
+static struct of_device_id ehea_device_table[] = {
+ {
+ .name = "lhea",
+ .compatible = "IBM,lhea",
+ },
+ {},
+};
+
+static struct ibmebus_driver ehea_driver = {
+ .name = "ehea",
+ .id_table = ehea_device_table,
+ .probe = ehea_probe_adapter,
+ .remove = ehea_remove,
+};
+
void ehea_dump(void *adr, int len, char *msg) {
int x;
unsigned char *deb = adr;
@@ -2108,6 +2130,28 @@ static int ehea_clean_all_portres(struct
return ret;
}
+static void ehea_remove_adapter_mr (struct ehea_adapter *adapter)
+{
+ int i;
+
+ for (i=0; i < EHEA_MAX_PORTS; i++)
+ if (adapter->port[i])
+ return;
+
+ ehea_rem_mr(&adapter->mr);
+}
+
+static int ehea_add_adapter_mr (struct ehea_adapter *adapter)
+{
+ int i;
+
+ for (i=0; i < EHEA_MAX_PORTS; i++)
+ if (adapter->port[i])
+ return 0;
+
+ return ehea_reg_kernel_mr(adapter, &adapter->mr);
+}
+
static int ehea_up(struct net_device *dev)
{
int ret, i;
@@ -2361,6 +2405,34 @@ static void __devinit logical_port_relea
of_node_put(port->ofdev.node);
}
+static int ehea_driver_sysfs_add(struct device *dev,
+ struct device_driver *driver)
+{
+ int ret;
+
+ ret = sysfs_create_link(&driver->kobj, &dev->kobj,
+ kobject_name(&dev->kobj));
+ if (ret == 0) {
+ ret = sysfs_create_link(&dev->kobj, &driver->kobj,
+ "driver");
+ if (ret)
+ sysfs_remove_link(&driver->kobj,
+ kobject_name(&dev->kobj));
+ }
+ return ret;
+}
+
+static void ehea_driver_sysfs_remove(struct device *dev,
+ struct device_driver *driver)
+{
+ struct device_driver *drv = driver;
+
+ if (drv) {
+ sysfs_remove_link(&drv->kobj, kobject_name(&dev->kobj));
+ sysfs_remove_link(&dev->kobj, "driver");
+ }
+}
+
static struct device *ehea_register_port(struct ehea_port *port,
struct device_node *dn)
{
@@ -2368,8 +2440,9 @@ static struct device *ehea_register_port
port->ofdev.node = of_node_get(dn);
port->ofdev.dev.parent = &port->adapter->ebus_dev->ofdev.dev;
+ port->ofdev.dev.bus = &ibmebus_bus_type;
- sprintf(port->ofdev.dev.bus_id, "port%d", port->logical_port_id);
+ sprintf(port->ofdev.dev.bus_id, "port%d", port_name_cnt++);
port->ofdev.dev.release = logical_port_release;
ret = of_device_register(&port->ofdev);
@@ -2384,8 +2457,16 @@ static struct device *ehea_register_port
goto out_unreg_of_dev;
}
+ ret = ehea_driver_sysfs_add(&port->ofdev.dev, &ehea_driver.driver);
+ if (ret) {
+ ehea_error("failed to register sysfs driver link");
+ goto out_rem_dev_file;
+ }
+
return &port->ofdev.dev;
+out_rem_dev_file:
+ device_remove_file(&port->ofdev.dev, &dev_attr_log_port_id);
out_unreg_of_dev:
of_device_unregister(&port->ofdev);
out:
@@ -2394,6 +2475,7 @@ out:
static void ehea_unregister_port(struct ehea_port *port)
{
+ ehea_driver_sysfs_remove(&port->ofdev.dev, &ehea_driver.driver);
device_remove_file(&port->ofdev.dev, &dev_attr_log_port_id);
of_device_unregister(&port->ofdev);
}
@@ -2520,7 +2602,6 @@ static int ehea_setup_ports(struct ehea_
struct device_node *eth_dn = NULL;
u32 *dn_log_port_id;
- int port_setup_ok = 0;
int i = 0;
lhea_dn = adapter->ebus_dev->ofdev.node;
@@ -2534,6 +2615,12 @@ static int ehea_setup_ports(struct ehea_
continue;
}
+ if (ehea_add_adapter_mr(adapter)) {
+ ehea_error("creating MR failed");
+ of_node_put(eth_dn);
+ return -EIO;
+ }
+
adapter->port[i] = ehea_setup_single_port(adapter,
*dn_log_port_id,
eth_dn);
@@ -2541,18 +2628,13 @@ static int ehea_setup_ports(struct ehea_
ehea_info("%s -> logical port id #%d",
adapter->port[i]->netdev->name,
*dn_log_port_id);
+ else
+ ehea_remove_adapter_mr(adapter);
+
i++;
};
- /* Check for succesfully set up ports */
- for (i = 0; i < EHEA_MAX_PORTS; i++)
- if (adapter->port[i])
- port_setup_ok++;
-
- if (port_setup_ok)
- return 0; /* At least some ports are setup correctly */
-
- return -EINVAL;
+ return 0;
}
static struct device_node *ehea_get_eth_dn(struct ehea_adapter *adapter,
@@ -2604,6 +2686,11 @@ static ssize_t ehea_probe_port(struct de
return -EINVAL;
}
+ if (ehea_add_adapter_mr(adapter)) {
+ ehea_error("creating MR failed");
+ return -EIO;
+ }
+
port = ehea_setup_single_port(adapter, logical_port_id, eth_dn);
of_node_put(eth_dn);
@@ -2617,8 +2704,10 @@ static ssize_t ehea_probe_port(struct de
ehea_info("added %s (logical port id=%d)", port->netdev->name,
logical_port_id);
- } else
+ } else {
+ ehea_remove_adapter_mr(adapter);
return -EIO;
+ }
return (ssize_t) count;
}
@@ -2653,6 +2742,8 @@ static ssize_t ehea_remove_port(struct d
return -EINVAL;
}
+ ehea_remove_adapter_mr(adapter);
+
return (ssize_t) count;
}
@@ -2713,18 +2804,13 @@ static int __devinit ehea_probe_adapter(
dev->ofdev.dev.driver_data = adapter;
- ret = ehea_reg_kernel_mr(adapter, &adapter->mr);
- if (ret) {
- dev_err(&dev->ofdev.dev, "reg_mr_adapter failed\n");
- goto out_free_ad;
- }
/* initialize adapter and ports */
/* get adapter properties */
ret = ehea_sense_adapter_attr(adapter);
if (ret) {
dev_err(&dev->ofdev.dev, "sense_adapter_attr failed: %d", ret);
- goto out_free_res;
+ goto out_free_ad;
}
adapter->neq = ehea_create_eq(adapter,
@@ -2732,7 +2818,7 @@ static int __devinit ehea_probe_adapter(
if (!adapter->neq) {
ret = -EIO;
dev_err(&dev->ofdev.dev, "NEQ creation failed");
- goto out_free_res;
+ goto out_free_ad;
}
tasklet_init(&adapter->neq_tasklet, ehea_neq_tasklet,
@@ -2777,9 +2863,6 @@ out_free_irq:
out_kill_eq:
ehea_destroy_eq(adapter->neq);
-out_free_res:
- ehea_rem_mr(&adapter->mr);
-
out_free_ad:
kfree(adapter);
out:
@@ -2805,7 +2888,7 @@ static int __devexit ehea_remove(struct
tasklet_kill(&adapter->neq_tasklet);
ehea_destroy_eq(adapter->neq);
- ehea_rem_mr(&adapter->mr);
+ ehea_remove_adapter_mr(adapter);
kfree(adapter);
return 0;
}
@@ -2838,21 +2921,6 @@ static int check_module_parm(void)
return ret;
}
-static struct of_device_id ehea_device_table[] = {
- {
- .name = "lhea",
- .compatible = "IBM,lhea",
- },
- {},
-};
-
-static struct ibmebus_driver ehea_driver = {
- .name = "ehea",
- .id_table = ehea_device_table,
- .probe = ehea_probe_adapter,
- .remove = ehea_remove,
-};
-
int __init ehea_module_init(void)
{
int ret;
^ permalink raw reply related
* Re: [PATCH] DMA 4GB boundary protection
From: Paul Mackerras @ 2007-04-23 12:22 UTC (permalink / raw)
To: Jake Moilanen; +Cc: Olof Johansson, linuxppc-dev
In-Reply-To: <1175175842.1398.54.camel@goblue>
Jake,
It looks like I have applied both the final version of this patch
(569975591c5530fdc9c7a3c45122e5e46f075a74) and the original version
(618d3adc351a24c4c48437c767befb88ca2d199d) that modified
iommu_range_alloc().
Should I revert the original version?
Paul.
^ permalink raw reply
* Re: [PATCH] [v2] powerpc: save trap number in bad_stack
From: Stephen Rothwell @ 2007-04-23 13:22 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev, paulus, anton
In-Reply-To: <20070422233821.GB28479@lixom.net>
[-- Attachment #1: Type: text/plain, Size: 895 bytes --]
On Sun, 22 Apr 2007 18:38:21 -0500 olof@lixom.net (Olof Johansson) wrote:
>
> --- powerpc.orig/include/asm-powerpc/paca.h
> +++ powerpc/include/asm-powerpc/paca.h
> @@ -68,6 +68,7 @@ struct paca_struct {
> void *emergency_sp; /* pointer to emergency stack */
> u64 data_offset; /* per cpu data offset */
> s16 hw_cpu_id; /* Physical processor number */
> + u16 trap_save; /* Used when bad stack is encountered */
Please read the comment at the top of the struct:
/*
* Because hw_cpu_id, unlike other paca fields, is accessed
* routinely from other CPUs (from the IRQ code), we stick to
* read-only (after boot) fields in the first cacheline to
* avoid cacheline bouncing.
*/
So please move this out of the first cache line.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH] [v2] powerpc: save trap number in bad_stack
From: Michael Ellerman @ 2007-04-23 13:33 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Olof Johansson, linuxppc-dev, paulus, anton
In-Reply-To: <20070423232217.08e420a6.sfr@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]
On Mon, 2007-04-23 at 23:22 +1000, Stephen Rothwell wrote:
> On Sun, 22 Apr 2007 18:38:21 -0500 olof@lixom.net (Olof Johansson) wrote:
> >
> > --- powerpc.orig/include/asm-powerpc/paca.h
> > +++ powerpc/include/asm-powerpc/paca.h
> > @@ -68,6 +68,7 @@ struct paca_struct {
> > void *emergency_sp; /* pointer to emergency stack */
> > u64 data_offset; /* per cpu data offset */
> > s16 hw_cpu_id; /* Physical processor number */
> > + u16 trap_save; /* Used when bad stack is encountered */
>
> Please read the comment at the top of the struct:
>
> /*
> * Because hw_cpu_id, unlike other paca fields, is accessed
> * routinely from other CPUs (from the IRQ code), we stick to
> * read-only (after boot) fields in the first cacheline to
> * avoid cacheline bouncing.
> */
>
> So please move this out of the first cache line.
The only time it's written to is when we detect a bad stack pointer,
after which we promptly panic, so it's essentially read-only (in fact
unused) during normal operation. Plus there's a massive gap there in
paca_struct before the start of the second cacheline.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
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
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH] [v2] powerpc: save trap number in bad_stack
From: Olof Johansson @ 2007-04-23 13:54 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev, paulus, anton
In-Reply-To: <20070423232217.08e420a6.sfr@canb.auug.org.au>
On Mon, Apr 23, 2007 at 11:22:17PM +1000, Stephen Rothwell wrote:
> On Sun, 22 Apr 2007 18:38:21 -0500 olof@lixom.net (Olof Johansson) wrote:
> >
> > --- powerpc.orig/include/asm-powerpc/paca.h
> > +++ powerpc/include/asm-powerpc/paca.h
> > @@ -68,6 +68,7 @@ struct paca_struct {
> > void *emergency_sp; /* pointer to emergency stack */
> > u64 data_offset; /* per cpu data offset */
> > s16 hw_cpu_id; /* Physical processor number */
> > + u16 trap_save; /* Used when bad stack is encountered */
>
> Please read the comment at the top of the struct:
>
> /*
> * Because hw_cpu_id, unlike other paca fields, is accessed
> * routinely from other CPUs (from the IRQ code), we stick to
> * read-only (after boot) fields in the first cacheline to
> * avoid cacheline bouncing.
> */
>
> So please move this out of the first cache line.
Never thought I'd say this: Too many comments! I missed that one. :)
The variable should be written very rarely, so there should be no
performance impact for a normal system. Still, it's a valid point and
for consistency it should be moved.
There's room right before the u8 variables further down, I'll move
it there.
-Olof
^ permalink raw reply
* Re: [PATCH] [v2] powerpc: save trap number in bad_stack
From: David Gibson @ 2007-04-23 13:39 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Olof Johansson, linuxppc-dev, paulus, anton
In-Reply-To: <20070423232217.08e420a6.sfr@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]
On Mon, Apr 23, 2007 at 11:22:17PM +1000, Stephen Rothwell wrote:
> On Sun, 22 Apr 2007 18:38:21 -0500 olof@lixom.net (Olof Johansson) wrote:
> >
> > --- powerpc.orig/include/asm-powerpc/paca.h
> > +++ powerpc/include/asm-powerpc/paca.h
> > @@ -68,6 +68,7 @@ struct paca_struct {
> > void *emergency_sp; /* pointer to emergency stack */
> > u64 data_offset; /* per cpu data offset */
> > s16 hw_cpu_id; /* Physical processor number */
> > + u16 trap_save; /* Used when bad stack is encountered */
>
> Please read the comment at the top of the struct:
>
> /*
> * Because hw_cpu_id, unlike other paca fields, is accessed
> * routinely from other CPUs (from the IRQ code), we stick to
> * read-only (after boot) fields in the first cacheline to
> * avoid cacheline bouncing.
> */
>
> So please move this out of the first cache line.
Afaict, Olof's patch only writes to that field when we're about to
enter the bad_stack path. In that case we're sufficiently screwed
that I don't think some extra cacheline bouncing matters.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH/RESEND] ehea: fix for dlpar and sysfs entries
From: Arnd Bergmann @ 2007-04-23 13:54 UTC (permalink / raw)
To: linuxppc-dev
Cc: Thomas Klein, Jeff Garzik, Jan-Bernd Themann, netdev,
linux-kernel, Christoph Raisch, Marcus Eder, Stefan Roscher
In-Reply-To: <200704231358.53479.ossthema@de.ibm.com>
On Monday 23 April 2007, Jan-Bernd Themann wrote:
> - dlpar fix:=20
> =A0=A0=A0=A0=A0=A0=A0=A0certain resources may only be allocated when first
> =A0=A0=A0=A0=A0=A0=A0=A0logical port is available, and must be removed wh=
en
> =A0=A0=A0=A0=A0=A0=A0=A0last logical port has been removed
>=20
> - sysfs entries:
> =A0=A0=A0=A0=A0=A0=A0=A0create symbolic link from each logical port to eh=
ea driver
>=20
I can't see anything wrong with the patch contents, but if you know that th=
ere
are two changes, you really should make it two separate patches.
Arnd <><
^ permalink raw reply
* Re: Tri-mode auto-negotiation on ML405
From: Peter Mendham @ 2007-04-23 12:48 UTC (permalink / raw)
To: Andrei Konovalov; +Cc: linuxppc-embedded
In-Reply-To: <462B6EB2.70109@ru.mvista.com>
Andrei Konovalov wrote:
> Has the ethernet device been registered on the platform bus?
> There should be a call to platform_device_register()
> in arch/ppc/syslib/virtex_devices.c or arch/ppc/platforms/4xx/virtex.c
> depending
> on the kernel tree used and the patches appiled.
Hi Andrei,
Drat. I forgot to put that back in when I went to Grant Likely's latest
patchset. The errors I am getting now are (when I try and bring the
network up):
eth0: XTemac Options:
0xbcf0
eth0: XTemac could not start
device.
SIOCSIFFLAGeth0: XTemac Options:
0xbcf0
eth0: XTemac could not start
device.
S: Device or resource
busy
SIOCSIFFLAGS: Device or resource
busy
route: SIOC[ADD|DEL]RT: Network is unreachable
During boot it said:
eth%d: XTemac using fifo direct interrupt driven
mode.
mdiobus_reset on
eth%d
temac_mii:
probed
eth%d: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:00,
irq=-1)
eth0: Xilinx TEMAC #0 at 0x80000000 mapped to 0xC5020000,
irq=0
eth0: XTemac id 1.0f, block id 5, type 8
It seems like it's finding the MAC and PHY OK, what else have I done wrong?
Thanks,
-- Peter
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.
^ permalink raw reply
* Re: [RFC][PATCH]Kprobes for PPC32(BOOKE)
From: rsmadhvesh @ 2007-04-23 14:36 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, madhvesh.s
In-Reply-To: <382B116B-1892-441F-9F4D-9E0F3F01FC92@kernel.crashing.org>
Hi Kumar,
Kumar Gala <galak@kernel.crashing.org> wrote on Saturday, April 21, 2007 1:04 am
>
> On Apr 20, 2007, at 2:24 AM, rsmadhvesh@vsnl.net wrote:
>
> > Hi Kumar,
> >
> > This is regarding the kprobes patches for
> > PPC32 BOOKE version. The attached patches
> > contain the implementation for this version.
> >
> > I saw your earlier postings and commits to 2.6.21
> > regarding kprobes for PPC32. Since the single
> > step mechanism in BookE is quite different, I
> > thought i can share some of the issues faced
> > in this implementation and get your review
> > feedback for those patches.
>
> I'd love to review these patches. Is there any possibility that I
> could get you to build them for arch/powerpc on top of David
> Gibson's
> port of ebony to arch/powerpc.
>
> http://ozlabs.org/pipermail/linuxppc-dev/2007-April/034483.html
>
> I dont see much value in adding kprobes into arch/ppc and have been
>
> trying to push any 'new' functionality get added to arch/powerpc
> and
> only bug fixes to arch/ppc.
Thanks for taking interest in reviewing my patches.
I understand the recent discussions in merging ppc to
powerpc and now i can as well start merging my patches
to powerpc. I will repost my patches after this, but if you find
any bugs in my code, please let me know.
-Madhvesh
^ permalink raw reply
* [PATCH] [v4] powerpc: save trap number in bad_stack
From: Olof Johansson @ 2007-04-23 15:11 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev, anton, sfr
In-Reply-To: <20070423121931.GA683@lixom.net>
Save the trap number in the case of getting a bad stack in an exception
handler. It is sometimes useful to know what exception it was that caused
this to happen. Without this, no trap is reported.
Signed-off-by: Olof Johansson <olof@lixom.net>
---
Moved to a hole in a later cacheline instead of in the read-only line.
Index: linux-2.6/arch/powerpc/kernel/asm-offsets.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/asm-offsets.c
+++ linux-2.6/arch/powerpc/kernel/asm-offsets.c
@@ -140,6 +140,7 @@ int main(void)
DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time));
DEFINE(PACA_SLBSHADOWPTR, offsetof(struct paca_struct, slb_shadow_ptr));
DEFINE(PACA_DATA_OFFSET, offsetof(struct paca_struct, data_offset));
+ DEFINE(PACA_TRAP_SAVE, offsetof(struct paca_struct, trap_save));
DEFINE(SLBSHADOW_STACKVSID,
offsetof(struct slb_shadow, save_area[SLB_NUM_BOLTED - 1].vsid));
Index: linux-2.6/include/asm-powerpc/paca.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/paca.h
+++ linux-2.6/include/asm-powerpc/paca.h
@@ -93,6 +93,7 @@ struct paca_struct {
u64 stab_rr; /* stab/slb round-robin counter */
u64 saved_r1; /* r1 save for RTAS calls */
u64 saved_msr; /* MSR saved here by enter_rtas */
+ u16 trap_save; /* Used when bad stack is encountered */
u8 soft_enabled; /* irq soft-enable flag */
u8 hard_enabled; /* set if irqs are enabled in MSR */
u8 io_sync; /* writel() needs spin_unlock sync */
Index: linux-2.6/arch/powerpc/kernel/head_64.S
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/head_64.S
+++ linux-2.6/arch/powerpc/kernel/head_64.S
@@ -278,8 +278,12 @@ exception_marker:
beq- 1f; \
ld r1,PACAKSAVE(r13); /* kernel stack to use */ \
1: cmpdi cr1,r1,0; /* check if r1 is in userspace */ \
- bge- cr1,bad_stack; /* abort if it is */ \
- std r9,_CCR(r1); /* save CR in stackframe */ \
+ bge- cr1,2f; /* abort if it is */ \
+ b 3f; \
+2: li r1,(n); /* will be reloaded later */ \
+ sth r1,PACA_TRAP_SAVE(r13); \
+ b bad_stack; \
+3: std r9,_CCR(r1); /* save CR in stackframe */ \
std r11,_NIP(r1); /* save SRR0 in stackframe */ \
std r12,_MSR(r1); /* save SRR1 in stackframe */ \
std r10,0(r1); /* make stack chain pointer */ \
@@ -940,6 +944,8 @@ bad_stack:
SAVE_2GPRS(7,r1)
SAVE_10GPRS(12,r1)
SAVE_10GPRS(22,r1)
+ lhz r12,PACA_TRAP_SAVE(r13)
+ std r12,_TRAP(r1)
addi r11,r1,INT_FRAME_SIZE
std r11,0(r1)
li r12,0
^ permalink raw reply
* Re: zImage.elf loads but does not start
From: Mirek23 @ 2007-04-23 15:12 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <10079346.post@talk.nabble.com>
I have revised the xparameters_ml403.h and the setup of the FPGA part. I have
found that the interrupt for the RS232 was not configured. Right now I was
able to come to the point when the kernel was uncompressed but it did not
start:
loaded at: 00400000 004F9138
board data at: 004F7120 004F7138
relocated to: 00404064 0040407C
zimage at: 00404DF1 004F6BBB
avail ram: 004FA000 04000000
Linux/PPC load: console=ttl0,9600 ip=129.129.129.29 root=/dev/ram rw
Uncompressing Linux...done.
Now booting the kernel
Does anybody has an idea what could be wrong?
Best Regards
Mirek
--
View this message in context: http://www.nabble.com/zImage.elf-loads-but-not-starts-tf3607582.html#a10142161
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply
* Re: [PATCH] [v4] powerpc: save trap number in bad_stack
From: Stephen Rothwell @ 2007-04-23 15:34 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev, paulus, anton
In-Reply-To: <20070423151155.GA2530@lixom.net>
[-- Attachment #1: Type: text/plain, Size: 460 bytes --]
On Mon, 23 Apr 2007 10:11:55 -0500 olof@lixom.net (Olof Johansson) wrote:
>
> Save the trap number in the case of getting a bad stack in an exception
> handler. It is sometimes useful to know what exception it was that caused
> this to happen. Without this, no trap is reported.
>
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
I'm happy this time :-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* RE: zImage.elf loads but does not start
From: Leonid @ 2007-04-23 16:11 UTC (permalink / raw)
To: Mirek23, linuxppc-embedded
In-Reply-To: <10142161.post@talk.nabble.com>
On Monday, April 23, 2007 8:12 AM Mirek wrote:
> ... Right now I was
> able to come to the point when the kernel was uncompressed but it did
not
> start:
You cannot tell that. Most likely you still have problem with serial
(though one cannot be sure). Please try this: go to
drivers/serial/8250.c, find the line=20
#ifdef SERIAL_PORT_DFNS
and add=20
#undef SERIAL_PORT_DFNS
right before it. See what happens.
Leonid.
^ permalink raw reply
* Re: zImage.elf loads but does not start
From: Andrei Konovalov @ 2007-04-23 16:24 UTC (permalink / raw)
To: Mirek23; +Cc: linuxppc-embedded
In-Reply-To: <10142161.post@talk.nabble.com>
Hi Mirek,
Mirek23 wrote:
> I have revised the xparameters_ml403.h and the setup of the FPGA part. I have
> found that the interrupt for the RS232 was not configured. Right now I was
> able to come to the point when the kernel was uncompressed but it did not
> start:
>
>
> loaded at: 00400000 004F9138
>
> board data at: 004F7120 004F7138
>
> relocated to: 00404064 0040407C
>
> zimage at: 00404DF1 004F6BBB
>
> avail ram: 004FA000 04000000
>
>
>
> Linux/PPC load: console=ttl0,9600 ip=129.129.129.29 root=/dev/ram rw
If you use the UART Lite driver by Peter Korsgaard it sould be
"console=ttyUL0", not "console=ttl0".
Thanks,
Andrei
> Uncompressing Linux...done.
>
> Now booting the kernel
>
>
>
>
> Does anybody has an idea what could be wrong?
>
> Best Regards
>
> Mirek
^ permalink raw reply
* [PATCH] ib_core: Add missing device link to class device
From: Joachim Fenkes @ 2007-04-23 16:20 UTC (permalink / raw)
To: LinuxPPC-Dev, LKML, OF-General, Roland Dreier
Add the missing device link from /sys/class/infiniband/* to the actual devi=
ce.
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
=2D--
sysfs.c | 1 +
1 file changed, 1 insertion(+)
=2D-- linux-2.6.20/drivers/infiniband/core/sysfs.c.old 2007-04-23 15:37:=
37.000000000 +0200
+++ linux-2.6.20/drivers/infiniband/core/sysfs.c 2007-04-23 15:38:22=
=2E000000000 +0200
@@ -683,6 +683,7 @@ int ib_device_register_sysfs(struct ib_d
class_dev->class =3D &ib_class;
class_dev->class_data =3D device;
+ class_dev->dev =3D device->dma_device;
strlcpy(class_dev->class_id, device->name, BUS_ID_SIZE);
INIT_LIST_HEAD(&device->port_list);
=2D-=20
Joachim Fenkes =A0-- =A0eHCA Linux Driver Developer and Hardware Tamer
IBM Deutschland Entwicklung GmbH =A0-- =A0Dept. 3627 (I/O Firmware Dev. 2)
Schoenaicher Strasse 220 =A0-- =A071032 Boeblingen =A0-- =A0Germany
eMail: fenkes@de.ibm.com =A0-- =A0Phone: +49 7031 16 1239
^ permalink raw reply
* [PATCH] eHCA: Add "Modify Port" verb
From: Joachim Fenkes @ 2007-04-23 16:23 UTC (permalink / raw)
To: LinuxPPC-Dev, LKML, OF-General, Roland Dreier
Add "Modify Port" verb support to eHCA driver.
ib_cm needs this to initialize properly.
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
---
ehca_hca.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
hcp_if.c | 24 ++++++++++++++++++++++++
hcp_if.h | 4 ++++
3 files changed, 74 insertions(+), 2 deletions(-)
diff -urp a/drivers/infiniband/hw/ehca/ehca_hca.c b/drivers/infiniband/hw/ehca/ehca_hca.c
--- a/drivers/infiniband/hw/ehca/ehca_hca.c 2007-02-04 19:44:54.000000000 +0100
+++ b/drivers/infiniband/hw/ehca/ehca_hca.c 2007-04-23 18:09:38.000000000 +0200
@@ -147,6 +147,7 @@ int ehca_query_port(struct ib_device *ib
break;
}
+ props->port_cap_flags = rblock->capability_mask;
props->gid_tbl_len = rblock->gid_tbl_len;
props->max_msg_sz = rblock->max_msg_sz;
props->bad_pkey_cntr = rblock->bad_pkey_cntr;
@@ -233,10 +234,53 @@ query_gid1:
return ret;
}
+const u32 allowed_port_caps = (
+ IB_PORT_SM | IB_PORT_LED_INFO_SUP | IB_PORT_CM_SUP |
+ IB_PORT_SNMP_TUNNEL_SUP | IB_PORT_DEVICE_MGMT_SUP |
+ IB_PORT_VENDOR_CLASS_SUP);
+
int ehca_modify_port(struct ib_device *ibdev,
u8 port, int port_modify_mask,
struct ib_port_modify *props)
{
- /* Not implemented yet */
- return -EFAULT;
+ int ret = 0;
+ struct ehca_shca *shca = container_of(ibdev, struct ehca_shca, ib_device);
+ struct hipz_query_port *rblock;
+ u32 cap;
+ u64 hret;
+
+ if ((props->set_port_cap_mask | props->clr_port_cap_mask)
+ & ~allowed_port_caps) {
+ ehca_err(&shca->ib_device, "Non-changeable bits set in masks "
+ "set=%x clr=%x allowed=%x", props->set_port_cap_mask,
+ props->clr_port_cap_mask, allowed_port_caps);
+ return -EINVAL;
+ }
+
+ rblock = ehca_alloc_fw_ctrlblock(GFP_KERNEL);
+ if (!rblock) {
+ ehca_err(&shca->ib_device, "Can't allocate rblock memory.");
+ return -ENOMEM;
+ }
+
+ if (hipz_h_query_port(shca->ipz_hca_handle, port, rblock) != H_SUCCESS) {
+ ehca_err(&shca->ib_device, "Can't query port properties");
+ ret = -EINVAL;
+ goto modify_port1;
+ }
+
+ cap = (rblock->capability_mask | props->set_port_cap_mask)
+ & ~props->clr_port_cap_mask;
+
+ hret = hipz_h_modify_port(shca->ipz_hca_handle, port,
+ cap, props->init_type, port_modify_mask);
+ if (hret != H_SUCCESS) {
+ ehca_err(&shca->ib_device, "Modify port failed hret=%lx", hret);
+ ret = -EINVAL;
+ }
+
+modify_port1:
+ ehca_free_fw_ctrlblock(rblock);
+
+ return ret;
}
diff -urp a/drivers/infiniband/hw/ehca/hcp_if.c b/drivers/infiniband/hw/ehca/hcp_if.c
--- a/drivers/infiniband/hw/ehca/hcp_if.c 2007-02-04 19:44:54.000000000 +0100
+++ b/drivers/infiniband/hw/ehca/hcp_if.c 2007-04-23 18:06:09.000000000 +0200
@@ -70,6 +70,10 @@
#define H_ALL_RES_QP_SQUEUE_SIZE_PAGES EHCA_BMASK_IBM(0, 31)
#define H_ALL_RES_QP_RQUEUE_SIZE_PAGES EHCA_BMASK_IBM(32, 63)
+#define H_MP_INIT_TYPE EHCA_BMASK_IBM(44, 47)
+#define H_MP_SHUTDOWN EHCA_BMASK_IBM(48, 48)
+#define H_MP_RESET_QKEY_CTR EHCA_BMASK_IBM(49, 49)
+
/* direct access qp controls */
#define DAQP_CTRL_ENABLE 0x01
#define DAQP_CTRL_SEND_COMP 0x20
@@ -364,6 +368,26 @@ u64 hipz_h_query_port(const struct ipz_a
return ret;
}
+u64 hipz_h_modify_port(const struct ipz_adapter_handle adapter_handle,
+ const u8 port_id, const u32 port_cap,
+ const u8 init_type, const int modify_mask)
+{
+ u64 port_attributes = port_cap;
+
+ if (modify_mask & IB_PORT_SHUTDOWN)
+ port_attributes |= EHCA_BMASK_SET(H_MP_SHUTDOWN, 1);
+ if (modify_mask & IB_PORT_INIT_TYPE)
+ port_attributes |= EHCA_BMASK_SET(H_MP_INIT_TYPE, init_type);
+ if (modify_mask & IB_PORT_RESET_QKEY_CNTR)
+ port_attributes |= EHCA_BMASK_SET(H_MP_RESET_QKEY_CTR, 1);
+
+ return ehca_plpar_hcall_norets(H_MODIFY_PORT,
+ adapter_handle.handle, /* r4 */
+ port_id, /* r5 */
+ port_attributes, /* r6 */
+ 0, 0, 0, 0);
+}
+
u64 hipz_h_query_hca(const struct ipz_adapter_handle adapter_handle,
struct hipz_query_hca *query_hca_rblock)
{
diff -urp a/drivers/infiniband/hw/ehca/hcp_if.h b/drivers/infiniband/hw/ehca/hcp_if.h
--- a/drivers/infiniband/hw/ehca/hcp_if.h 2007-02-04 19:44:54.000000000 +0100
+++ b/drivers/infiniband/hw/ehca/hcp_if.h 2007-04-23 18:06:09.000000000 +0200
@@ -85,6 +85,10 @@ u64 hipz_h_query_port(const struct ipz_a
const u8 port_id,
struct hipz_query_port *query_port_response_block);
+u64 hipz_h_modify_port(const struct ipz_adapter_handle adapter_handle,
+ const u8 port_id, const u32 port_cap,
+ const u8 init_type, const int modify_mask);
+
u64 hipz_h_query_hca(const struct ipz_adapter_handle adapter_handle,
struct hipz_query_hca *query_hca_rblock);
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox