* [PATCH 1/4] spufs: fix for CONFIG_NUMA
From: Arnd Bergmann @ 2006-04-29 1:18 UTC (permalink / raw)
To: Andrew Morton
Cc: Arnd Bergmann, linuxppc-dev, Paul Mackerras, cbe-oss-dev,
linux-kernel
In-Reply-To: <20060429011827.502138000@localhost.localdomain>
From: Joel H Schopp <jschopp@us.ibm.com>
Based on an older patch from Mike Kravetz <kravetz@us.ibm.com>
We need to have a mem_map for high addresses in order to make
fops->no_page work on spufs mem and register files. So far, we
have used the memory_present() function during early bootup,
but that did not work when CONFIG_NUMA was enabled.
We now use the __add_pages() function to add the mem_map
when loading the spufs module, which is a lot nicer.
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
---
Index: linus-2.6/arch/powerpc/platforms/cell/setup.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/setup.c 2006-04-29 02:51:29.000000000 +0200
+++ linus-2.6/arch/powerpc/platforms/cell/setup.c 2006-04-29 02:51:33.000000000 +0200
@@ -29,6 +29,8 @@
#include <linux/seq_file.h>
#include <linux/root_dev.h>
#include <linux/console.h>
+#include <linux/mutex.h>
+#include <linux/memory_hotplug.h>
#include <asm/mmu.h>
#include <asm/processor.h>
@@ -46,6 +48,7 @@
#include <asm/cputable.h>
#include <asm/ppc-pci.h>
#include <asm/irq.h>
+#include <asm/spu.h>
#include "interrupt.h"
#include "iommu.h"
@@ -69,77 +72,6 @@
of_node_put(root);
}
-#ifdef CONFIG_SPARSEMEM
-static int __init find_spu_node_id(struct device_node *spe)
-{
- unsigned int *id;
-#ifdef CONFIG_NUMA
- struct device_node *cpu;
- cpu = spe->parent->parent;
- id = (unsigned int *)get_property(cpu, "node-id", NULL);
-#else
- id = NULL;
-#endif
- return id ? *id : 0;
-}
-
-static void __init cell_spuprop_present(struct device_node *spe,
- const char *prop, int early)
-{
- struct address_prop {
- unsigned long address;
- unsigned int len;
- } __attribute__((packed)) *p;
- int proplen;
-
- unsigned long start_pfn, end_pfn, pfn;
- int node_id;
-
- p = (void*)get_property(spe, prop, &proplen);
- WARN_ON(proplen != sizeof (*p));
-
- node_id = find_spu_node_id(spe);
-
- start_pfn = p->address >> PAGE_SHIFT;
- end_pfn = (p->address + p->len + PAGE_SIZE - 1) >> PAGE_SHIFT;
-
- /* We need to call memory_present *before* the call to sparse_init,
- but we can initialize the page structs only *after* that call.
- Thus, we're being called twice. */
- if (early)
- memory_present(node_id, start_pfn, end_pfn);
- else {
- /* As the pages backing SPU LS and I/O are outside the range
- of regular memory, their page structs were not initialized
- by free_area_init. Do it here instead. */
- for (pfn = start_pfn; pfn < end_pfn; pfn++) {
- struct page *page = pfn_to_page(pfn);
- set_page_links(page, ZONE_DMA, node_id, pfn);
- init_page_count(page);
- reset_page_mapcount(page);
- SetPageReserved(page);
- INIT_LIST_HEAD(&page->lru);
- }
- }
-}
-
-static void __init cell_spumem_init(int early)
-{
- struct device_node *node;
- for (node = of_find_node_by_type(NULL, "spe");
- node; node = of_find_node_by_type(node, "spe")) {
- cell_spuprop_present(node, "local-store", early);
- cell_spuprop_present(node, "problem", early);
- cell_spuprop_present(node, "priv1", early);
- cell_spuprop_present(node, "priv2", early);
- }
-}
-#else
-static void __init cell_spumem_init(int early)
-{
-}
-#endif
-
static void cell_progress(char *s, unsigned short hex)
{
printk("*** %04x : %s\n", hex, s ? s : "");
@@ -172,8 +104,6 @@
#endif
mmio_nvram_init();
-
- cell_spumem_init(0);
}
/*
@@ -189,8 +119,6 @@
ppc64_interrupt_controller = IC_CELL_PIC;
- cell_spumem_init(1);
-
DBG(" <- cell_init_early()\n");
}
Index: linus-2.6/arch/powerpc/platforms/cell/Kconfig
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/Kconfig 2006-04-29 02:51:29.000000000 +0200
+++ linus-2.6/arch/powerpc/platforms/cell/Kconfig 2006-04-29 02:51:33.000000000 +0200
@@ -12,7 +12,8 @@
config SPUFS_MMAP
bool
- depends on SPU_FS && SPARSEMEM && !PPC_64K_PAGES
+ depends on SPU_FS && SPARSEMEM
+ select MEMORY_HOTPLUG
default y
endmenu
Index: linus-2.6/arch/powerpc/platforms/cell/spu_base.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/spu_base.c 2006-04-29 02:51:29.000000000 +0200
+++ linus-2.6/arch/powerpc/platforms/cell/spu_base.c 2006-04-29 02:51:33.000000000 +0200
@@ -516,6 +516,56 @@
}
EXPORT_SYMBOL_GPL(spu_irq_setaffinity);
+static int __init find_spu_node_id(struct device_node *spe)
+{
+ unsigned int *id;
+ struct device_node *cpu;
+ cpu = spe->parent->parent;
+ id = (unsigned int *)get_property(cpu, "node-id", NULL);
+ return id ? *id : 0;
+}
+
+static int __init cell_spuprop_present(struct device_node *spe,
+ const char *prop)
+{
+ static DEFINE_MUTEX(add_spumem_mutex);
+
+ struct address_prop {
+ unsigned long address;
+ unsigned int len;
+ } __attribute__((packed)) *p;
+ int proplen;
+
+ unsigned long start_pfn, nr_pages;
+ int node_id;
+ struct pglist_data *pgdata;
+ struct zone *zone;
+ int ret;
+
+ p = (void*)get_property(spe, prop, &proplen);
+ WARN_ON(proplen != sizeof (*p));
+
+ start_pfn = p->address >> PAGE_SHIFT;
+ nr_pages = ((unsigned long)p->len + PAGE_SIZE - 1) >> PAGE_SHIFT;
+
+ /*
+ * XXX need to get the correct NUMA node in here. This may
+ * be different from the spe::node_id property, e.g. when
+ * the host firmware is not NUMA aware.
+ */
+ node_id = 0;
+
+ pgdata = NODE_DATA(node_id);
+ zone = pgdata->node_zones;
+
+ /* XXX rethink locking here */
+ mutex_lock(&add_spumem_mutex);
+ ret = __add_pages(zone, start_pfn, nr_pages);
+ mutex_unlock(&add_spumem_mutex);
+
+ return ret;
+}
+
static void __iomem * __init map_spe_prop(struct device_node *n,
const char *name)
{
@@ -526,6 +576,8 @@
void *p;
int proplen;
+ void* ret = NULL;
+ int err = 0;
p = get_property(n, name, &proplen);
if (proplen != sizeof (struct address_prop))
@@ -533,7 +585,14 @@
prop = p;
- return ioremap(prop->address, prop->len);
+ err = cell_spuprop_present(n, name);
+ if (err && (err != -EEXIST))
+ goto out;
+
+ ret = ioremap(prop->address, prop->len);
+
+ out:
+ return ret;
}
static void spu_unmap(struct spu *spu)
@@ -593,17 +652,6 @@
return ret;
}
-static int __init find_spu_node_id(struct device_node *spe)
-{
- unsigned int *id;
- struct device_node *cpu;
-
- cpu = spe->parent->parent;
- id = (unsigned int *)get_property(cpu, "node-id", NULL);
-
- return id ? *id : 0;
-}
-
static int __init create_spu(struct device_node *spe)
{
struct spu *spu;
Index: linus-2.6/mm/memory_hotplug.c
===================================================================
--- linus-2.6.orig/mm/memory_hotplug.c 2006-04-29 02:51:29.000000000 +0200
+++ linus-2.6/mm/memory_hotplug.c 2006-04-29 02:51:33.000000000 +0200
@@ -69,12 +69,16 @@
for (i = 0; i < nr_pages; i += PAGES_PER_SECTION) {
err = __add_section(zone, phys_start_pfn + i);
- if (err)
+ /* We want to keep adding the rest of the
+ * sections if the first ones already exist
+ */
+ if (err && (err != -EEXIST))
break;
}
return err;
}
+EXPORT_SYMBOL_GPL(__add_pages);
static void grow_zone_span(struct zone *zone,
unsigned long start_pfn, unsigned long end_pfn)
--
^ permalink raw reply
* [PATCH 2/4] sparsemem interaction with memory add bug fixes
From: Arnd Bergmann @ 2006-04-29 1:18 UTC (permalink / raw)
To: Andrew Morton
Cc: Arnd Bergmann, linux-kernel, linuxppc-dev, Paul Mackerras,
cbe-oss-dev
In-Reply-To: <20060429011827.502138000@localhost.localdomain>
From: Mike Kravetz <mjkravetz@verizon.net>
This patch fixes two bugs with the way sparsemem interacts with memory add.
They are:
- memory leak if memmap for section already exists
- calling alloc_bootmem_node() after boot
These bugs were discovered and a first cut at the fixes were provided by
Arnd Bergmann <arnd@arndb.de> and Joel Schopp <jschopp@us.ibm.com>.
Signed-off-by: Mike Kravetz <kravetz@us.ibm.com>
Signed-off-by: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
---
mm/sparse.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff -puN mm/sparse.c~sparsemem-interaction-with-memory-add-bug-fixes mm/sparse.c
--- 25/mm/sparse.c~sparsemem-interaction-with-memory-add-bug-fixes Wed Apr 12 14:38:04 2006
+++ 25-akpm/mm/sparse.c Wed Apr 12 14:38:04 2006
@@ -32,7 +32,10 @@ static struct mem_section *sparse_index_
unsigned long array_size = SECTIONS_PER_ROOT *
sizeof(struct mem_section);
- section = alloc_bootmem_node(NODE_DATA(nid), array_size);
+ if (system_state == SYSTEM_RUNNING)
+ section = kmalloc_node(array_size, GFP_KERNEL, nid);
+ else
+ section = alloc_bootmem_node(NODE_DATA(nid), array_size);
if (section)
memset(section, 0, array_size);
@@ -281,9 +284,9 @@ int sparse_add_one_section(struct zone *
ret = sparse_init_one_section(ms, section_nr, memmap);
- if (ret <= 0)
- __kfree_section_memmap(memmap, nr_pages);
out:
pgdat_resize_unlock(pgdat, &flags);
+ if (ret <= 0)
+ __kfree_section_memmap(memmap, nr_pages);
return ret;
}
_
--
^ permalink raw reply
* [PATCH 3/4] powerpc: Allow devices to register with numa topology
From: Arnd Bergmann @ 2006-04-29 1:18 UTC (permalink / raw)
To: Andrew Morton
Cc: Arnd Bergmann, linuxppc-dev, Paul Mackerras, cbe-oss-dev,
linux-kernel
In-Reply-To: <20060429011827.502138000@localhost.localdomain>
From: Jeremy Kerr <jk@ozlabs.org>
Change of_node_to_nid() to traverse the device tree, looking for a numa
id. Cell uses this to assign ids to SPUs, which are children of the CPU
node. Existing users of of_node_to_nid() are altered to use
of_node_to_nid_single(), which doesn't do the traversal.
Export an attach_sysdev_to_node() function, allowing system devices (eg.
SPUs) to link themselves into the numa topology in sysfs.
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
---
Index: linus-2.6/arch/powerpc/mm/numa.c
===================================================================
--- linus-2.6.orig/arch/powerpc/mm/numa.c 2006-04-29 01:50:25.000000000 +0200
+++ linus-2.6/arch/powerpc/mm/numa.c 2006-04-29 02:02:28.000000000 +0200
@@ -194,7 +194,7 @@
/* Returns nid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa
* info is found.
*/
-static int of_node_to_nid(struct device_node *device)
+static int of_node_to_nid_single(struct device_node *device)
{
int nid = -1;
unsigned int *tmp;
@@ -216,6 +216,28 @@
return nid;
}
+/* Walk the device tree upwards, looking for an associativity id */
+int of_node_to_nid(struct device_node *device)
+{
+ struct device_node *tmp;
+ int nid = -1;
+
+ of_node_get(device);
+ while (device) {
+ nid = of_node_to_nid_single(device);
+ if (nid != -1)
+ break;
+
+ tmp = device;
+ device = of_get_parent(tmp);
+ of_node_put(tmp);
+ }
+ of_node_put(device);
+
+ return nid;
+}
+EXPORT_SYMBOL_GPL(of_node_to_nid);
+
/*
* In theory, the "ibm,associativity" property may contain multiple
* associativity lists because a resource may be multiply connected
@@ -300,7 +322,7 @@
goto out;
}
- nid = of_node_to_nid(cpu);
+ nid = of_node_to_nid_single(cpu);
if (nid < 0 || !node_online(nid))
nid = any_online_node(NODE_MASK_ALL);
@@ -393,7 +415,7 @@
cpu = find_cpu_node(i);
BUG_ON(!cpu);
- nid = of_node_to_nid(cpu);
+ nid = of_node_to_nid_single(cpu);
of_node_put(cpu);
/*
@@ -437,7 +459,7 @@
* have associativity properties. If none, then
* everything goes to default_nid.
*/
- nid = of_node_to_nid(memory);
+ nid = of_node_to_nid_single(memory);
if (nid < 0)
nid = default_nid;
node_set_online(nid);
@@ -776,7 +798,7 @@
ha_new_range:
start = read_n_cells(n_mem_addr_cells, &memcell_buf);
size = read_n_cells(n_mem_size_cells, &memcell_buf);
- nid = of_node_to_nid(memory);
+ nid = of_node_to_nid_single(memory);
/* Domains not present at boot default to 0 */
if (nid < 0 || !node_online(nid))
Index: linus-2.6/include/asm-powerpc/topology.h
===================================================================
--- linus-2.6.orig/include/asm-powerpc/topology.h 2006-04-29 01:50:25.000000000 +0200
+++ linus-2.6/include/asm-powerpc/topology.h 2006-04-29 02:02:28.000000000 +0200
@@ -4,6 +4,9 @@
#include <linux/config.h>
+struct sys_device;
+struct device_node;
+
#ifdef CONFIG_NUMA
#include <asm/mmzone.h>
@@ -27,6 +30,8 @@
return first_cpu(tmp);
}
+int of_node_to_nid(struct device_node *device);
+
#define pcibus_to_node(node) (-1)
#define pcibus_to_cpumask(bus) (cpu_online_map)
@@ -57,10 +62,29 @@
extern void __init dump_numa_cpu_topology(void);
+extern int sysfs_add_device_to_node(struct sys_device *dev, int nid);
+extern void sysfs_remove_device_from_node(struct sys_device *dev, int nid);
+
#else
+static inline int of_node_to_nid(struct device_node *device)
+{
+ return 0;
+}
+
static inline void dump_numa_cpu_topology(void) {}
+static inline int sysfs_add_device_to_node(struct sys_device *dev, int nid)
+{
+ return 0;
+}
+
+static inline void sysfs_remove_device_from_node(struct sys_device *dev,
+ int nid)
+{
+}
+
+
#include <asm-generic/topology.h>
#endif /* CONFIG_NUMA */
Index: linus-2.6/arch/powerpc/kernel/sysfs.c
===================================================================
--- linus-2.6.orig/arch/powerpc/kernel/sysfs.c 2006-04-29 01:50:25.000000000 +0200
+++ linus-2.6/arch/powerpc/kernel/sysfs.c 2006-04-29 02:02:28.000000000 +0200
@@ -322,13 +322,31 @@
}
}
}
+
+int sysfs_add_device_to_node(struct sys_device *dev, int nid)
+{
+ struct node *node = &node_devices[nid];
+ return sysfs_create_link(&node->sysdev.kobj, &dev->kobj,
+ kobject_name(&dev->kobj));
+}
+
+void sysfs_remove_device_from_node(struct sys_device *dev, int nid)
+{
+ struct node *node = &node_devices[nid];
+ sysfs_remove_link(&node->sysdev.kobj, kobject_name(&dev->kobj));
+}
+
#else
static void register_nodes(void)
{
return;
}
+
#endif
+EXPORT_SYMBOL_GPL(sysfs_add_device_to_node);
+EXPORT_SYMBOL_GPL(sysfs_remove_device_from_node);
+
/* Only valid if CPU is present. */
static ssize_t show_physical_id(struct sys_device *dev, char *buf)
{
--
^ permalink raw reply
* [PATCH 4/4] powerpc: cell: Add numa id to struct spu
From: Arnd Bergmann @ 2006-04-29 1:18 UTC (permalink / raw)
To: Andrew Morton
Cc: Arnd Bergmann, linuxppc-dev, Paul Mackerras, cbe-oss-dev,
linux-kernel
In-Reply-To: <20060429011827.502138000@localhost.localdomain>
From: Jeremy Kerr <jk@ozlabs.org>
Add an nid member to the spu structure, and store the numa id of the spu
there on creation.
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
---
Index: linus-2.6/arch/powerpc/platforms/cell/spu_base.c
===================================================================
--- linus-2.6.orig/arch/powerpc/platforms/cell/spu_base.c 2006-04-29 02:51:33.000000000 +0200
+++ linus-2.6/arch/powerpc/platforms/cell/spu_base.c 2006-04-29 02:56:58.000000000 +0200
@@ -525,8 +525,8 @@
return id ? *id : 0;
}
-static int __init cell_spuprop_present(struct device_node *spe,
- const char *prop)
+static int __init cell_spuprop_present(struct spu *spu, struct device_node *spe,
+ const char *prop)
{
static DEFINE_MUTEX(add_spumem_mutex);
@@ -537,7 +537,6 @@
int proplen;
unsigned long start_pfn, nr_pages;
- int node_id;
struct pglist_data *pgdata;
struct zone *zone;
int ret;
@@ -548,14 +547,7 @@
start_pfn = p->address >> PAGE_SHIFT;
nr_pages = ((unsigned long)p->len + PAGE_SIZE - 1) >> PAGE_SHIFT;
- /*
- * XXX need to get the correct NUMA node in here. This may
- * be different from the spe::node_id property, e.g. when
- * the host firmware is not NUMA aware.
- */
- node_id = 0;
-
- pgdata = NODE_DATA(node_id);
+ pgdata = NODE_DATA(spu->nid);
zone = pgdata->node_zones;
/* XXX rethink locking here */
@@ -566,8 +558,8 @@
return ret;
}
-static void __iomem * __init map_spe_prop(struct device_node *n,
- const char *name)
+static void __iomem * __init map_spe_prop(struct spu *spu,
+ struct device_node *n, const char *name)
{
struct address_prop {
unsigned long address;
@@ -585,7 +577,7 @@
prop = p;
- err = cell_spuprop_present(n, name);
+ err = cell_spuprop_present(spu, n, name);
if (err && (err != -EEXIST))
goto out;
@@ -603,44 +595,45 @@
iounmap((u8 __iomem *)spu->local_store);
}
-static int __init spu_map_device(struct spu *spu, struct device_node *spe)
+static int __init spu_map_device(struct spu *spu, struct device_node *node)
{
char *prop;
int ret;
ret = -ENODEV;
- prop = get_property(spe, "isrc", NULL);
+ prop = get_property(node, "isrc", NULL);
if (!prop)
goto out;
spu->isrc = *(unsigned int *)prop;
- spu->name = get_property(spe, "name", NULL);
+ spu->name = get_property(node, "name", NULL);
if (!spu->name)
goto out;
- prop = get_property(spe, "local-store", NULL);
+ prop = get_property(node, "local-store", NULL);
if (!prop)
goto out;
spu->local_store_phys = *(unsigned long *)prop;
/* we use local store as ram, not io memory */
- spu->local_store = (void __force *)map_spe_prop(spe, "local-store");
+ spu->local_store = (void __force *)
+ map_spe_prop(spu, node, "local-store");
if (!spu->local_store)
goto out;
- prop = get_property(spe, "problem", NULL);
+ prop = get_property(node, "problem", NULL);
if (!prop)
goto out_unmap;
spu->problem_phys = *(unsigned long *)prop;
- spu->problem= map_spe_prop(spe, "problem");
+ spu->problem= map_spe_prop(spu, node, "problem");
if (!spu->problem)
goto out_unmap;
- spu->priv1= map_spe_prop(spe, "priv1");
+ spu->priv1= map_spe_prop(spu, node, "priv1");
/* priv1 is not available on a hypervisor */
- spu->priv2= map_spe_prop(spe, "priv2");
+ spu->priv2= map_spe_prop(spu, node, "priv2");
if (!spu->priv2)
goto out_unmap;
ret = 0;
@@ -668,6 +661,10 @@
goto out_free;
spu->node = find_spu_node_id(spe);
+ spu->nid = of_node_to_nid(spe);
+ if (spu->nid == -1)
+ spu->nid = 0;
+
spu->stop_code = 0;
spu->slb_replace = 0;
spu->mm = NULL;
Index: linus-2.6/include/asm-powerpc/spu.h
===================================================================
--- linus-2.6.orig/include/asm-powerpc/spu.h 2006-04-29 02:51:29.000000000 +0200
+++ linus-2.6/include/asm-powerpc/spu.h 2006-04-29 02:56:58.000000000 +0200
@@ -117,6 +117,7 @@
struct list_head list;
struct list_head sched_list;
int number;
+ int nid;
u32 isrc;
u32 node;
u64 flags;
--
^ permalink raw reply
* Re: patches for 2.6.18
From: Stephen Rothwell @ 2006-04-29 1:22 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <17489.60365.655344.949668@cargo.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]
On Fri, 28 Apr 2006 20:17:49 +1000 Paul Mackerras <paulus@samba.org> wrote:
>
> If you have patches that aren't 2.6.17 material, but you would like to
> see them in 2.6.18, now is the time to be posting them to the list, so
> that I can put them in the powerpc.git tree, and they can get some
> testing before 2.6.17 comes out. Please don't wait for the 2-week
> merge window to send them. That 2-week merge window is the window for
> me to send stuff to Linus, not the window for you to send stuff to me.
The four I sent a couple of days ago that put the iSeries vio stuff into
the device tree would be good to go into the powerpc.git tree.
--
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: sign extension for 32bit syscalls on ppc64
From: Stephen Rothwell @ 2006-04-29 1:30 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <17490.42497.351114.712494@cargo.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 658 bytes --]
On Sat, 29 Apr 2006 09:32:17 +1000 Paul Mackerras <paulus@samba.org> wrote:
>
> However, it's debatable whether file descriptor arguments really need
> to be sign-extended. Although they are typed as int, negative values
> are not generally valid (although there are one or two cases where
> they are), and an fd value of 4294967295 will generate an EBADF error
> just as well as -1 will.
They do need to be sign extended for the new *at syscalls where you can pass
a sepecial value AT_FDCWD (-10) to represent the current directory ...
--
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] [2.6.18] powerpc: kill union tce_entry
From: Stephen Rothwell @ 2006-04-29 1:40 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev, paulus
In-Reply-To: <20060428140835.GG5518@pb15.lixom.net>
[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]
On Fri, 28 Apr 2006 09:08:35 -0500 Olof Johansson <olof@lixom.net> wrote:
>
> - struct {
> - unsigned int tb_cacheBits :6; /* Cache hash bits - not used */
> - unsigned int tb_rsvd :6;
> - unsigned long tb_rpn :40; /* Real page number */
> - unsigned int tb_valid :1; /* Tce is valid (vb only) */
> - unsigned int tb_allio :1; /* Tce is valid for all lps (vb only) */
> - unsigned int tb_lpindex :8; /* LpIndex for user of TCE (vb only) */
> - unsigned int tb_pciwr :1; /* Write allowed (pci only) */
> - unsigned int tb_rdwr :1; /* Read allowed (pci), Write allowed (vb) */
> - } te_bits;
> +#define TCE_RPN_MASK 0xfffffffffful /* 40-bit RPN (4K pages) */
> +#define TCE_RPN_SHIFT 12
> +#define TCE_VALID 0x200 /* TCE valid */
> +#define TCE_ALLIO 0x100 /* TCE valid for all lpars */
Shouldn't the above two be 0x800 and 0x400 respectively (or is my bit
counting/ordering mucked up)?
--
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 1/3] powerpc: Make rtas console _much_ faster
From: Michael Ellerman @ 2006-04-29 1:56 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Arnd Bergmann, linux-kernel, linuxppc-dev, Paul Mackerras,
cbe-oss-dev
In-Reply-To: <200604290245.57507.arnd@arndb.de>
[-- Attachment #1: Type: text/plain, Size: 2562 bytes --]
I'll clean this one up a little before merging it as per Ryan's email of
a week or two ago. New patch today or tomorrow.
Even though this is 1/3 the rest of the series should be fine to merge,
right Arnd?
cheers
On Sat, 2006-04-29 at 02:45 +0200, Arnd Bergmann wrote:
> Currently the hvc_rtas driver is painfully slow to use. Our "benchmark" is
> ls -R /etc, which spits out about 27866 characters. The theoretical maximum
> speed would be about 2.2 seconds, the current code takes ~50 seconds.
>
> The core of the problem is that sometimes when the tty layer asks us to push
> characters the firmware isn't able to handle some or all of them, and so
> returns an error. The current code sees this and just returns to the tty code
> with the buffer half sent.
>
> There's the khvcd thread which will eventually wake up and try to push more
> characters, that will usually work because the firmware's had time to push
> the characters out. But the thread only wakes up every 10 milliseconds, which
> isn't fast enough.
>
> There's already code in the hvc_console driver to make the khvcd thread do
> a "quick" loop, where it just calls yield() instead of sleeping. The only code
> that triggered that behaviour was recently removed though, which I don't
> quite understand.
>
> Still, if we set HVC_POLL_QUICK whenever the push hvc_push() doesn't push all
> characters (ie. RTAS blocks), we can get good performance out of the hvc_rtas
> backend. With this patch the "benchmark" takes ~2.8 seconds.
>
> Cc: Ryan Arnold <rsa@us.ibm.com>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
>
> ---
>
> drivers/char/hvc_console.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linus-2.6/drivers/char/hvc_console.c
> ===================================================================
> --- linus-2.6.orig/drivers/char/hvc_console.c
> +++ linus-2.6/drivers/char/hvc_console.c
> @@ -570,7 +570,7 @@ static int hvc_poll(struct hvc_struct *h
> hvc_push(hp);
> /* Reschedule us if still some write pending */
> if (hp->n_outbuf > 0)
> - poll_mask |= HVC_POLL_WRITE;
> + poll_mask |= HVC_POLL_WRITE | HVC_POLL_QUICK;
>
> /* No tty attached, just skip */
> tty = hp->tty;
>
> --
--
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
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply
* Re: [RFC , PATCH] support for the ibm,pa_features cpu property
From: Paul Mackerras @ 2006-04-29 1:57 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev list
In-Reply-To: <20060428192149.GJ5518@pb15.lixom.net>
Olof Johansson writes:
> Do you know why they went for this brand new extra architected bitfield
> instead of continuing down the way that processor features always have
> been documented before, by adding a property to the cpu device node?
They wanted to cover basically everything that we have CPU feature
bits for, plus some other things. That would have been a lot of new
properties, so they went for one that had a bitmap in it, and made it
extensible in two different directions for good measure while they
were at it. :)
> (Now, the naming convention of calling it a "pa feature" is unfortunate,
> but nothing I can really complain about since our stuff is not yet in
> tree.)
The "pa" is just "processor architecture", nothing to do with your
employer. :)
Paul.
^ permalink raw reply
* Re: [RFC , PATCH] support for the ibm,pa_features cpu property
From: Paul Mackerras @ 2006-04-29 2:20 UTC (permalink / raw)
To: will_schmidt; +Cc: linuxppc-dev list
In-Reply-To: <1146249684.27214.18.camel@localhost.localdomain>
Will Schmidt writes:
> This is an initial pass at the functionality. This has been tested in
> the case where the property is missing, but still needs to be tested
> against a system where the property actually exists. :-o
Some random comments, and a modified version of your patch...
- We may want to make a table giving the correspondence between
pa-features byte/bit numbers and our feature bits, and then just
have code that walks through the table and sets/clears feature bits
as appropriate.
- If we are setting/clearing feature bits that are used with the asm
feature macros, we'll have to do this much earlier, in prom.c,
before the device tree is unflattened.
Paul.
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 4467c49..022b9b3 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -106,6 +106,78 @@ static struct notifier_block ppc64_panic
.priority = INT_MIN /* may not return; must be done last */
};
+/*
+ * ibm,pa-features is a per-cpu property that contains a string of
+ * attribute descriptors, each of which has a 2 byte header plus up
+ * to 254 bytes worth of processor attribute bits. First header
+ * byte specifies the number of bytes following the header.
+ * Second header byte is an "attribute-specifier" type, of which
+ * zero is the only currently-defined value.
+ * Implementation: Pass in the byte and bit offset for the feature
+ * that we are interested in. The function will return -1 if the
+ * pa-features property is missing, or a 1/0 to indicate if the feature
+ * is supported/not supported. Note that the bit numbers are
+ * big-endian to match the definition in PAPR.
+ */
+static int get_pa_feature(int pabyte, int pabit)
+{
+ struct device_node *cpu;
+ unsigned char *pa_feature_table;
+ int tablelen;
+ int ret = -1;
+
+ cpu = of_find_node_by_type(NULL, "cpu");
+ if (cpu == NULL)
+ return -1;
+
+ pa_feature_table = get_property(cpu, "ibm,pa-features", &tablelen);
+ if (pa_feature_table == NULL)
+ goto out;
+
+ /* find descriptor with type == 0 */
+ for (;;) {
+ if (tablelen < 3 || tablelen < 2 + pa_feature_table[1])
+ goto out; /* not found */
+ if (pa_feature_table[0] == 0)
+ break;
+ tablelen -= 2 + pa_feature_table[1];
+ pa_feature_table += 2 + pa_feature_table[1];
+ }
+
+ /* check if the specifier is long enough */
+ if (pabyte >= pa_feature_table[1])
+ goto out;
+
+ ret = (pa_feature_table[2 + pabyte] >> (7 - pabit)) & 1;
+
+ out:
+ of_node_put(cpu);
+ return ret;
+}
+
+/*
+ * set values within the cur_cpu_spec table according to
+ * the ibm,pa_features property.
+ * potential entries include:
+ * Byte 0, bit 1 - FPU available
+ * Byte 1, bit 2 - cache-inhibited large pages supported
+ * Byte 2, bit 3 - DAR set on alignment interrupt.
+ */
+static void check_cpu_features(void)
+{
+ int hasit;
+
+ /* test for support of cache-inhibited large pages */
+ hasit = get_pa_feature(1, 2);
+ if (hasit >= 0)
+ if (hasit)
+ cur_cpu_spec->cpu_features |= CPU_FTR_CI_LARGE_PAGE;
+ else
+ cur_cpu_spec->cpu_features &= ~CPU_FTR_CI_LARGE_PAGE;
+
+ /* add more here in future... */
+}
+
#ifdef CONFIG_SMP
static int smt_enabled_cmdline;
@@ -425,6 +497,8 @@ #endif
parse_early_param();
+ check_cpu_features();
+
check_smt_enabled();
smp_setup_cpu_maps();
^ permalink raw reply related
* Re: [PATCH 0/4] NUMA support for spufs
From: Paul Mackerras @ 2006-04-29 2:32 UTC (permalink / raw)
To: Andrew Morton; +Cc: linuxppc-dev, cbe-oss-dev, Arnd Bergmann, linux-kernel
In-Reply-To: <20060429011827.502138000@localhost.localdomain>
Arnd Bergmann writes:
> The current version of spufs breaks upon boot when NUMA support is enabled.
> I'd like to fix that before 2.6.17 so we can use the same kernel image
> on Cell that we use on other powerpc systems using NUMA.
Andrew,
If 2/4 of this series looks OK to you to go into 2.6.17, let me know
and I'll push the others to Linus (or you can if you prefer).
Thanks,
Paul.
^ permalink raw reply
* Re: sign extension for 32bit syscalls on ppc64
From: Paul Mackerras @ 2006-04-29 2:33 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev
In-Reply-To: <20060429113059.150cadd6.sfr@canb.auug.org.au>
Stephen Rothwell writes:
> They do need to be sign extended for the new *at syscalls where you can pass
> a sepecial value AT_FDCWD (-10) to represent the current directory ...
So, compat_sys_openat() in fs/compat.c looks wrong to me then, if
AT_FDCWD is part of the ABI and not just an internal thing. And I'm
now not sure whether some of the other *at syscalls do in fact need
compat wrappers...
Paul.
^ permalink raw reply
* Re: alignment exceptionhandler sleeps in invalid context
From: Michael Ellerman @ 2006-04-29 2:34 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, Olaf Hering
In-Reply-To: <17489.63055.968862.256370@cargo.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]
On Fri, 2006-04-28 at 21:02 +1000, Paul Mackerras wrote:
> Olaf Hering writes:
>
> > I'm not sure where the bug is. Does it mean the network stack does
> > something nasty, or is the exception handler itself broken? (probably the latter)
> > This is 2.6.16.9 on a p270.
>
> This patch should fix it, I hope. If you can verify that it fixes it
> I'll send it to Linus.
>
> Paul.
>
> diff --git a/include/asm-powerpc/uaccess.h b/include/asm-powerpc/uaccess.h
> index 3872e92..b02d858 100644
> --- a/include/asm-powerpc/uaccess.h
> +++ b/include/asm-powerpc/uaccess.h
> @@ -179,7 +179,8 @@ do { \
> #define __put_user_nocheck(x, ptr, size) \
> ({ \
> long __pu_err; \
> - might_sleep(); \
> + if ((unsigned long)ptr < PAGE_OFFSET) \
> + might_sleep(); \
+ if (!is_kernel_addr((unsigned long)ptr)) \
+ might_sleep(); \
In asm/page.h :)
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
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply
* Re: [RFC , PATCH] support for the ibm,pa_features cpu property
From: Stephen Rothwell @ 2006-04-29 2:38 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <17490.52602.577587.524391@cargo.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 916 bytes --]
Hi Paul,
On Sat, 29 Apr 2006 12:20:42 +1000 Paul Mackerras <paulus@samba.org> wrote:
>
> + /* find descriptor with type == 0 */
> + for (;;) {
> + if (tablelen < 3 || tablelen < 2 + pa_feature_table[1])
^
Shouldn't that be 0?
> + goto out; /* not found */
> + if (pa_feature_table[0] == 0)
^
And this 1?
> + break;
> + tablelen -= 2 + pa_feature_table[1];
^
0
> + pa_feature_table += 2 + pa_feature_table[1];
^
0
> + }
> +
> + /* check if the specifier is long enough */
> + if (pabyte >= pa_feature_table[1])
^
0
--
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 0/4] NUMA support for spufs
From: Andrew Morton @ 2006-04-29 2:47 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, cbe-oss-dev, arnd, linux-kernel
In-Reply-To: <17490.53283.417700.559725@cargo.ozlabs.ibm.com>
Paul Mackerras <paulus@samba.org> wrote:
>
> Arnd Bergmann writes:
>
> > The current version of spufs breaks upon boot when NUMA support is enabled.
> > I'd like to fix that before 2.6.17 so we can use the same kernel image
> > on Cell that we use on other powerpc systems using NUMA.
>
> Andrew,
>
> If 2/4 of this series looks OK to you to go into 2.6.17,
OK by me. 1/4 touches __add_pages(), which it undergoing quite a bit of
churn at present, but we'll work it out.
> let me know
> and I'll push the others to Linus (or you can if you prefer).
I'll queue all four for the next batch (within the next 48 hours). If you
merge them first then no probs.
^ permalink raw reply
* Re: [PATCH] PCI Error Recovery: e100 network device driver
From: Zhang, Yanmin @ 2006-04-29 2:48 UTC (permalink / raw)
To: Linas Vepstas
Cc: netdev, LKML, jesse.brandeburg, linuxppc-dev, john.ronciak,
jeffrey.t.kirsher, linux-pci, Jeff Garzik
In-Reply-To: <20060406222359.GA30037@austin.ibm.com>
On Fri, 2006-04-07 at 06:24, Linas Vepstas wrote:
> Please apply and forward upstream.
>
> --linas
>
> [PATCH] PCI Error Recovery: e100 network device driver
>
> Various PCI bus errors can be signaled by newer PCI controllers. This
> patch adds the PCI error recovery callbacks to the intel ethernet e100
> device driver. The patch has been tested, and appears to work well.
>
> Signed-off-by: Linas Vepstas <linas@linas.org>
> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
I am enabling PCI-Express AER (Advanced Error Reporting) in kernel and
glad to see many drivers to support pci error handling.
>
> ----
>
> drivers/net/e100.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 65 insertions(+)
>
> Index: linux-2.6.17-rc1/drivers/net/e100.c
> ===================================================================
> --- linux-2.6.17-rc1.orig/drivers/net/e100.c 2006-04-05 09:56:06.000000000 -0500
> +++ linux-2.6.17-rc1/drivers/net/e100.c 2006-04-06 15:17:29.000000000 -0500
> @@ -2781,6 +2781,70 @@ static void e100_shutdown(struct pci_dev
> }
>
>
> +/* ------------------ PCI Error Recovery infrastructure -------------- */
> +/** e100_io_error_detected() is called when PCI error is detected */
> +static pci_ers_result_t e100_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
> +{
> + struct net_device *netdev = pci_get_drvdata(pdev);
> +
> + /* Same as calling e100_down(netdev_priv(netdev)), but generic */
> + netdev->stop(netdev);
e100 stop method e100_close calls e100_down which would do IO. Does it
violate the rule defined in Documentation/pci-error-recovery.txt that
error_detected shouldn't do any IO?
Suggest to create a new function, such like e100_close_noreset.
> +
> + /* Detach; put netif into state similar to hotplug unplug */
> + netif_poll_enable(netdev);
> + netif_device_detach(netdev);
> +
> + /* Request a slot reset. */
> + return PCI_ERS_RESULT_NEED_RESET;
> +}
> +
> +/** e100_io_slot_reset is called after the pci bus has been reset.
> + * Restart the card from scratch. */
> +static pci_ers_result_t e100_io_slot_reset(struct pci_dev *pdev)
> +{
> + struct net_device *netdev = pci_get_drvdata(pdev);
> + struct nic *nic = netdev_priv(netdev);
> +
> + if(pci_enable_device(pdev)) {
> + printk(KERN_ERR "e100: Cannot re-enable PCI device after reset.\n");
> + return PCI_ERS_RESULT_DISCONNECT;
> + }
> + pci_set_master(pdev);
> +
> + /* Only one device per card can do a reset */
> + if (0 != PCI_FUNC (pdev->devfn))
> + return PCI_ERS_RESULT_RECOVERED;
> + e100_hw_reset(nic);
> + e100_phy_init(nic);
Should pci_set_master be called after e100_hw_reset like in function
e100_probe?
> +
> + return PCI_ERS_RESULT_RECOVERED;
> +}
> +
> +/** e100_io_resume is called when the error recovery driver
> + * tells us that its OK to resume normal operation.
> + */
> +static void e100_io_resume(struct pci_dev *pdev)
> +{
> + struct net_device *netdev = pci_get_drvdata(pdev);
> + struct nic *nic = netdev_priv(netdev);
> +
> + /* ack any pending wake events, disable PME */
> + pci_enable_wake(pdev, 0, 0);
> +
> + netif_device_attach(netdev);
> + if(netif_running(netdev)) {
> + e100_open (netdev);
> + mod_timer(&nic->watchdog, jiffies);
e100_open calls e100_up which already sets watchdog timer. Why to set
it again?
> + }
> +}
> +
^ permalink raw reply
* Re: sign extension for 32bit syscalls on ppc64
From: Stephen Rothwell @ 2006-04-29 3:16 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <17490.53377.898206.21369@cargo.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]
On Sat, 29 Apr 2006 12:33:37 +1000 Paul Mackerras <paulus@samba.org> wrote:
>
> Stephen Rothwell writes:
>
> > They do need to be sign extended for the new *at syscalls where you can pass
> > a sepecial value AT_FDCWD (-10) to represent the current directory ...
>
> So, compat_sys_openat() in fs/compat.c looks wrong to me then, if
> AT_FDCWD is part of the ABI and not just an internal thing. And I'm
> now not sure whether some of the other *at syscalls do in fact need
> compat wrappers...
AT_FDCWD (actually -100, sorry) is not protected by __KERNEL__ in
include/linux/fcntl.h and sys_openat does not stop it being passed, so I
assume it is part of the user ABI.
The existence of AT_FDCWD is what stopped me from wiring up all the *at
syscalls earlier. It also sparked another discussion to try to formulate
some generic wrappers for the compat routines.
Has any testing been done on these interfaces that involves 32 bit
processes passing AT_FDCWD on 64 bit kernels (I realise that it will work
for some architectures but I suspect not ppc64).
--
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] PCI Error Recovery: e1000 network device driver
From: Zhang, Yanmin @ 2006-04-29 3:26 UTC (permalink / raw)
To: Linas Vepstas, Greg KH
Cc: netdev, linux-kernel, Brandeburg, Jesse, linuxppc-dev,
Ronciak, John, Kirsher, Jeffrey T, linux-pci, Jeff Garzik,
Linux NICS
>>-----Original Message-----
>>From: linux-kernel-owner@vger.kernel.org =
[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Linas Vepstas
>>Sent: 2006=C4=EA3=D4=C225=C8=D5 11:22
>>To: Greg KH
>>Cc: Jeff Garzik; Ronciak, John; Brandeburg, Jesse; Kirsher, Jeffrey T; =
linux-kernel@vger.kernel.org; netdev@vger.kernel.org;
>>linux-pci@atrey.karlin.mff.cuni.cz; linuxppc-dev@ozlabs.org; Linux =
NICS
>>Subject: Re: [PATCH] PCI Error Recovery: e1000 network device driver
>>
>>On Fri, Mar 24, 2006 at 06:22:06PM -0800, Greg KH wrote:
>>> ... a bit
>>> different from the traditional kernel coding style.
>>
>>Sorry, this is due to inattention on my part; I get cross-eyed
>>after staring at the same code for too long. The patch below should
>>fix things.
>>
>>--linas
>>
>>
>>[PATCH] PCI Error Recovery: e1000 network device driver
>>
>>Various PCI bus errors can be signaled by newer PCI controllers. This
>>patch adds the PCI error recovery callbacks to the intel gigabit
>>ethernet e1000 device driver. The patch has been tested, and appears
>>to work well.
>>
>>Signed-off-by: Linas Vepstas <linas@linas.org>
>>Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
>>
>>----
>>
>> drivers/net/e1000/e1000_main.c | 114 =
++++++++++++++++++++++++++++++++++++++++-
>> 1 files changed, 113 insertions(+), 1 deletion(-)
>>
>>Index: linux-2.6.16-git6/drivers/net/e1000/e1000_main.c
>>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>--- linux-2.6.16-git6.orig/drivers/net/e1000/e1000_main.c 2006-03-23 =
15:48:01.000000000 -0600
>>+++ linux-2.6.16-git6/drivers/net/e1000/e1000_main.c 2006-03-24 =
15:14:40.431371705 -0600
>>@@ -226,6 +226,16 @@ static int e1000_resume(struct pci_dev *
>>+/**
>>+ * e1000_io_error_detected - called when PCI error is detected
>>+ * @pdev: Pointer to PCI device
>>+ * @state: The current pci conneection state
>>+ *
>>+ * This function is called after a PCI bus error affecting
>>+ * this device has been detected.
>>+ */
>>+static pci_ers_result_t e1000_io_error_detected(struct pci_dev *pdev, =
pci_channel_state_t state)
>>+{
>>+ struct net_device *netdev =3D pci_get_drvdata(pdev);
>>+ struct e1000_adapter *adapter =3D netdev->priv;
>>+
>>+ netif_device_detach(netdev);
>>+
>>+ if (netif_running(netdev))
>>+ e1000_down(adapter);
[YM] e1000_down will do device IO. So it's not appropriate to do so =
here.
>>+
>>+ /* Request a slot slot reset. */
>>+ return PCI_ERS_RESULT_NEED_RESET;
>>+}
>>+
>>+/**
>>+ * e1000_io_slot_reset - called after the pci bus has been reset.
>>+ * @pdev: Pointer to PCI device
>>+ *
>>+ * Restart the card from scratch, as if from a cold-boot. =
Implementation
>>+ * resembles the first-half of the e1000_resume routine.
>>+ */
>>+static pci_ers_result_t e1000_io_slot_reset(struct pci_dev *pdev)
>>+{
>>+ struct net_device *netdev =3D pci_get_drvdata(pdev);
>>+ struct e1000_adapter *adapter =3D netdev->priv;
>>+
>>+ if (pci_enable_device(pdev)) {
>>+ printk(KERN_ERR "e1000: Cannot re-enable PCI device after =
reset.\n");
>>+ return PCI_ERS_RESULT_DISCONNECT;
>>+ }
>>+ pci_set_master(pdev);
>>+
>>+ pci_enable_wake(pdev, 3, 0);
>>+ pci_enable_wake(pdev, 4, 0); /* 4 =3D=3D D3 cold */
[YM] Suggest using PCI_D3hot and PCI_D3cold instead of hard-coded =
numbers.
^ permalink raw reply
* Re: sign extension for 32bit syscalls on ppc64
From: Stephen Rothwell @ 2006-04-29 3:42 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20060429131640.6f79e0d3.sfr@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 451 bytes --]
On Sat, 29 Apr 2006 13:16:40 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> AT_FDCWD (actually -100, sorry) is not protected by __KERNEL__ in
> include/linux/fcntl.h and sys_openat does not stop it being passed, so I
> assume it is part of the user ABI.
And AT_FDCWD is mentioned in the Solaris documentation for openat(2).
--
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: [RFC , PATCH] support for the ibm,pa_features cpu property
From: Olof Johansson @ 2006-04-29 3:46 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Olof Johansson, linuxppc-dev list
In-Reply-To: <17490.51212.357234.664398@cargo.ozlabs.ibm.com>
On Sat, Apr 29, 2006 at 11:57:32AM +1000, Paul Mackerras wrote:
> Olof Johansson writes:
>
> > Do you know why they went for this brand new extra architected bitfield
> > instead of continuing down the way that processor features always have
> > been documented before, by adding a property to the cpu device node?
>
> They wanted to cover basically everything that we have CPU feature
> bits for, plus some other things. That would have been a lot of new
> properties, so they went for one that had a bitmap in it, and made it
> extensible in two different directions for good measure while they
> were at it. :)
Sure, it might be a few, but we already have a handful. And having a
bitfield only gives you a chance to say here or not, no version numbers,
capacities, etc.
Anyway, I can't really debate it since I haven't seen the spec, just one
implementation.
> > (Now, the naming convention of calling it a "pa feature" is unfortunate,
> > but nothing I can really complain about since our stuff is not yet in
> > tree.)
>
> The "pa" is just "processor architecture", nothing to do with your
> employer. :)
Yes, I know. Just saying. :)
-Olof
^ permalink raw reply
* Re: [PATCH] [2.6.18] powerpc: kill union tce_entry
From: Olof Johansson @ 2006-04-29 3:51 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Olof Johansson, linuxppc-dev, paulus
In-Reply-To: <20060429114056.09928ba9.sfr@canb.auug.org.au>
On Sat, Apr 29, 2006 at 11:40:56AM +1000, Stephen Rothwell wrote:
> On Fri, 28 Apr 2006 09:08:35 -0500 Olof Johansson <olof@lixom.net> wrote:
> >
> > - struct {
> > - unsigned int tb_cacheBits :6; /* Cache hash bits - not used */
> > - unsigned int tb_rsvd :6;
> > - unsigned long tb_rpn :40; /* Real page number */
> > - unsigned int tb_valid :1; /* Tce is valid (vb only) */
> > - unsigned int tb_allio :1; /* Tce is valid for all lps (vb only) */
> > - unsigned int tb_lpindex :8; /* LpIndex for user of TCE (vb only) */
> > - unsigned int tb_pciwr :1; /* Write allowed (pci only) */
> > - unsigned int tb_rdwr :1; /* Read allowed (pci), Write allowed (vb) */
> > - } te_bits;
>
> > +#define TCE_RPN_MASK 0xfffffffffful /* 40-bit RPN (4K pages) */
> > +#define TCE_RPN_SHIFT 12
> > +#define TCE_VALID 0x200 /* TCE valid */
> > +#define TCE_ALLIO 0x100 /* TCE valid for all lpars */
>
> Shouldn't the above two be 0x800 and 0x400 respectively (or is my bit
> counting/ordering mucked up)?
Yes. Looks like it's only used for vio entries, which would explain why
my machines could still boot.
Nice catch. Revised patch below.
Thanks,
-Olof
---
It's been long overdue to kill the union tce_entry in the pSeries/iSeries
TCE code, especially since I asked the Summit guys to do it on the code
they copied from us.
Also, while I was at it, I cleaned up some whitespace.
Built and booted on pSeries, built on iSeries.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: powerpc/arch/powerpc/platforms/iseries/iommu.c
===================================================================
--- powerpc.orig/arch/powerpc/platforms/iseries/iommu.c
+++ powerpc/arch/powerpc/platforms/iseries/iommu.c
@@ -4,6 +4,7 @@
* Rewrite, cleanup:
*
* Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
+ * Copyright (C) 2006 Olof Johansson <olof@lixom.net>
*
* Dynamic DMA mapping support, iSeries-specific parts.
*
@@ -43,30 +44,28 @@ static void tce_build_iSeries(struct iom
unsigned long uaddr, enum dma_data_direction direction)
{
u64 rc;
- union tce_entry tce;
+ u64 tce, rpn;
index <<= TCE_PAGE_FACTOR;
npages <<= TCE_PAGE_FACTOR;
while (npages--) {
- tce.te_word = 0;
- tce.te_bits.tb_rpn = virt_to_abs(uaddr) >> TCE_SHIFT;
+ rpn = virt_to_abs(uaddr) >> TCE_SHIFT;
+ tce = (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT;
if (tbl->it_type == TCE_VB) {
/* Virtual Bus */
- tce.te_bits.tb_valid = 1;
- tce.te_bits.tb_allio = 1;
+ tce |= TCE_VALID|TCE_ALLIO;
if (direction != DMA_TO_DEVICE)
- tce.te_bits.tb_rdwr = 1;
+ tce |= TCE_VB_WRITE;
} else {
/* PCI Bus */
- tce.te_bits.tb_rdwr = 1; /* Read allowed */
+ tce |= TCE_PCI_READ; /* Read allowed */
if (direction != DMA_TO_DEVICE)
- tce.te_bits.tb_pciwr = 1;
+ tce |= TCE_PCI_WRITE;
}
- rc = HvCallXm_setTce((u64)tbl->it_index, (u64)index,
- tce.te_word);
+ rc = HvCallXm_setTce((u64)tbl->it_index, (u64)index, tce);
if (rc)
panic("PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx\n",
rc);
@@ -124,7 +123,7 @@ void iommu_table_getparms_iSeries(unsign
/* itc_size is in pages worth of table, it_size is in # of entries */
tbl->it_size = ((parms->itc_size * TCE_PAGE_SIZE) /
- sizeof(union tce_entry)) >> TCE_PAGE_FACTOR;
+ TCE_ENTRY_SIZE) >> TCE_PAGE_FACTOR;
tbl->it_busno = parms->itc_busno;
tbl->it_offset = parms->itc_offset >> TCE_PAGE_FACTOR;
tbl->it_index = parms->itc_index;
Index: powerpc/arch/powerpc/platforms/pseries/iommu.c
===================================================================
--- powerpc.orig/arch/powerpc/platforms/pseries/iommu.c
+++ powerpc/arch/powerpc/platforms/pseries/iommu.c
@@ -1,23 +1,24 @@
/*
* Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation
*
- * Rewrite, cleanup:
+ * Rewrite, cleanup:
*
* Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation
+ * Copyright (C) 2006 Olof Johansson <olof@lixom.net>
*
* Dynamic DMA mapping support, pSeries-specific parts, both SMP and LPAR.
*
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -49,52 +50,46 @@
#define DBG(fmt...)
-static void tce_build_pSeries(struct iommu_table *tbl, long index,
- long npages, unsigned long uaddr,
+static void tce_build_pSeries(struct iommu_table *tbl, long index,
+ long npages, unsigned long uaddr,
enum dma_data_direction direction)
{
- union tce_entry t;
- union tce_entry *tp;
+ u64 proto_tce;
+ u64 *tcep;
+ u64 rpn;
index <<= TCE_PAGE_FACTOR;
npages <<= TCE_PAGE_FACTOR;
- t.te_word = 0;
- t.te_rdwr = 1; // Read allowed
+ proto_tce = TCE_PCI_READ; // Read allowed
if (direction != DMA_TO_DEVICE)
- t.te_pciwr = 1;
+ proto_tce |= TCE_PCI_WRITE;
- tp = ((union tce_entry *)tbl->it_base) + index;
+ tcep = ((u64 *)tbl->it_base) + index;
while (npages--) {
/* can't move this out since we might cross LMB boundary */
- t.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
-
- tp->te_word = t.te_word;
+ rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
+ *tcep = proto_tce | (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT;
uaddr += TCE_PAGE_SIZE;
- tp++;
+ tcep++;
}
}
static void tce_free_pSeries(struct iommu_table *tbl, long index, long npages)
{
- union tce_entry t;
- union tce_entry *tp;
+ u64 *tcep;
npages <<= TCE_PAGE_FACTOR;
index <<= TCE_PAGE_FACTOR;
- t.te_word = 0;
- tp = ((union tce_entry *)tbl->it_base) + index;
-
- while (npages--) {
- tp->te_word = t.te_word;
-
- tp++;
- }
+ tcep = ((u64 *)tbl->it_base) + index;
+
+ while (npages--)
+ *(tcep++) = 0;
}
@@ -103,43 +98,44 @@ static void tce_build_pSeriesLP(struct i
enum dma_data_direction direction)
{
u64 rc;
- union tce_entry tce;
+ u64 proto_tce, tce;
+ u64 rpn;
tcenum <<= TCE_PAGE_FACTOR;
npages <<= TCE_PAGE_FACTOR;
- tce.te_word = 0;
- tce.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
- tce.te_rdwr = 1;
+ rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
+ proto_tce = TCE_PCI_READ;
if (direction != DMA_TO_DEVICE)
- tce.te_pciwr = 1;
+ proto_tce |= TCE_PCI_WRITE;
while (npages--) {
- rc = plpar_tce_put((u64)tbl->it_index,
- (u64)tcenum << 12,
- tce.te_word );
-
+ tce = proto_tce | (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT;
+ rc = plpar_tce_put((u64)tbl->it_index, (u64)tcenum << 12, tce);
+
if (rc && printk_ratelimit()) {
printk("tce_build_pSeriesLP: plpar_tce_put failed. rc=%ld\n", rc);
printk("\tindex = 0x%lx\n", (u64)tbl->it_index);
printk("\ttcenum = 0x%lx\n", (u64)tcenum);
- printk("\ttce val = 0x%lx\n", tce.te_word );
+ printk("\ttce val = 0x%lx\n", tce );
show_stack(current, (unsigned long *)__get_SP());
}
-
+
tcenum++;
- tce.te_rpn++;
+ rpn++;
}
}
-static DEFINE_PER_CPU(void *, tce_page) = NULL;
+static DEFINE_PER_CPU(u64 *, tce_page) = NULL;
static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
long npages, unsigned long uaddr,
enum dma_data_direction direction)
{
u64 rc;
- union tce_entry tce, *tcep;
+ u64 proto_tce;
+ u64 *tcep;
+ u64 rpn;
long l, limit;
if (TCE_PAGE_FACTOR == 0 && npages == 1)
@@ -152,7 +148,7 @@ static void tce_buildmulti_pSeriesLP(str
* from iommu_alloc{,_sg}()
*/
if (!tcep) {
- tcep = (void *)__get_free_page(GFP_ATOMIC);
+ tcep = (u64 *)__get_free_page(GFP_ATOMIC);
/* If allocation fails, fall back to the loop implementation */
if (!tcep)
return tce_build_pSeriesLP(tbl, tcenum, npages,
@@ -163,11 +159,10 @@ static void tce_buildmulti_pSeriesLP(str
tcenum <<= TCE_PAGE_FACTOR;
npages <<= TCE_PAGE_FACTOR;
- tce.te_word = 0;
- tce.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
- tce.te_rdwr = 1;
+ rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
+ proto_tce = TCE_PCI_READ;
if (direction != DMA_TO_DEVICE)
- tce.te_pciwr = 1;
+ proto_tce |= TCE_PCI_WRITE;
/* We can map max one pageful of TCEs at a time */
do {
@@ -175,11 +170,11 @@ static void tce_buildmulti_pSeriesLP(str
* Set up the page with TCE data, looping through and setting
* the values.
*/
- limit = min_t(long, npages, 4096/sizeof(union tce_entry));
+ limit = min_t(long, npages, 4096/TCE_ENTRY_SIZE);
for (l = 0; l < limit; l++) {
- tcep[l] = tce;
- tce.te_rpn++;
+ tcep[l] = proto_tce | (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT;
+ rpn++;
}
rc = plpar_tce_put_indirect((u64)tbl->it_index,
@@ -195,7 +190,7 @@ static void tce_buildmulti_pSeriesLP(str
printk("tce_buildmulti_pSeriesLP: plpar_tce_put failed. rc=%ld\n", rc);
printk("\tindex = 0x%lx\n", (u64)tbl->it_index);
printk("\tnpages = 0x%lx\n", (u64)npages);
- printk("\ttce[0] val = 0x%lx\n", tcep[0].te_word);
+ printk("\ttce[0] val = 0x%lx\n", tcep[0]);
show_stack(current, (unsigned long *)__get_SP());
}
}
@@ -203,23 +198,17 @@ static void tce_buildmulti_pSeriesLP(str
static void tce_free_pSeriesLP(struct iommu_table *tbl, long tcenum, long npages)
{
u64 rc;
- union tce_entry tce;
tcenum <<= TCE_PAGE_FACTOR;
npages <<= TCE_PAGE_FACTOR;
- tce.te_word = 0;
-
while (npages--) {
- rc = plpar_tce_put((u64)tbl->it_index,
- (u64)tcenum << 12,
- tce.te_word);
+ rc = plpar_tce_put((u64)tbl->it_index, (u64)tcenum << 12, 0);
if (rc && printk_ratelimit()) {
printk("tce_free_pSeriesLP: plpar_tce_put failed. rc=%ld\n", rc);
printk("\tindex = 0x%lx\n", (u64)tbl->it_index);
printk("\ttcenum = 0x%lx\n", (u64)tcenum);
- printk("\ttce val = 0x%lx\n", tce.te_word );
show_stack(current, (unsigned long *)__get_SP());
}
@@ -231,31 +220,24 @@ static void tce_free_pSeriesLP(struct io
static void tce_freemulti_pSeriesLP(struct iommu_table *tbl, long tcenum, long npages)
{
u64 rc;
- union tce_entry tce;
tcenum <<= TCE_PAGE_FACTOR;
npages <<= TCE_PAGE_FACTOR;
- tce.te_word = 0;
-
- rc = plpar_tce_stuff((u64)tbl->it_index,
- (u64)tcenum << 12,
- tce.te_word,
- npages);
+ rc = plpar_tce_stuff((u64)tbl->it_index, (u64)tcenum << 12, 0, npages);
if (rc && printk_ratelimit()) {
printk("tce_freemulti_pSeriesLP: plpar_tce_stuff failed\n");
printk("\trc = %ld\n", rc);
printk("\tindex = 0x%lx\n", (u64)tbl->it_index);
printk("\tnpages = 0x%lx\n", (u64)npages);
- printk("\ttce val = 0x%lx\n", tce.te_word );
show_stack(current, (unsigned long *)__get_SP());
}
}
static void iommu_table_setparms(struct pci_controller *phb,
struct device_node *dn,
- struct iommu_table *tbl)
+ struct iommu_table *tbl)
{
struct device_node *node;
unsigned long *basep;
@@ -275,16 +257,16 @@ static void iommu_table_setparms(struct
memset((void *)tbl->it_base, 0, *sizep);
tbl->it_busno = phb->bus->number;
-
+
/* Units of tce entries */
tbl->it_offset = phb->dma_window_base_cur >> PAGE_SHIFT;
-
+
/* Test if we are going over 2GB of DMA space */
if (phb->dma_window_base_cur + phb->dma_window_size > 0x80000000ul) {
udbg_printf("PCI_DMA: Unexpected number of IOAs under this PHB.\n");
- panic("PCI_DMA: Unexpected number of IOAs under this PHB.\n");
+ panic("PCI_DMA: Unexpected number of IOAs under this PHB.\n");
}
-
+
phb->dma_window_base_cur += phb->dma_window_size;
/* Set the tce table size - measured in entries */
@@ -442,7 +424,7 @@ static void iommu_bus_setup_pSeriesLP(st
tbl = (struct iommu_table *)kmalloc(sizeof(struct iommu_table),
GFP_KERNEL);
-
+
iommu_table_setparms_lpar(ppci->phb, pdn, tbl, dma_window);
ppci->iommu_table = iommu_init_table(tbl);
Index: powerpc/include/asm-powerpc/tce.h
===================================================================
--- powerpc.orig/include/asm-powerpc/tce.h
+++ powerpc/include/asm-powerpc/tce.h
@@ -35,32 +35,15 @@
#define TCE_PAGE_SIZE (1 << TCE_SHIFT)
#define TCE_PAGE_FACTOR (PAGE_SHIFT - TCE_SHIFT)
+#define TCE_ENTRY_SIZE 8 /* each TCE is 64 bits */
-/* tce_entry
- * Used by pSeries (SMP) and iSeries/pSeries LPAR, but there it's
- * abstracted so layout is irrelevant.
- */
-union tce_entry {
- unsigned long te_word;
- struct {
- unsigned int tb_cacheBits :6; /* Cache hash bits - not used */
- unsigned int tb_rsvd :6;
- unsigned long tb_rpn :40; /* Real page number */
- unsigned int tb_valid :1; /* Tce is valid (vb only) */
- unsigned int tb_allio :1; /* Tce is valid for all lps (vb only) */
- unsigned int tb_lpindex :8; /* LpIndex for user of TCE (vb only) */
- unsigned int tb_pciwr :1; /* Write allowed (pci only) */
- unsigned int tb_rdwr :1; /* Read allowed (pci), Write allowed (vb) */
- } te_bits;
-#define te_cacheBits te_bits.tb_cacheBits
-#define te_rpn te_bits.tb_rpn
-#define te_valid te_bits.tb_valid
-#define te_allio te_bits.tb_allio
-#define te_lpindex te_bits.tb_lpindex
-#define te_pciwr te_bits.tb_pciwr
-#define te_rdwr te_bits.tb_rdwr
-};
-
+#define TCE_RPN_MASK 0xfffffffffful /* 40-bit RPN (4K pages) */
+#define TCE_RPN_SHIFT 12
+#define TCE_VALID 0x800 /* TCE valid */
+#define TCE_ALLIO 0x400 /* TCE valid for all lpars */
+#define TCE_PCI_WRITE 0x2 /* write from PCI allowed */
+#define TCE_PCI_READ 0x1 /* read from PCI allowed */
+#define TCE_VB_WRITE 0x1 /* write from VB allowed */
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_TCE_H */
^ permalink raw reply
* please pull powerpc.git 'merge' branch
From: Paul Mackerras @ 2006-04-29 6:15 UTC (permalink / raw)
To: torvalds; +Cc: linuxppc-dev
Linus,
Please do a pull from the "merge" branch of
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git
to get the following powerpc updates. They are mostly bug-fixes;
there is also a defconfig update for Cell, plus a couple of commits
that will enable the kernel to run on forthcoming IBM machines.
These don't affect anything on the current machines, since the
firmware properties and methods they use aren't present.
Thanks,
Paul.
Alan Modra:
powerpc64: Fix loading of modules without a .toc section
Andreas Schwab:
sound/ppc: snd_pmac_toonie_init should be __init
powerpc: Wire up *at syscalls
Anton Blanchard:
powerpc: Add cputable entry for POWER6
Arnd Bergmann:
spufs: Disable local interrupts for SPE hash_page calls.
powerpc: update cell_defconfig
David Gibson:
powerpc: Fix pagetable bloat for hugepages
David Woodhouse:
powerpc: Use check_legacy_ioport() on ppc32 too.
Eugene Surovegin:
ppc32: add 440GX erratum 440_43 workaround
Paul Mackerras:
powerpc/pseries: Tell firmware our capabilities on new machines
Vitaly Bordug:
ppc32: odd fixes and improvements in ppc_sys
ppc32 CPM_UART: Convert to use platform devices
ppc32: Update board-specific code of the CPM UART users
ppc32 CPM_UART: Fixed odd address translations
arch/powerpc/configs/cell_defconfig | 40 ++--
arch/powerpc/kernel/cputable.c | 16 +
arch/powerpc/kernel/module_64.c | 16 +
arch/powerpc/kernel/prom_init.c | 112 ++++++++++
arch/powerpc/kernel/setup-common.c | 8 +
arch/powerpc/kernel/setup_64.c | 8 -
arch/powerpc/kernel/systbl.S | 13 +
arch/powerpc/mm/hugetlbpage.c | 295 ++++++++++++++++++++++++---
arch/powerpc/mm/init_64.c | 7 +
arch/powerpc/platforms/cell/spu_base.c | 10 +
arch/powerpc/platforms/cell/spu_callbacks.c | 13 +
arch/ppc/platforms/4xx/ocotea.c | 2
arch/ppc/platforms/mpc8272ads_setup.c | 114 ++++++++++
arch/ppc/platforms/mpc866ads_setup.c | 140 +++++++++++++
arch/ppc/platforms/mpc885ads_setup.c | 131 ++++++++++++
arch/ppc/platforms/pq2ads.c | 31 +++
arch/ppc/syslib/ibm440gx_common.c | 13 +
arch/ppc/syslib/ibm440gx_common.h | 4
arch/ppc/syslib/mpc8xx_devices.c | 25 ++
arch/ppc/syslib/ppc_sys.c | 4
arch/ppc/syslib/pq2_sys.c | 8 -
drivers/block/floppy.c | 2
drivers/input/serio/i8042-io.h | 4
drivers/serial/cpm_uart/cpm_uart.h | 49 ++++
drivers/serial/cpm_uart/cpm_uart_core.c | 280 ++++++++++++++++++++------
drivers/serial/cpm_uart/cpm_uart_cpm1.c | 54 -----
drivers/serial/cpm_uart/cpm_uart_cpm2.c | 14 -
fs/stat.c | 2
include/asm-powerpc/cputable.h | 14 +
include/asm-powerpc/io.h | 6 -
include/asm-powerpc/page_64.h | 1
include/asm-powerpc/pgalloc.h | 2
include/asm-powerpc/unistd.h | 20 ++
include/asm-ppc/ppc_sys.h | 2
include/asm-ppc/reg_booke.h | 1
sound/ppc/toonie.c | 2
36 files changed, 1234 insertions(+), 229 deletions(-)
^ permalink raw reply
* Re: [openib-general] Re: [PATCH 04/16] ehca: userspace support
From: Heiko J Schick @ 2006-04-29 6:38 UTC (permalink / raw)
To: Pekka Enberg
Cc: linux-kernel, openib-general, linuxppc-dev, Christoph Raisch,
Hoang-Nam Nguyen, Marcus Eder, Jörn Engel
In-Reply-To: <84144f020604272332s6101032cy6936096230f3637c@mail.gmail.com>
Hello,
On 28.04.2006, at 08:32, Pekka Enberg wrote:
>> The problem I see with pr_debug() is that it could only activated via
>> a compile flag. To use the debug outputs you have to re-compile /
>> compile your own kernel.
>
> Do you really need this heavy debug logging in the first place? You
> can use kprobes for arbitrary run-time inspection anyway, so logging
> everything seems wasteful.
The problem I see with kprobes is that you have to set several kernel
configuration options (e.g. CONFIG_KPROBES, CONFIG_DEBUG_INFO, etc.)
on compile time to use it. Same problem with pr_debug().
Regards,
Heiko
^ permalink raw reply
* Re: PCI init vs. memory init
From: Paul Mackerras @ 2006-04-29 7:48 UTC (permalink / raw)
To: Linas Vepstas; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <20060428230401.GF22621@austin.ibm.com>
Linas Vepstas writes:
> You mentioned that the sequence of inits seemed wrong, that the
> PCI init should be done later, after the memory init. I think
> I agree; but when I took a very very quick look at the code, there
> was no obvious hook in later init to move the PCI init over to.
>
> Are you pursuing this further? Should I dig into it? Any bright
> ideas? Am I missing something obvious?
I assume you're talking about find_and_init_phbs() and eeh_init(),
which are currently called from pSeries_setup_arch().
Would a core_initcall be early enough for those? It seems to me that
it probably would be. What are the actual dependencies? Clearly it
needs to be before pcibios_init(), which is a subsys_initcall. Is
there anything else that they need to come before?
> There are several spots in in the powerpc PCI init code where
> a boot_mem alloc is used instead of kmalloc, and this boot_mem is
> then hacked around in the case of a PCI hotplug remove. It would
> be nice to fix this...
Indeed.
Paul.
^ permalink raw reply
* Re: [PATCH]: powerpc/pseries: Print PCI slot location code on failure
From: Paul Mackerras @ 2006-04-29 8:00 UTC (permalink / raw)
To: Linas Vepstas; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <20060428224218.GE22621@austin.ibm.com>
Linas Vepstas writes:
> + location = (char *) get_property(event->dn, "ibm,loc-code", NULL);
> + printk(KERN_ERR "EEH: Error: Cannot find partition endpoint "
> + "for location=%s pci addr=%s\n",
> + location, pci_name(event->dev));
If location is NULL, printk will fortunately save us from a null
pointer dereference; still, it might be nice to have the message say
"location=unknown" or something rather than "location=<NULL>".
Paul.
^ 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