Please pull Open Firmware consolidation patches
Hi Linus, Please pull the Open Firmware device tree consolidation patches from the master branch of git://git.kernel.org/pub/scm/linux/kernel/git/sfr/ofcons.git master The intention here is that there should be no behavioural changes and minimal code changes (apart from movement of the code to common places). There are, however a couple of unavoidable changes: - some of the accessor functions now take a read lock on Sparc[64] where they didn't before. - the bus structures are initialised at runtime. These changes have been reviewed on the PowerPC and Sparc Linux mailing lists and acked by both maintainers (Dave Miller and Paul Mackerras). Kernels with tese changes have been built and booted on a SunBlade1500 (thanks Dave), a Power5+ pSeries machine and a small iSeries machine. Dave is rather keen for these to go in (Did you send him a pull request yet? Sorry, I'm quite anxious :)). Stephen Rothwell (12): Split out common parts of prom.h Start split out of common open firmware code Consolidate of_device_is_compatible Consolidate of_find_property Consolidate of_get_parent Consolidate of_get_next_child Consolidate of_find_node_by routines Begin to consolidate of_device.c Begin consolidation of of_device.h [SPARC/64] Rename some functions like PowerPC Create linux/of_platorm.h Create drivers/of/platform.c arch/powerpc/Kconfig |3 + arch/powerpc/kernel/of_device.c | 122 + arch/powerpc/kernel/of_platform.c | 82 +--- arch/powerpc/kernel/prom.c| 250 +- arch/sparc/Kconfig|3 + arch/sparc/kernel/of_device.c | 222 ++ arch/sparc/kernel/prom.c | 173 +--- arch/sparc/kernel/time.c |2 +- arch/sparc64/Kconfig |3 + arch/sparc64/kernel/auxio.c |2 +- arch/sparc64/kernel/of_device.c | 238 +++- arch/sparc64/kernel/power.c |2 +- arch/sparc64/kernel/prom.c| 173 +--- arch/sparc64/kernel/time.c|2 +- drivers/Kconfig |2 + drivers/Makefile |1 + drivers/of/Kconfig|3 + drivers/of/Makefile |2 + drivers/of/base.c | 275 + drivers/of/device.c | 131 ++ drivers/of/platform.c | 96 + include/asm-powerpc/of_device.h | 22 +--- include/asm-powerpc/of_platform.h | 38 +- include/asm-powerpc/prom.h| 50 ++- include/asm-sparc/of_device.h | 49 +-- include/asm-sparc/of_platform.h | 32 + include/asm-sparc/prom.h | 62 +++-- include/asm-sparc64/of_device.h | 50 +-- include/asm-sparc64/of_platform.h | 33 + include/asm-sparc64/prom.h| 62 +++-- include/linux/of.h| 61 include/linux/of_device.h | 26 include/linux/of_platform.h | 57 33 files changed, 846 insertions(+), 1483 deletions(-) create mode 100644 drivers/of/Kconfig create mode 100644 drivers/of/Makefile create mode 100644 drivers/of/base.c create mode 100644 drivers/of/device.c create mode 100644 drivers/of/platform.c create mode 100644 include/asm-sparc/of_platform.h create mode 100644 include/asm-sparc64/of_platform.h create mode 100644 include/linux/of.h create mode 100644 include/linux/of_device.h create mode 100644 include/linux/of_platform.h -- Cheers, Stephen Rothwell[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgpuxYc81VIWj.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [updated] PHY fixed driver: rework release path and update phy_id notation
On Thu, 19 Jul 2007 03:38:04 +0400 Vitaly Bordug [EMAIL PROTECTED] wrote: device_bind_driver() error code returning has been fixed. release() function has been written, so that to free resources in correct way; the release path is now clean. Before the rework, it used to cause Device '[EMAIL PROTECTED]:1' does not have a release() function, it is broken and must be fixed. BUG: at drivers/base/core.c:104 device_release() Call Trace: [802ec380] kobject_cleanup+0x53/0x7e [802ec3ab] kobject_release+0x0/0x9 [802ecf3f] kref_put+0x74/0x81 [8035493b] fixed_mdio_register_device+0x230/0x265 [80564d31] fixed_init+0x1f/0x35 [802071a4] init+0x147/0x2fb [80223b6e] schedule_tail+0x36/0x92 [8020a678] child_rip+0xa/0x12 [80311714] acpi_ds_init_one_object+0x0/0x83 [8020705d] init+0x0/0x2fb [8020a66e] child_rip+0x0/0x12 Also changed the notation of the fixed phy definition on mdio bus to the form of speed+duplex to make it able to be used by gianfar and ucc_geth that define phy_id strictly as %d:%d and cleaned up the whitespace issues. Confused. Does the above refer to the difference between this patch and the previous version, or does it just describe this patch? Hopefully the latter, because the former isn't interesting, long-term. If is _is_ a full standalone description of this patch then it's a bit hard to follow ;) +config FIXED_MII_1000_FDX + bool Emulation for 1000M Fdx fixed PHY behavior + depends on FIXED_PHY + +config FIXED_MII_AMNT +int Number of emulated PHYs to allocate +depends on FIXED_PHY +default 1 +---help--- +Sometimes it is required to have several independent emulated +PHYs on the bus (in case of multi-eth but phy-less HW for instance). +This control will have specified number allocated for each fixed +PHY type enabled. Shouldn't these be runtime options (ie: module parameters)? ... + * Private information hoder for mii_bus tpyo. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] Add StorCenter DTS first draft.
So your plan is to prefer the device tree over the cputable, and maybe even deprecate the cputable? Nah, you are fine not putting anything, but if it's in the DT it should be correct, not 0. Else, just don't put it in the DT. Ah okay. So we should recommend to not put any of those properties into DTS files at all? If so, I'll create a patch to remove them. We use the DT to override cputable but that's mostly useful for things like pSeries where you can get some processors in compatibility mode over another one, or some virtual PVRs, and other fancy things like that where the cputable isn't very useful. Yeah, and it's a good idea to have the device tree override the cputable always, with real OF, anyway. (Well there are buggy device trees out there, of course ;-) ) Segher ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc: Add of_register_i2c_devices()
You might want to put vendor names in the compatible entries, dunno though, maybe these are cross-vendor ICs? You mean like compatible = ricoh,rs5c372a Yeah, like that. I'm not sure it is needed for these, but it won't hurt either. + strncpy(info-driver_name, i2c_devices[i].i2c_driver, KOBJ_NAME_LEN); + strncpy(info-type, i2c_devices[i].i2c_type, I2C_NAME_SIZE); Why not just strcpy(), btw? + addr = of_get_property(node, reg, len); + if (!addr || len sizeof(int) || *addr 0x) + continue; Give a warning when the addr won't fit in 16 bits? Segher ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] Treat ISI faults as read faults on classic 32-bit PowerPC
Should you really be testing VM_READ|VM_WRITE, or should it just be VM_READ? We test VM_READ | VM_WRITE | VM_EXEC in the read case below, and that is because we have no HPTE encoding to say writable but not readable or executable but not readable. Similarly we have no encoding to say writable but not executable on classic processors, so if you have just VM_WRITE set, you get a page that is readable, writable and executable. Ah yes. I thought executable requires readable, but that is with the CPU its flags, not the Linux flags. Would it be a good idea to map Linux flags to CPU flags somewhere early in this function? It might simplify some code, and things certainly would become more readable. Segher ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [updated] PHY fixed driver: rework release path and update phy_id notation
On Fri, 20 Jul 2007 11:50:39 +0400 Vitaly Bordug [EMAIL PROTECTED] wrote: On Thu, 19 Jul 2007 23:23:37 -0700 Andrew Morton wrote: On Thu, 19 Jul 2007 03:38:04 +0400 Vitaly Bordug [EMAIL PROTECTED] wrote: device_bind_driver() error code returning has been fixed. release() function has been written, so that to free resources in correct way; the release path is now clean. Before the rework, it used to cause Device '[EMAIL PROTECTED]:1' does not have a release() function, it is broken and must be fixed. BUG: at drivers/base/core.c:104 device_release() Call Trace: [802ec380] kobject_cleanup+0x53/0x7e [802ec3ab] kobject_release+0x0/0x9 [802ecf3f] kref_put+0x74/0x81 [8035493b] fixed_mdio_register_device+0x230/0x265 [80564d31] fixed_init+0x1f/0x35 [802071a4] init+0x147/0x2fb [80223b6e] schedule_tail+0x36/0x92 [8020a678] child_rip+0xa/0x12 [80311714] acpi_ds_init_one_object+0x0/0x83 [8020705d] init+0x0/0x2fb [8020a66e] child_rip+0x0/0x12 Also changed the notation of the fixed phy definition on mdio bus to the form of speed+duplex to make it able to be used by gianfar and ucc_geth that define phy_id strictly as %d:%d and cleaned up the whitespace issues. Confused. Does the above refer to the difference between this patch and the previous version, or does it just describe this patch? Hopefully the latter, because the former isn't interesting, long-term. Latter. IOW, that does mean, that mdio bus registered by this driver, now uses same naming conventioun that other PHYLIB things use. Hereby it will make it able to be used in NIC drivers other than fs_enet (and gianfar and ucc_geth are now points of interest). If is _is_ a full standalone description of this patch then it's a bit hard to follow ;) Hmm -so what are my options - change the description and resubmit? umm, I guess it's OK as-is. But it wasn't clear to me which sort of changelog it was. +config FIXED_MII_1000_FDX + bool Emulation for 1000M Fdx fixed PHY behavior + depends on FIXED_PHY + +config FIXED_MII_AMNT +int Number of emulated PHYs to allocate +depends on FIXED_PHY +default 1 +---help--- +Sometimes it is required to have several independent emulated +PHYs on the bus (in case of multi-eth but phy-less HW for instance). +This control will have specified number allocated for each fixed +PHY type enabled. Shouldn't these be runtime options (ie: module parameters)? I thought about it but this thing is more like the one that will never tend/required to change while\ configured.. Will add if you see it appropriate though. 99% of users don't compile their own kernels: their vendor will have to make this decision for them, and it sounds like any decision which they make will be wrong for some of their users? ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] of_detach_node()'s device node argument cannot be const
...since it modifies it (when it sets the OF_DETACHED flag). http://patchwork.ozlabs.org/linuxppc/patch?q=Stephen% 20Rothwellid=12212 Ah okay :-) Segher ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/2] fix showing xmon help
Milton Miller [EMAIL PROTECTED] wrote: On Jul 18, 2007, at 11:12 AM, Andreas Schwab wrote: Milton Miller [EMAIL PROTECTED] writes: case '?': - printf(help_string); + xmon_puts(help_string); break; nonstdio.h #defines printf to xmon_printf. Please add a similar line for puts, and use the define here. (It will avoid an unnecessary difference with the user space version). User space puts add a newline, which this xmon_puts doesn't. Andreas. Good point. This should be xmon_fputs #defined to fputs. milton Should we change like below? define fputs: #define fputs(str,stream) xmon_fputs(str) /* stream is ignored. */ show the help string: fputs(help_string, stdout); Best regards, Kou Ishizaki ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Possible eHEA performance issue
Michael Neuling wrote: From ehea_start_xmit in ehea_main.c we have: if (unlikely(atomic_read(pr-swqe_avail) = 1)) { spin_lock_irqsave(pr-netif_queue, flags); if (unlikely(atomic_read(pr-swqe_avail) = 1)) { pr-p_stats.queue_stopped++; netif_stop_queue(dev); pr-queue_stopped = 1; } spin_unlock_irqrestore(pr-netif_queue, flags); } Since the conditions are the same, isn't it likely that the second 'if' is going to be taken. Hence, shouldn't the second 'unlikely' hint be removed or even changed to likely? Either way, some documentation here as to why it's done this way would be useful. I assume the atomic_read is cheap compared to the spin_unlock_irqsave, so we quickly check swqe_avail before we check it again properly with the lock on so we can change some stuff. Mikey Hi Mike, good point the second if could be a likely(). The impact isn't that big because the if statement is true in the unlikely() case that the send queue is full - which doesn't happen often. Anyway we will modify this in one of the next driver versions. Thanks for the hint! Thomas ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] powerpc: mpc5200 low power mode, .globl fix
flush_data_cache doesn't need to be global, and can cause problems. Thanks to Milton Miller for noticing this. Signed-off-by: Domen Puncer [EMAIL PROTECTED] --- arch/powerpc/platforms/52xx/lite5200_sleep.S |1 - 1 file changed, 1 deletion(-) Index: work-powerpc.git/arch/powerpc/platforms/52xx/lite5200_sleep.S === --- work-powerpc.git.orig/arch/powerpc/platforms/52xx/lite5200_sleep.S +++ work-powerpc.git/arch/powerpc/platforms/52xx/lite5200_sleep.S @@ -400,7 +400,6 @@ restore_regs: * Flush data cache * Do this by just reading lots of stuff into the cache. */ -.globl flush_data_cache flush_data_cache: lis r3,[EMAIL PROTECTED] ori r3,r3,[EMAIL PROTECTED] ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/5] ehca: Supports large page MRs
From: Hoang-Nam Nguyen [EMAIL PROTECTED] Date: Thu, 19 Jul 2007 20:48:04 +0200 Subject: [PATCH 1/5] IB/ehca: Support large page MRs Add support for MR pages larger than 4K on eHCA2. This reduces firmware memory consumption. If enabled via the mr_largepage module parameter, the MR page size will be determined based on the MR length and the hardware capabilities - if the MR is = 16M, 16M pages are used, for example. Signed-off-by: Joachim Fenkes [EMAIL PROTECTED] --- drivers/infiniband/hw/ehca/ehca_classes.h |9 + drivers/infiniband/hw/ehca/ehca_main.c| 18 ++- drivers/infiniband/hw/ehca/ehca_mrmw.c| 371 - drivers/infiniband/hw/ehca/ehca_mrmw.h|2 +- drivers/infiniband/hw/ehca/hcp_if.c | 20 ++- 5 files changed, 357 insertions(+), 63 deletions(-) diff --git a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h index 043e4fb..63b8b9f 100644 --- a/drivers/infiniband/hw/ehca/ehca_classes.h +++ b/drivers/infiniband/hw/ehca/ehca_classes.h @@ -100,6 +100,11 @@ struct ehca_sport { struct ehca_sma_attr saved_attr; }; +#define HCA_CAP_MR_PGSIZE_4K 1 +#define HCA_CAP_MR_PGSIZE_64K 2 +#define HCA_CAP_MR_PGSIZE_1M 4 +#define HCA_CAP_MR_PGSIZE_16M 8 + struct ehca_shca { struct ib_device ib_device; struct ibmebus_dev *ibmebus_dev; @@ -115,6 +120,8 @@ struct ehca_shca { struct h_galpas galpas; struct mutex modify_mutex; u64 hca_cap; + /* MR pgsize: bit 0-3 means 4K, 64K, 1M, 16M respectively */ + u32 hca_cap_mr_pgsize; int max_mtu; }; @@ -206,6 +213,7 @@ struct ehca_mr { enum ehca_mr_flag flags; u32 num_kpages; /* number of kernel pages */ u32 num_hwpages;/* number of hw pages to form MR */ + u64 hwpage_size;/* hw page size used for this MR */ int acl;/* ACL (stored here for usage in reregister) */ u64 *start; /* virtual start address (stored here for */ /* usage in reregister) */ @@ -240,6 +248,7 @@ struct ehca_mr_pginfo { enum ehca_mr_pgi_type type; u64 num_kpages; u64 kpage_cnt; + u64 hwpage_size; /* hw page size used for this MR */ u64 num_hwpages; /* number of hw pages */ u64 hwpage_cnt; /* counter for hw pages */ u64 next_hwpage; /* next hw page in buffer/chunk/listelem */ diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index 36377c6..34661c3 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c @@ -63,6 +63,7 @@ int ehca_port_act_time = 30; int ehca_poll_all_eqs = 1; int ehca_static_rate = -1; int ehca_scaling_code = 0; +int ehca_mr_largepage = 0; module_param_named(open_aqp1, ehca_open_aqp1, int, 0); module_param_named(debug_level, ehca_debug_level, int, 0); @@ -72,7 +73,8 @@ module_param_named(use_hp_mr, ehca_use_hp_mr, int, 0); module_param_named(port_act_time, ehca_port_act_time, int, 0); module_param_named(poll_all_eqs, ehca_poll_all_eqs, int, 0); module_param_named(static_rate, ehca_static_rate, int, 0); -module_param_named(scaling_code, ehca_scaling_code, int, 0); +module_param_named(scaling_code, ehca_scaling_code, int, 0); +module_param_named(mr_largepage, ehca_mr_largepage, int, 0); MODULE_PARM_DESC(open_aqp1, AQP1 on startup (0: no (default), 1: yes)); @@ -95,6 +97,9 @@ MODULE_PARM_DESC(static_rate, set permanent static rate (default: disabled)); MODULE_PARM_DESC(scaling_code, set scaling code (0: disabled/default, 1: enabled)); +MODULE_PARM_DESC(mr_largepage, +use large page for MR (0: use PAGE_SIZE (default), +1: use large page depending on MR size); DEFINE_RWLOCK(ehca_qp_idr_lock); DEFINE_RWLOCK(ehca_cq_idr_lock); @@ -295,6 +300,8 @@ int ehca_sense_attributes(struct ehca_shca *shca) if (EHCA_BMASK_GET(hca_cap_descr[i].mask, shca-hca_cap)) ehca_gen_dbg( %s, hca_cap_descr[i].descr); + shca-hca_cap_mr_pgsize = rblock-memory_page_size_supported; + port = (struct hipz_query_port *)rblock; h_ret = hipz_h_query_port(shca-ipz_hca_handle, 1, port); if (h_ret != H_SUCCESS) { @@ -590,6 +597,14 @@ static ssize_t ehca_show_adapter_handle(struct device *dev, } static DEVICE_ATTR(adapter_handle, S_IRUGO, ehca_show_adapter_handle, NULL); +static ssize_t ehca_show_mr_largepage(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + return sprintf(buf, %d\n, ehca_mr_largepage); +} +static DEVICE_ATTR(mr_largepage, S_IRUGO, ehca_show_mr_largepage, NULL); + static struct attribute *ehca_dev_attrs[] = { dev_attr_adapter_handle.attr,
[PATCH 2/5] ehca: Generate event when SRQ limit reached
From: Joachim Fenkes [EMAIL PROTECTED] Date: Thu, 19 Jul 2007 20:51:43 +0200 Subject: [PATCH 2/5] IB/ehca: Generate event when SRQ limit reached Signed-off-by: Joachim Fenkes [EMAIL PROTECTED] --- drivers/infiniband/hw/ehca/ehca_irq.c | 42 ++--- 1 files changed, 28 insertions(+), 14 deletions(-) diff --git a/drivers/infiniband/hw/ehca/ehca_irq.c b/drivers/infiniband/hw/ehca/ehca_irq.c index 4fb01fc..71c0799 100644 --- a/drivers/infiniband/hw/ehca/ehca_irq.c +++ b/drivers/infiniband/hw/ehca/ehca_irq.c @@ -175,9 +175,8 @@ error_data1: } -static void qp_event_callback(struct ehca_shca *shca, - u64 eqe, - enum ib_event_type event_type) +static void qp_event_callback(struct ehca_shca *shca, u64 eqe, + enum ib_event_type event_type, int fatal) { struct ib_event event; struct ehca_qp *qp; @@ -191,16 +190,26 @@ static void qp_event_callback(struct ehca_shca *shca, if (!qp) return; - ehca_error_data(shca, qp, qp-ipz_qp_handle.handle); + if (fatal) + ehca_error_data(shca, qp, qp-ipz_qp_handle.handle); - if (!qp-ib_qp.event_handler) - return; + event.device = shca-ib_device; - event.device = shca-ib_device; - event.event = event_type; - event.element.qp = qp-ib_qp; + if (qp-ext_type == EQPT_SRQ) { + if (!qp-ib_srq.event_handler) + return; - qp-ib_qp.event_handler(event, qp-ib_qp.qp_context); + event.event = fatal ? IB_EVENT_SRQ_ERR : event_type; + event.element.srq = qp-ib_srq; + qp-ib_srq.event_handler(event, qp-ib_srq.srq_context); + } else { + if (!qp-ib_qp.event_handler) + return; + + event.event = event_type; + event.element.qp = qp-ib_qp; + qp-ib_qp.event_handler(event, qp-ib_qp.qp_context); + } return; } @@ -234,17 +243,17 @@ static void parse_identifier(struct ehca_shca *shca, u64 eqe) switch (identifier) { case 0x02: /* path migrated */ - qp_event_callback(shca, eqe, IB_EVENT_PATH_MIG); + qp_event_callback(shca, eqe, IB_EVENT_PATH_MIG, 0); break; case 0x03: /* communication established */ - qp_event_callback(shca, eqe, IB_EVENT_COMM_EST); + qp_event_callback(shca, eqe, IB_EVENT_COMM_EST, 0); break; case 0x04: /* send queue drained */ - qp_event_callback(shca, eqe, IB_EVENT_SQ_DRAINED); + qp_event_callback(shca, eqe, IB_EVENT_SQ_DRAINED, 0); break; case 0x05: /* QP error */ case 0x06: /* QP error */ - qp_event_callback(shca, eqe, IB_EVENT_QP_FATAL); + qp_event_callback(shca, eqe, IB_EVENT_QP_FATAL, 1); break; case 0x07: /* CQ error */ case 0x08: /* CQ error */ @@ -278,6 +287,11 @@ static void parse_identifier(struct ehca_shca *shca, u64 eqe) ehca_err(shca-ib_device, Interface trace stopped.); break; case 0x14: /* first error capture info available */ + ehca_info(shca-ib_device, First error capture available); + break; + case 0x15: /* SRQ limit reached */ + qp_event_callback(shca, eqe, IB_EVENT_SRQ_LIMIT_REACHED, 0); + break; default: ehca_err(shca-ib_device, Unknown identifier: %x on %s., identifier, shca-ib_device.name); -- 1.5.2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 3/5] ehca: Make ehca2ib_return_code() non-inline
From: Joachim Fenkes [EMAIL PROTECTED] Date: Thu, 19 Jul 2007 21:13:57 +0200 Subject: [PATCH 3/5] IB/ehca: Make ehca2ib_return_code() non-inline It's nowhere in the main path and making it non-inline saves ~1.5K of code. Signed-off-by: Joachim Fenkes [EMAIL PROTECTED] --- drivers/infiniband/hw/ehca/ehca_main.c | 17 + drivers/infiniband/hw/ehca/ehca_tools.h | 19 +-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index 34661c3..3bd7afb 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c @@ -130,6 +130,23 @@ void ehca_free_fw_ctrlblock(void *ptr) } #endif +int ehca2ib_return_code(u64 ehca_rc) +{ + switch (ehca_rc) { + case H_SUCCESS: + return 0; + case H_RESOURCE: /* Resource in use */ + case H_BUSY: + return -EBUSY; + case H_NOT_ENOUGH_RESOURCES: /* insufficient resources */ + case H_CONSTRAINED: /* resource constraint */ + case H_NO_MEM: + return -ENOMEM; + default: + return -EINVAL; + } +} + static int ehca_create_slab_caches(void) { int ret; diff --git a/drivers/infiniband/hw/ehca/ehca_tools.h b/drivers/infiniband/hw/ehca/ehca_tools.h index 678b813..57c77a7 100644 --- a/drivers/infiniband/hw/ehca/ehca_tools.h +++ b/drivers/infiniband/hw/ehca/ehca_tools.h @@ -154,24 +154,7 @@ extern int ehca_debug_level; #define EHCA_BMASK_GET(mask, value) \ (EHCA_BMASK_MASK(mask) (((u64)(value)) EHCA_BMASK_SHIFTPOS(mask))) - /* Converts ehca to ib return code */ -static inline int ehca2ib_return_code(u64 ehca_rc) -{ - switch (ehca_rc) { - case H_SUCCESS: - return 0; - case H_RESOURCE: /* Resource in use */ - case H_BUSY: - return -EBUSY; - case H_NOT_ENOUGH_RESOURCES: /* insufficient resources */ - case H_CONSTRAINED: /* resource constraint */ - case H_NO_MEM: - return -ENOMEM; - default: - return -EINVAL; - } -} - +int ehca2ib_return_code(u64 ehca_rc); #endif /* EHCA_TOOLS_H */ -- 1.5.2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 5/5] ehca: Support small QP queues
From: Stefan Roscher stefan.roscher at de.ibm.com Date: Fri, 20 Jul 2007 13:59:14 +0200 Subject: [PATCH 5/5] IB/ehca: Small QP queues eHCA2 supports QP queues that can be as small as 512 bytes. This greatly reduces memory overhead for consumers that use lots of QPs with small queues (e.g. RDMA-only QPs). Apart from dealing with firmware, this code needs to manage bite-sized chunks of kernel pages, making sure that no kernel page is shared between different protection domains. Signed-off-by: Hoang-Nam Nguyen [EMAIL PROTECTED] --- drivers/infiniband/hw/ehca/ehca_classes.h | 41 -- drivers/infiniband/hw/ehca/ehca_cq.c |8 +- drivers/infiniband/hw/ehca/ehca_eq.c |8 +- drivers/infiniband/hw/ehca/ehca_main.c| 14 ++- drivers/infiniband/hw/ehca/ehca_pd.c | 25 +++- drivers/infiniband/hw/ehca/ehca_qp.c | 163 +- drivers/infiniband/hw/ehca/ehca_uverbs.c |2 +- drivers/infiniband/hw/ehca/hcp_if.c | 30 +++-- drivers/infiniband/hw/ehca/ipz_pt_fn.c| 222 ++--- drivers/infiniband/hw/ehca/ipz_pt_fn.h| 26 +++- 10 files changed, 379 insertions(+), 160 deletions(-) diff --git a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h index 63b8b9f..3725aa8 100644 --- a/drivers/infiniband/hw/ehca/ehca_classes.h +++ b/drivers/infiniband/hw/ehca/ehca_classes.h @@ -43,7 +43,6 @@ #ifndef __EHCA_CLASSES_H__ #define __EHCA_CLASSES_H__ - struct ehca_module; struct ehca_qp; struct ehca_cq; @@ -129,6 +128,10 @@ struct ehca_pd { struct ib_pd ib_pd; struct ipz_pd fw_pd; u32 ownpid; + /* small queue mgmt */ + struct mutex lock; + struct list_head free[2]; + struct list_head full[2]; }; enum ehca_ext_qp_type { @@ -307,6 +310,8 @@ int ehca_init_av_cache(void); void ehca_cleanup_av_cache(void); int ehca_init_mrmw_cache(void); void ehca_cleanup_mrmw_cache(void); +int ehca_init_small_qp_cache(void); +void ehca_cleanup_small_qp_cache(void); extern rwlock_t ehca_qp_idr_lock; extern rwlock_t ehca_cq_idr_lock; @@ -324,7 +329,7 @@ struct ipzu_queue_resp { u32 queue_length; /* queue length allocated in bytes */ u32 pagesize; u32 toggle_state; - u32 dummy; /* padding for 8 byte alignment */ + u32 offset; /* save offset within a page for small_qp */ }; struct ehca_create_cq_resp { @@ -366,15 +371,29 @@ enum ehca_ll_comp_flags { LLQP_COMP_MASK = 0x60, }; +struct ehca_alloc_queue_parms { + /* input parameters */ + int max_wr; + int max_sge; + int page_size; + int is_small; + + /* output parameters */ + u16 act_nr_wqes; + u8 act_nr_sges; + u32 queue_size; /* bytes for small queues, pages otherwise */ +}; + struct ehca_alloc_qp_parms { -/* input parameters */ + struct ehca_alloc_queue_parms squeue; + struct ehca_alloc_queue_parms rqueue; + + /* input parameters */ enum ehca_service_type servicetype; + int qp_storage; int sigtype; enum ehca_ext_qp_type ext_type; enum ehca_ll_comp_flags ll_comp_flags; - - int max_send_wr, max_recv_wr; - int max_send_sge, max_recv_sge; int ud_av_l_key_ctl; u32 token; @@ -384,18 +403,10 @@ struct ehca_alloc_qp_parms { u32 srq_qpn, srq_token, srq_limit; -/* output parameters */ + /* output parameters */ u32 real_qp_num; struct ipz_qp_handle qp_handle; struct h_galpas galpas; - - u16 act_nr_send_wqes; - u16 act_nr_recv_wqes; - u8 act_nr_recv_sges; - u8 act_nr_send_sges; - - u32 nr_rq_pages; - u32 nr_sq_pages; }; int ehca_cq_assign_qp(struct ehca_cq *cq, struct ehca_qp *qp); diff --git a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/ehca_cq.c index 9e87883..5746787 100644 --- a/drivers/infiniband/hw/ehca/ehca_cq.c +++ b/drivers/infiniband/hw/ehca/ehca_cq.c @@ -190,8 +190,8 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, int comp_vector, goto create_cq_exit2; } - ipz_rc = ipz_queue_ctor(my_cq-ipz_queue, param.act_pages, - EHCA_PAGESIZE, sizeof(struct ehca_cqe), 0); + ipz_rc = ipz_queue_ctor(NULL, my_cq-ipz_queue, param.act_pages, + EHCA_PAGESIZE, sizeof(struct ehca_cqe), 0, 0); if (!ipz_rc) { ehca_err(device, ipz_queue_ctor() failed ipz_rc=%x device=%p, ipz_rc, device); @@ -285,7 +285,7 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, int comp_vector, return cq; create_cq_exit4: - ipz_queue_dtor(my_cq-ipz_queue); + ipz_queue_dtor(NULL, my_cq-ipz_queue); create_cq_exit3: h_ret = hipz_h_destroy_cq(adapter_handle, my_cq, 1); @@ -359,7 +359,7 @@ int ehca_destroy_cq(struct ib_cq *cq)
[PATCH 4/5] ehca: Make internal_create/destroy_qp() static
From: Joachim Fenkes [EMAIL PROTECTED] Date: Thu, 19 Jul 2007 21:40:00 +0200 Subject: [PATCH 4/5] IB/ehca: Make internal_{create,destroy}_qp() static They're only used in ehca_qp.c Signed-off-by: Joachim Fenkes [EMAIL PROTECTED] --- drivers/infiniband/hw/ehca/ehca_qp.c | 17 + 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c index 48e9cea..b916d9c 100644 --- a/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/drivers/infiniband/hw/ehca/ehca_qp.c @@ -363,10 +363,11 @@ init_qp_queue1: * the value of the is_srq parameter. If init_attr and srq_init_attr share * fields, the field out of init_attr is used. */ -struct ehca_qp *internal_create_qp(struct ib_pd *pd, - struct ib_qp_init_attr *init_attr, - struct ib_srq_init_attr *srq_init_attr, - struct ib_udata *udata, int is_srq) +static struct ehca_qp *internal_create_qp( + struct ib_pd *pd, + struct ib_qp_init_attr *init_attr, + struct ib_srq_init_attr *srq_init_attr, + struct ib_udata *udata, int is_srq) { struct ehca_qp *my_qp; struct ehca_pd *my_pd = container_of(pd, struct ehca_pd, ib_pd); @@ -752,8 +753,8 @@ struct ib_qp *ehca_create_qp(struct ib_pd *pd, return IS_ERR(ret) ? (struct ib_qp *)ret : ret-ib_qp; } -int internal_destroy_qp(struct ib_device *dev, struct ehca_qp *my_qp, - struct ib_uobject *uobject); +static int internal_destroy_qp(struct ib_device *dev, struct ehca_qp *my_qp, + struct ib_uobject *uobject); struct ib_srq *ehca_create_srq(struct ib_pd *pd, struct ib_srq_init_attr *srq_init_attr, @@ -1669,8 +1670,8 @@ query_srq_exit1: return ret; } -int internal_destroy_qp(struct ib_device *dev, struct ehca_qp *my_qp, - struct ib_uobject *uobject) +static int internal_destroy_qp(struct ib_device *dev, struct ehca_qp *my_qp, + struct ib_uobject *uobject) { struct ehca_shca *shca = container_of(dev, struct ehca_shca, ib_device); struct ehca_pd *my_pd = container_of(my_qp-ib_qp.pd, struct ehca_pd, -- 1.5.2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc: mpc5200 low power mode, .globl fix
On 7/20/07, Domen Puncer [EMAIL PROTECTED] wrote: flush_data_cache doesn't need to be global, and can cause problems. Thanks to Milton Miller for noticing this. Signed-off-by: Domen Puncer [EMAIL PROTECTED] Signed-off-by: Grant Likely [EMAIL PROTECTED] Paulus, can you pick this up please? --- arch/powerpc/platforms/52xx/lite5200_sleep.S |1 - 1 file changed, 1 deletion(-) Index: work-powerpc.git/arch/powerpc/platforms/52xx/lite5200_sleep.S === --- work-powerpc.git.orig/arch/powerpc/platforms/52xx/lite5200_sleep.S +++ work-powerpc.git/arch/powerpc/platforms/52xx/lite5200_sleep.S @@ -400,7 +400,6 @@ restore_regs: * Flush data cache * Do this by just reading lots of stuff into the cache. */ -.globl flush_data_cache flush_data_cache: lis r3,[EMAIL PROTECTED] ori r3,r3,[EMAIL PROTECTED] ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. [EMAIL PROTECTED] (403) 399-0195 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
PS3: Fix build with 32-bit toolchains
The PS3 bootwrapper files use instructions only available on 64-bit CPUs. Add the code generation directive '.machine ppc64' for toolchains configured for 32-bit CPUs. Signed-off-by: Geoff Levand [EMAIL PROTECTED] Acked-by: Grant Likely [EMAIL PROTECTED] --- Hi Andrew, It seems Paul is out on holiday, so I'm sending this to you. This fixes a build error in Linus' current tree for a few 32 bit powerpc platforms. It had some review on the linuxppc-dev ML, and Grant Likely reported it fixed the problem. -Geoff arch/powerpc/boot/ps3-head.S |2 ++ arch/powerpc/boot/ps3-hvcall.S |2 ++ 2 files changed, 4 insertions(+) --- a/arch/powerpc/boot/ps3-head.S +++ b/arch/powerpc/boot/ps3-head.S @@ -20,6 +20,8 @@ #include ppc_asm.h + .machine ppc64 + .text /* --- a/arch/powerpc/boot/ps3-hvcall.S +++ b/arch/powerpc/boot/ps3-hvcall.S @@ -20,6 +20,8 @@ #include ppc_asm.h + .machine ppc64 + /* * The PS3 hypervisor uses a 64 bit C language calling convention. * The routines here marshal arguments between the 32 bit wrapper ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[RFC 0/1] lro: Generic Large Receive Offload for TCP traffic
Hi, Thanks a lot for your comments so far. This generic LRO patch differs from the last one in several points. A new interface for a receive in pages mode has been added and tested with an eHEA prototype. Seems to work well. Does this extended interface seem to be sufficient? Below some more explanations: Thanks, Jan-Bernd Changes to http://www.spinics.net/lists/netdev/msg35490.html : - Interfaces are changed to allow later support for IPv6 / UDP - New interface to support receive in pages - TCP checksums are updated properly - TCP packets with push flag are aggregated now - Timestamps are now compared using after() The additional interface to support receive in pages: void lro_receive_frags(struct net_lro_mgr *lro_mgr, struct skb_frag_struct *frags, int len, int true_size, void *priv); void lro_vlan_hwaccel_receive_frags(struct net_lro_mgr *lro_mgr, struct skb_frag_struct *frags, int len, int true_size, struct vlan_group *vgrp, u16 vlan_tag, void *priv); These functions generate SKBs only for the first packet of an LRO session. The next fragment list to be aggregated will be added in the fragment list of that SKB. The reason why this is a smart approach is described in: http://www.spinics.net/lists/netdev/msg35634.html All other packets that do not match the LRO requirements are put in an SKB and sent to the stack. Packets that are received in an extra buffer (small packets) and thus not in an skb fragment can be sent by the driver to the stack after flushing the appropriate LRO sessions: void lro_flush_pkt(struct net_lro_mgr *lro_mgr, struct iphdr *iph, struct tcphdr *tcph); or void lro_flush_all(struct net_lro_mgr *lro_mgr); ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[RFC 1/1] lro: Generic Large Receive Offload for TCP traffic
Generic LRO patch Signed-off-by: Jan-Bernd Themann [EMAIL PROTECTED] --- include/linux/inet_lro.h | 154 + net/ipv4/inet_lro.c | 549 ++ 2 files changed, 703 insertions(+), 0 deletions(-) create mode 100644 include/linux/inet_lro.h create mode 100644 net/ipv4/inet_lro.c diff --git a/include/linux/inet_lro.h b/include/linux/inet_lro.h new file mode 100644 index 000..2680ecf --- /dev/null +++ b/include/linux/inet_lro.h @@ -0,0 +1,154 @@ +/* + * linux/include/linux/inet_lro.h + * + * Large Receive Offload (ipv4 / tcp) + * + * (C) Copyright IBM Corp. 2007 + * + * Authors: + * Jan-Bernd Themann [EMAIL PROTECTED] + * Christoph Raisch [EMAIL PROTECTED] + * + * + * 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, 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __INET_LRO_H_ +#define __INET_LRO_H_ + +#include net/ip.h +#include net/tcp.h + +#define LRO_IPV4 1 +#define LRO_TCP 2 + +/* + * LRO descriptor for a tcp session + */ +struct net_lro_desc { + struct sk_buff *parent; + struct sk_buff *last_skb; + struct skb_frag_struct *next_frag; + struct iphdr *iph; + struct tcphdr *tcph; + struct vlan_group *vgrp; + __wsum data_csum; + u32 tcp_rcv_tsecr; + u32 tcp_rcv_tsval; + u32 tcp_ack; + u32 tcp_next_seq; + u32 skb_tot_frags_len; + u16 ip_tot_len; + u16 tcp_saw_tstamp; /* timestamps enabled */ + u16 tcp_window; + u16 vlan_tag; + int pkt_aggr_cnt; /* counts aggregated packets */ + int vlan_packet; + int active; +}; + +/* + * Large Receive Offload (LRO) Manager + * + * Fields must be set by driver + */ + +struct net_lro_mgr { + struct net_device *dev; /* Required for receive in page mode */ + u32 ip_summed; /* Options to be set in generated SKB in page mode */ + int max_desc; /* Max number of LRO descriptors */ + int max_aggr; /* Max number of LRO packets to be aggregated */ + + struct net_lro_desc *lro_arr; /* Array of LRO descriptors */ + + /* +* Optimized driver functions +* +* get_skb_header: returns tcp and ip header for packet in SKB +*/ + int (*get_skb_header)(struct sk_buff *skb, void **ip_hdr, + void **tcpudp_hdr, u64 *hdr_flags, void *priv); + + /* +* get_frag_header: returns mac, tcp and ip header for packet in SKB +* +* @hdr_flags: Indicate what kind of LRO has to be done +* (IPv4/IPv6/TCP/UDP) +*/ + int (*get_frag_header)(struct skb_frag_struct *frag, void **mac_hdr, + void **ip_hdr, void **tcpudp_hdr, u64 *hdr_flags, + void *priv); +}; + +/* + * Processes a SKB + * + * @lro_mgr: LRO manager to use + * @skb: SKB to aggregate + * @priv: Private data that may be used by driver functions + *(for example get_tcp_ip_hdr) + */ + +void lro_receive_skb(struct net_lro_mgr *lro_mgr, +struct sk_buff *skb, +void *priv); + +/* + * Processes a SKB with VLAN HW acceleration support + */ + +void lro_vlan_hwaccel_receive_skb(struct net_lro_mgr *lro_mgr, + struct sk_buff *skb, + struct vlan_group *vgrp, + u16 vlan_tag, + void *priv); + +/* + * Processes a fragment list + * + * This functions aggregate fragments and generate SKBs do pass + * the packets to the stack. + * + * @lro_mgr: LRO manager to use + * @frags: Fragment to be processed. Must contain entire header in first + * element. + * @len: Length of received data + * @true_size: Actual size of memory the fragment is consuming + * @priv: Private data that may be used by driver functions + *(for example get_tcp_ip_hdr) + */ + +void lro_receive_frags(struct net_lro_mgr *lro_mgr, + struct skb_frag_struct *frags, + int len, int true_size, void *priv); + +void lro_vlan_hwaccel_receive_frags(struct net_lro_mgr *lro_mgr, + struct skb_frag_struct *frags, + int len, + int true_size, +
Re: [PATCH 3/4] mpc8349emitx: Add chosen node for default stdout path
Jerry Van Baren wrote: Scott Wood wrote: Kim Phillips wrote: The LIBFDT implementation replaces any existing /chosen with its fixed up version. Sort of. If /chosen doesn't exist, it creates it. If /chosen exists and force parameter is false, it doesn't touch it. If force is true, it creates or fixes up properties. The bootm command passes in force == false. The fdt command passes in force == true. The force parameter was added to sort of emulate the previous bootm command behavior (but behave better in the case where /chosen already existed). The problem is that force is node-granular, rather than property-granular -- If I add a /chosen/linux,stdout-path in the original dts (or via an fdt command), then bootm will decline to add bootargs and initrd information to the /chosen node. -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 1/3] m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible
From: Geert Uytterhoeven [EMAIL PROTECTED] m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible drivers/char/keyboard.c: In function 'kbd_keycode': drivers/char/keyboard.c:1142: error: implicit declaration of function 'mac_hid_mouse_emulate_buttons' The forward declaration of mac_hid_mouse_emulate_buttons() is not visible on m68k because it's hidden in the middle of a big #ifdef block. Move it to linux/hid.h, correct the type of the second parameter, and include linux/hid.h where needed. Signed-off-by: Geert Uytterhoeven [EMAIL PROTECTED] --- drivers/char/keyboard.c |5 + drivers/macintosh/mac_hid.c |1 + include/linux/hid.h |3 +++ 3 files changed, 5 insertions(+), 4 deletions(-) --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c @@ -41,6 +41,7 @@ #include linux/sysrq.h #include linux/input.h #include linux/reboot.h +#include linux/hid.h extern void ctrl_alt_del(void); @@ -1022,10 +1023,6 @@ static const unsigned short x86_keycodes 308,310,313,314,315,317,318,319,320,357,322,323,324,325,276,330, 332,340,365,342,343,344,345,346,356,270,341,368,369,370,371,372 }; -#ifdef CONFIG_MAC_EMUMOUSEBTN -extern int mac_hid_mouse_emulate_buttons(int, int, int); -#endif /* CONFIG_MAC_EMUMOUSEBTN */ - #ifdef CONFIG_SPARC static int sparc_l1_a_state = 0; extern void sun_do_break(void); --- a/drivers/macintosh/mac_hid.c +++ b/drivers/macintosh/mac_hid.c @@ -13,6 +13,7 @@ #include linux/sysctl.h #include linux/input.h #include linux/module.h +#include linux/hid.h static struct input_dev *emumousebtn; --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -522,6 +522,9 @@ int usbhid_quirks_init(char **quirks_par void usbhid_quirks_exit(void); void usbhid_fixup_report_descriptor(const u16, const u16, char *, unsigned, char **); +/* mac hid */ +extern int mac_hid_mouse_emulate_buttons(int, unsigned int, int); + #ifdef CONFIG_HID_FF int hid_ff_init(struct hid_device *hid); -- Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [EMAIL PROTECTED] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say programmer or something like that. -- Linus Torvalds ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 3/4] mpc8349emitx: Add chosen node for default stdout path
Scott Wood wrote: Jerry Van Baren wrote: Scott Wood wrote: Kim Phillips wrote: The LIBFDT implementation replaces any existing /chosen with its fixed up version. Sort of. If /chosen doesn't exist, it creates it. If /chosen exists and force parameter is false, it doesn't touch it. If force is true, it creates or fixes up properties. The bootm command passes in force == false. The fdt command passes in force == true. The force parameter was added to sort of emulate the previous bootm command behavior (but behave better in the case where /chosen already existed). The problem is that force is node-granular, rather than property-granular -- If I add a /chosen/linux,stdout-path in the original dts (or via an fdt command), then bootm will decline to add bootargs and initrd information to the /chosen node. -Scott Hi Scott, Yes, making force property-granular makes more sense. I'll add that to my u-boot-fdt repo. FWIIW, my original proposal (and code) was to *REMOVE* the automagic modifications of the fdt blob from the bootm command. My original proposal was to replace bootm in scripts (or in the user's fingers) with fdt chosen fdt env fdt bd_t bootm (or an appropriate combination thereof). I was shouted down. ;-) IMHO, having bootm modify the fdt blob is a poor practice. Bootm's mandate is to boot an image from memory, it *shouldn't* be to rewrite the fdt blob. Unfortunately, we had an existing practice (poor, IMHO) of having bootm rewrite the fdt blob and so the current implementation was done to meet the user expectation of bootm just working without needing to add fdt xyz before the bootm command. gvb (wipes the foamy spit off his face) ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [updated] PHY fixed driver: rework release path and update phy_id notation
On Fri, Jul 20, 2007 at 12:57:02AM -0700, Andrew Morton wrote: On Fri, 20 Jul 2007 11:50:39 +0400 Vitaly Bordug [EMAIL PROTECTED] wrote: On Thu, 19 Jul 2007 23:23:37 -0700 Andrew Morton wrote: Shouldn't these be runtime options (ie: module parameters)? I thought about it but this thing is more like the one that will never tend/required to change while\ configured.. Will add if you see it appropriate though. 99% of users don't compile their own kernels: their vendor will have to make this decision for them, and it sounds like any decision which they make will be wrong for some of their users? This is mostly of use on embedded hardware where the kernel will be rebuilt by someone who knows the hardware... That said, I don't see why it needs to be configured at all. Couldn't it use an idr table instead? -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [patch 1/3] m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible
Hi Geert, On 7/20/07, Geert Uytterhoeven [EMAIL PROTECTED] wrote: From: Geert Uytterhoeven [EMAIL PROTECTED] m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible drivers/char/keyboard.c: In function 'kbd_keycode': drivers/char/keyboard.c:1142: error: implicit declaration of function 'mac_hid_mouse_emulate_buttons' The forward declaration of mac_hid_mouse_emulate_buttons() is not visible on m68k because it's hidden in the middle of a big #ifdef block. Move it to linux/hid.h, correct the type of the second parameter, and include linux/hid.h where needed. linux/hid.h contains definitions needed for drivers speaking HID protocol, I don't think we want to put quirks for legacy keyboard driver there. I'd just move the #ifdef within drivers/char/keyboard.c for now. BTW, I don't think that mac button emulation will work well when x86 evdev-based driver gains popularity - it grabs the device and so no event will flow through keyboard driver... We'd need a new solution... -- Dmitry ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 04/14] spufs: add spu stats in sysfs and ctx stat file in spufs
On Fri, 20 Jul 2007 15:21:15 +1000 Jeremy Kerr [EMAIL PROTECTED] wrote: This patch exports per-context statistics in spufs as long as spu statistics in sysfs. It was formed by merging: spufs: add spu stats in sysfs From: Christoph Hellwig spufs: add stat file to spufs From: Christoph Hellwig spufs: fix libassist accounting From: Jeremy Kerr spusched: fix spu utilization statistics From: Luke Browning And some adjustments by myself, after suggestions on cbe-oss-dev. Having separate patches was making the review process harder than it should, as we end up integrating spus and ctx statistics accounting much more than it was on the first implementation. I hit some rejects here due to Maynard Johnson and Bob Nelson's oprofile patches. It was relatively simple to fix up, but there may of course be clashes in intent as well, so please check it all over carefully when it lands in mainline. I'll get all the ps3/spufs/etc stuff into Linus later today. And what's up with all these powerpc people sending out patchbombs after the merge window has opened? Formally, _all_ of this: oprofile-enable-spu-switch-notification-to-detect-currently-active-spu-tasks.patch oprofile-add-support-to-oprofile-for-profiling-cell-be-spus.patch ps3-disk-storage-driver.patch ps3-disk-storage-driver-use-correct-bio-vector-size.patch ps3-disk-storage-driver-updates-after-final-review.patch ps3-bd-dvd-cd-rom-storage-driver.patch ps3-bd-dvd-cd-rom-storage-driver-updates-after-final-review.patch ps3-flash-rom-storage-driver.patch ps3-flash-rom-storage-driver-updates-after-final-review.patch ps3-fix-build-with-32-bit-toolchains.patch ps3fb-enable-vt_hw_console_binding-for-proper-kexec.patch ps3fb-shrink-default-virtual-frame-buffer-size-from-18-to-9-mib.patch ps3fb-set-fbinfo_reads_fast-to-speed-up-text-console-scrolling.patch spufs-avoid-unexpectedly-restaring-mfc-during-context-save.patch spufs-make-signal-notification-files-readonly-for-nosched-contexts.patch spufs-remove-spurious-warn_on-for-spu_deactivate-for-nosched-contexts.patch spufs-add-spu-stats-in-sysfs-and-ctx-stat-file-in-spufs.patch spufs-make-sure-context-are-scheduled-again-after-spu_acquire_saved.patch spufs-fix-array-size-of-channel-index.patch spufs-remove-needless-context-save-restore-code.patch spufs-fix-decr_status-meanings.patch spufs-fix-read-and-write-for-decr_status-file.patch spufs-limit-saving-mfc_cntl-bits.patch spufs-dont-halt-decrementer-at-restore-step-47.patch spufs-change-decrementer-restore-timing.patch spufs-remove-unused-file-argument-from-spufs_run_spu.patch spufs-use-find_first_bit-instead-of-sched_find_first_bit.patch should be pushed back into 2.6.24 because it all arrived too late. I guess you're all doing that to Paul on a regular basis. Bad. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 04/14] spufs: add spu stats in sysfs and ctx stat file in spufs
Andrew Morton wrote: And what's up with all these powerpc people sending out patchbombs after the merge window has opened? Formally, _all_ of this: I can't speak for the ones you listed, but in my case, I had people asking about the patches and posting conflicting things, so I wanted to get it out for review. I had no real expectation of it making it into 2.6.23. -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 0/6] 85xxCDS: MPC8548CDS Updates and Bug Fixes
Greetings, This patch series contains updates to the MPC8548CDS DTS and fixes several PCI-related bugs. I'm not 100% sure the DTS changes are in the proper form, so I'd appreciate any corrections. Note that some of these patches have been posted previously. These patches are based on Kumar's for_paulus branch. Thanks, Randy Vinson ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/6] 85xxCDS: Skip the fake PCI bridge (FPGA)
From 83bfbe730b1fad2ac9b22d33990e7378d920e844 Mon Sep 17 00:00:00 2001 From: Randy Vinson [EMAIL PROTECTED] Date: Fri, 20 Jul 2007 11:18:26 -0700 Subject: [PATCH] 85xxCDS: Skip the fake PCI bridge (FPGA) The 85xxCDS has an FPGA that incorrectly appears as a PCI-to-PCI bridge. This patch adds a fixup routine that will skip the bridge. With the fixup in place, the existing exclude routine is no longer needed. Note: This code was originally part of a larger patch posted by Andy Fleming. The original patch also contained changes which handled the 85xx PCI Express host bridge. The host bridge changes have been submitted in a new form, but the FPGA changes in this patch were lost in the process. Signed-off-by Randy Vinson [EMAIL PROTECTED] --- arch/powerpc/kernel/pci_32.c | 13 - arch/powerpc/platforms/85xx/mpc85xx_cds.c | 16 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index bfcfa14..05c2ebd 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c @@ -80,7 +80,18 @@ fixup_cpc710_pci64(struct pci_dev* dev) dev-resource[1].start = dev-resource[1].end = 0; dev-resource[1].flags = 0; } -DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM,PCI_DEVICE_ID_IBM_CPC710_PCI64, fixup_cpc710_pci64); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CPC710_PCI64, fixup_cpc710_pci64); + +static void __devinit skip_fake_bridge(struct pci_dev *dev) +{ + /* Make it an error to skip the fake bridge +* in pci_setup_device() in probe.c */ + dev-hdr_type = 0x7f; +} +DECLARE_PCI_FIXUP_EARLY(0x1957, 0x3fff, skip_fake_bridge); +DECLARE_PCI_FIXUP_EARLY(0x3fff, 0x1957, skip_fake_bridge); +DECLARE_PCI_FIXUP_EARLY(0xff3f, 0x5719, skip_fake_bridge); + static void pcibios_fixup_resources(struct pci_dev *dev) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 2539bb5..8046acb 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c @@ -53,21 +53,6 @@ static volatile u8 *cadmus; #ifdef CONFIG_PCI -#define ARCADIA_HOST_BRIDGE_IDSEL 17 -#define ARCADIA_2ND_BRIDGE_IDSEL 3 - -static int mpc85xx_exclude_device(struct pci_controller *hose, - u_char bus, u_char devfn) -{ - /* We explicitly do not go past the Tundra 320 Bridge */ - if ((bus == 1) (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL)) - return PCIBIOS_DEVICE_NOT_FOUND; - if ((bus == 0) (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL)) - return PCIBIOS_DEVICE_NOT_FOUND; - else - return PCIBIOS_SUCCESSFUL; -} - static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev) { u_char c; @@ -226,7 +211,6 @@ static void __init mpc85xx_cds_setup_arch(void) fsl_add_bridge(np, 1); } ppc_md.pci_irq_fixup = mpc85xx_cds_pci_irq_fixup; - ppc_md.pci_exclude_device = mpc85xx_exclude_device; #endif } -- 1.5.2.2.549.gaeb59 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 3/6] 85xxCDS: Make sure restart resets the PCI bus.
From 5397a82c878055ead34070993acd89dd0d824a52 Mon Sep 17 00:00:00 2001 From: Randy Vinson [EMAIL PROTECTED](none) Date: Fri, 23 Mar 2007 15:43:37 -0700 Subject: [PATCH] 85xxCDS: Make sure restart resets the PCI bus. The current 85xxCDS restart code fails to reset the PCI bus which can lead to odd behavior after the restart. This patch uses the VIA Super Southbridge to perform a PCI reset which will reset the entire system. NOTE: Since the VIA chip is behind a PCI-to-PCI bridge which can be disabled with a switch setting, it may not be possible to perform the PCI bus reset. In this case, the code defaults to the previous restart mechanism. Signed-off-by: Randy Vinson [EMAIL PROTECTED] --- arch/powerpc/platforms/85xx/mpc85xx_cds.c | 35 + 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 1db6c81..78e5355 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c @@ -54,6 +54,37 @@ static volatile u8 *cadmus; #ifdef CONFIG_PCI +static void mpc85xx_cds_restart(char *cmd) +{ + struct pci_dev *dev; + u_char tmp; + + if ((dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, + NULL))) { + + /* Use the VIA Super Southbridge to force a PCI reset */ + pci_read_config_byte(dev, 0x47, tmp); + pci_write_config_byte(dev, 0x47, tmp | 1); + + /* Flush the outbound PCI write queues */ + pci_read_config_byte(dev, 0x47, tmp); + + /* +* At this point, the harware reset should have triggered. +* However, if it doesn't work for some mysterious reason, +* just fall through to the default reset below. +*/ + + pci_dev_put(dev); + } + + /* +* If we can't find the VIA chip (maybe the P2P bridge is disabled) +* or the VIA chip reset didn't work, just use the default reset. +*/ + mpc85xx_restart(NULL); +} + static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev) { u_char c; @@ -278,7 +309,11 @@ define_machine(mpc85xx_cds) { .init_IRQ = mpc85xx_cds_pic_init, .show_cpuinfo = mpc85xx_cds_show_cpuinfo, .get_irq= mpic_get_irq, +#ifdef CONFIG_PCI + .restart= mpc85xx_cds_restart, +#else .restart= mpc85xx_restart, +#endif .calibrate_decr = generic_calibrate_decr, .progress = udbg_progress, }; -- 1.5.2.2.549.gaeb59 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 2/6] 85xxCDS: Allow 8259 cascade to share an MPIC interrupt line.
From c9e25f41ca444d77f5527c1442550e70c46b9383 Mon Sep 17 00:00:00 2001 From: Randy Vinson [EMAIL PROTECTED] Date: Wed, 6 Jun 2007 16:26:15 -0700 Subject: [PATCH] 85xxCDS: Allow 8259 cascade to share an MPIC interrupt line. The Freescale MPC8555CDS and MPC8548CDS reference hardware has a legacy 8259 interrupt controller pair contained within a VIA VT82C686B Southbridge on the main carrier board. The processor complex plugs into the carrier card using a PCI slot which limits the available interrupts to the INTA-INTD PCI interrupts. The output of the 8259 cascade pair is routed through a gate array and connected to the PCI INTA interrupt line. The normal interrupt chaining hook (set_irq_chained_handler) does not allow sharing of the chained interrupt which prevents the use of PCI INTA by PCI devices. This patch allows the 8259 cascade pair to share their interrupt line with PCI devices. NOTE: The addition of the .end routine for the MPIC is not strictly necessary for this patch. It's there so this code will run from within the threaded interrupt context used by the Real Time patch. Signed-off-by: Randy Vinson [EMAIL PROTECTED] --- arch/powerpc/platforms/85xx/Kconfig |1 + arch/powerpc/platforms/85xx/mpc85xx_cds.c | 37 arch/powerpc/sysdev/mpic.c|1 + 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index 526ddde..e771d19 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig @@ -18,6 +18,7 @@ config MPC8560_ADS config MPC85xx_CDS bool Freescale MPC85xx CDS select DEFAULT_UIMAGE + select PPC_I8259 help This option enables support for the MPC85xx CDS board diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 8046acb..1db6c81 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c @@ -24,6 +24,7 @@ #include linux/seq_file.h #include linux/initrd.h #include linux/module.h +#include linux/interrupt.h #include linux/fsl_devices.h #include asm/system.h @@ -94,16 +95,30 @@ static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev) } #ifdef CONFIG_PPC_I8259 -#warning The i8259 PIC support is currently broken -static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc) +static void mpc85xx_8259_cascade_handler(unsigned int irq, +struct irq_desc *desc) { unsigned int cascade_irq = i8259_irq(); if (cascade_irq != NO_IRQ) + /* handle an interrupt from the 8259 */ generic_handle_irq(cascade_irq); - desc-chip-eoi(irq); + /* check for any interrupts from the shared IRQ line */ + handle_fasteoi_irq(irq, desc); } + +static irqreturn_t mpc85xx_8259_cascade_action(int irq, void *dev_id) +{ + return IRQ_HANDLED; +} + +static struct irqaction mpc85xxcds_8259_irqaction = { + .handler = mpc85xx_8259_cascade_action, + .flags = IRQF_SHARED, + .mask = CPU_MASK_NONE, + .name = 8259 cascade, +}; #endif /* PPC_I8259 */ #endif /* CONFIG_PCI */ @@ -112,7 +127,7 @@ static void __init mpc85xx_cds_pic_init(void) struct mpic *mpic; struct resource r; struct device_node *np = NULL; -#ifdef CONFIG_PPC_I8259 +#if defined(CONFIG_PPC_I8259) defined(CONFIG_PCI) struct device_node *cascade_node = NULL; int cascade_irq; #endif @@ -140,7 +155,7 @@ static void __init mpc85xx_cds_pic_init(void) mpic_init(mpic); -#ifdef CONFIG_PPC_I8259 +#if defined(CONFIG_PPC_I8259) defined(CONFIG_PCI) /* Initialize the i8259 controller */ for_each_node_by_type(np, interrupt-controller) if (of_device_is_compatible(np, chrp,iic)) { @@ -162,7 +177,17 @@ static void __init mpc85xx_cds_pic_init(void) i8259_init(cascade_node, 0); of_node_put(cascade_node); - set_irq_chained_handler(cascade_irq, mpc85xx_8259_cascade); + /* +* Hook the interrupt to make sure desc-action is never NULL. +* This is required to ensure that the interrupt does not get +* disabled when the last user of the shared IRQ line frees their +* interrupt. +*/ + if (setup_irq(cascade_irq, mpc85xxcds_8259_irqaction)) + printk(KERN_ERR Failed to setup cascade interrupt\n); + else + /* Success. Connect our low-level cascade handler. */ + set_irq_handler(cascade_irq, mpc85xx_8259_cascade_handler); #endif /* CONFIG_PPC_I8259 */ } diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 75aad38..14e3d1d 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c @@ -836,6 +836,7 @@ static struct irq_chip mpic_irq_chip = { .mask = mpic_mask_irq,
Re: [patch 1/3] m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible
On Fri, Jul 20, 2007 at 01:47:36PM -0400, Dmitry Torokhov wrote: Hi Geert, On 7/20/07, Geert Uytterhoeven [EMAIL PROTECTED] wrote: From: Geert Uytterhoeven [EMAIL PROTECTED] m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible drivers/char/keyboard.c: In function 'kbd_keycode': drivers/char/keyboard.c:1142: error: implicit declaration of function 'mac_hid_mouse_emulate_buttons' The forward declaration of mac_hid_mouse_emulate_buttons() is not visible on m68k because it's hidden in the middle of a big #ifdef block. Move it to linux/hid.h, correct the type of the second parameter, and include linux/hid.h where needed. linux/hid.h contains definitions needed for drivers speaking HID protocol, I don't think we want to put quirks for legacy keyboard driver there. I'd just move the #ifdef within drivers/char/keyboard.c for now. ... If you only move it you will keep the bug of the wrong second parameter. But if you move it to any header file gcc is able to figure out such errors itself instead of them being nasty runtime errors. Such prototypes in C files are really bad since (like in this case) they prevent the finding of bugs. It doesn't matter which header file you put the prototype into (it can even be a new one), but it belongs into a header file. Dmitry cu Adrian -- Is there not promise of rain? Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. Only a promise, Lao Er said. Pearl S. Buck - Dragon Seed ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 5/6] 85xxCDS: Misc 8548 PCI Corrections.
From cf18185b4e201ff45f2e2a948103dd3dc088c046 Mon Sep 17 00:00:00 2001 From: Randy Vinson [EMAIL PROTECTED] Date: Thu, 19 Jul 2007 10:40:53 -0700 Subject: [PATCH] 85xxCDS: Misc 8548 PCI Corrections. Setting the host bridge @8000 as primary and only calling setup_pci_atmu for the PCI Express host bridge. Also fixing a bug in setting the USB interrupt numbers. Signed-off-by: Randy Vinson [EMAIL PROTECTED] --- arch/powerpc/platforms/85xx/mpc85xx_cds.c |8 arch/powerpc/sysdev/fsl_pci.c |3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 963c6f8..862f394 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c @@ -114,7 +114,7 @@ static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev) /* There are two USB controllers. * Identify them by functon number */ - if (PCI_FUNC(dev-devfn)) + if (PCI_FUNC(dev-devfn) == 3) dev-irq = 11; else dev-irq = 10; @@ -272,10 +272,10 @@ static void __init mpc85xx_cds_setup_arch(void) for (np = NULL; (np = of_find_node_by_type(np, pci)) != NULL;) { struct resource rsrc; of_address_to_resource(np, 0, rsrc); - if ((rsrc.start 0xf) == 0x9000) - fsl_add_bridge(np, 0); - else + if ((rsrc.start 0xf) == 0x8000) fsl_add_bridge(np, 1); + else + fsl_add_bridge(np, 0); } ppc_md.pci_irq_fixup = mpc85xx_cds_pci_irq_fixup; #endif diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 2eefcde..931e212 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c @@ -195,7 +195,8 @@ int __init fsl_add_bridge(struct device_node *dev, int is_primary) pci_process_bridge_OF_ranges(hose, dev, is_primary); /* Setup PEX window registers */ - setup_pci_atmu(hose, rsrc); + if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) + setup_pci_atmu(hose, rsrc); return 0; } -- 1.5.2.2.549.gaeb59 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 6/6] 85xxCDS: MPC8548 DTS cleanup.
From 5d2f1e916b0a88538370f93e8c58691ba3a57d92 Mon Sep 17 00:00:00 2001 From: Randy Vinson [EMAIL PROTECTED] Date: Tue, 17 Jul 2007 16:37:12 -0700 Subject: [PATCH] 85xxCDS: MPC8548 DTS cleanup. Added the P2P bridge present on the Arcadia base board and moved the VIA Southbridge behind the bridge to reflect its actual position in the bus organization. Added the RTC that's in the VIA Southbridge and expanded the ranges array for the SOC node to allow proper address translation of the RTC registers. Signed-off-by: Randy Vinson [EMAIL PROTECTED] --- arch/powerpc/boot/dts/mpc8548cds.dts | 120 - 1 files changed, 87 insertions(+), 33 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts index c241e4f..2c6fd63 100644 --- a/arch/powerpc/boot/dts/mpc8548cds.dts +++ b/arch/powerpc/boot/dts/mpc8548cds.dts @@ -44,8 +44,14 @@ #size-cells = 1; #interrupt-cells = 2; device_type = soc; - ranges = 0 e000 0010; - reg = e000 0010; // CCSRBAR 1M + ranges = 1000 e0001000 000ff000 + 8000 8000 1000 + e200 e200 0080 + 9000 9000 1000 + e280 e280 0080 + a000 a000 2000 + e300 e300 0100; + reg = e000 1000; // CCSRBAR bus-frequency = 0; [EMAIL PROTECTED] { @@ -183,8 +189,8 @@ fsl,has-rstcr; }; - pci1: [EMAIL PROTECTED] { - interrupt-map-mask = 1f800 0 0 7; + [EMAIL PROTECTED] { + interrupt-map-mask = f800 0 0 7; interrupt-map = /* IDSEL 0x4 (PCIX Slot 2) */ 02000 0 0 1 mpic 0 1 @@ -244,19 +250,7 @@ 0E000 0 0 1 mpic 0 1 0E000 0 0 2 mpic 1 1 0E000 0 0 3 mpic 2 1 - 0E000 0 0 4 mpic 3 1 - - /* bus 1 , idsel 0x2 Tsi310 bridge secondary */ - 11000 0 0 1 mpic 2 1 - 11000 0 0 2 mpic 3 1 - 11000 0 0 3 mpic 0 1 - 11000 0 0 4 mpic 1 1 - - /* VIA chip */ - 12000 0 0 1 mpic 0 1 - 12000 0 0 2 mpic 1 1 - 12000 0 0 3 mpic 2 1 - 12000 0 0 4 mpic 3 1; + 0E000 0 0 4 mpic 3 1; interrupt-parent = mpic; interrupts = 18 2; @@ -271,18 +265,78 @@ compatible = fsl,mpc8540-pcix, fsl,mpc8540-pci; device_type = pci; - [EMAIL PROTECTED] { - clock-frequency = 0; - interrupt-controller; - device_type = interrupt-controller; - reg = 12000 0 0 0 1; - #address-cells = 0; - #interrupt-cells = 2; - built-in; - compatible = chrp,iic; - big-endian; - interrupts = 1; - interrupt-parent = pci1; + [EMAIL PROTECTED] { + interrupt-map-mask = f800 0 0 7; + interrupt-map = + + /* IDSEL 0x00 (PrPMC Site) */ + 0 0 1 mpic 0 1 + 0 0 2 mpic 1 1 + 0 0 3 mpic 2 1 + 0 0 4 mpic 3 1 + + /* IDSEL 0x04 (VIA chip) */ + 2000 0 0 1 mpic 0 1 + 2000 0 0 2 mpic 1 1 + 2000 0 0 3 mpic 2 1 + 2000 0 0 4 mpic 3 1 + + /* IDSEL 0x05 (8139) */ + 2800 0 0 1 mpic 1 1 + + /* IDSEL 0x06 (Slot 6) */ + 3000 0 0 1 mpic 2 1 + 3000 0 0 2 mpic 3 1 + 3000 0 0 3 mpic 0 1 + 3000 0 0 4 mpic 1 1 + +
Re: [patch 1/3] m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible
On Fri, Jul 20, 2007 at 02:51:02PM -0400, Dmitry Torokhov wrote: On 7/20/07, Adrian Bunk [EMAIL PROTECTED] wrote: On Fri, Jul 20, 2007 at 01:47:36PM -0400, Dmitry Torokhov wrote: Hi Geert, On 7/20/07, Geert Uytterhoeven [EMAIL PROTECTED] wrote: From: Geert Uytterhoeven [EMAIL PROTECTED] m68k/mac: Make mac_hid_mouse_emulate_buttons() declaration visible drivers/char/keyboard.c: In function 'kbd_keycode': drivers/char/keyboard.c:1142: error: implicit declaration of function 'mac_hid_mouse_emulate_buttons' The forward declaration of mac_hid_mouse_emulate_buttons() is not visible on m68k because it's hidden in the middle of a big #ifdef block. Move it to linux/hid.h, correct the type of the second parameter, and include linux/hid.h where needed. linux/hid.h contains definitions needed for drivers speaking HID protocol, I don't think we want to put quirks for legacy keyboard driver there. I'd just move the #ifdef within drivers/char/keyboard.c for now. ... If you only move it you will keep the bug of the wrong second parameter. But if you move it to any header file gcc is able to figure out such errors itself instead of them being nasty runtime errors. Such prototypes in C files are really bad since (like in this case) they prevent the finding of bugs. It doesn't matter which header file you put the prototype into (it can even be a new one), but it belongs into a header file. I am OK with adding a new header file. I was just saying that placing that declaration in linux/hid.h makes about the same sense as putting it into linux/scsi.h scsi.h would also be fine with me. ;-) Are you making a patch or should I send one? [1] Dmitry cu Adrian [1] for a new header file, not scsi.h -- Is there not promise of rain? Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. Only a promise, Lao Er said. Pearl S. Buck - Dragon Seed ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 6/6] 85xxCDS: MPC8548 DTS cleanup.
Randy Vinson wrote: diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts index c241e4f..2c6fd63 100644 --- a/arch/powerpc/boot/dts/mpc8548cds.dts +++ b/arch/powerpc/boot/dts/mpc8548cds.dts @@ -44,8 +44,14 @@ #size-cells = 1; #interrupt-cells = 2; device_type = soc; - ranges = 0 e000 0010; - reg = e000 0010; // CCSRBAR 1M + ranges = 1000 e0001000 000ff000 + 8000 8000 1000 + e200 e200 0080 + 9000 9000 1000 + e280 e280 0080 + a000 a000 2000 + e300 e300 0100; + reg = e000 1000; // CCSRBAR bus-frequency = 0; Instead of duplicating all of these ranges, might we want to move the PCI node out of the SOC node, and include a phandle a PCI control node under the SOC (similar to the PQ2 /chipselect node in my patchset)? -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/2] OProfile - Enable SPU switch notification to detect currently active SPU tasks - update
From: Maynard Johnson [EMAIL PROTECTED] This patch adds to the capability of spu_switch_event_register so that the caller is also notified of currently active SPU tasks. Exports spu_switch_event_register and spu_switch_event_unregister so that OProfile can get access to the notifications provided. Signed-off-by: Maynard Johnson [EMAIL PROTECTED] Signed-off-by: Carl Love [EMAIL PROTECTED] Signed-off-by: Bob Nelson [EMAIL PROTECTED] Acked-by: Arnd Bergmann [EMAIL PROTECTED] Acked-by: Paul Mackerras [EMAIL PROTECTED] --- We would like this patch included in -mm and 2.6.23 Changed for (node = 0; node MAX_NUMNODES; node++) loop to for_each_online_node(node). Added comment to memory barrier. Better info in changelog. Index: powerpc.git/arch/powerpc/platforms/cell/spufs/sched.c === --- powerpc.git.orig/arch/powerpc/platforms/cell/spufs/sched.c +++ powerpc.git/arch/powerpc/platforms/cell/spufs/sched.c @@ -204,21 +204,51 @@ static void spu_remove_from_active_list( static BLOCKING_NOTIFIER_HEAD(spu_switch_notifier); -static void spu_switch_notify(struct spu *spu, struct spu_context *ctx) +void spu_switch_notify(struct spu *spu, struct spu_context *ctx) { blocking_notifier_call_chain(spu_switch_notifier, ctx ? ctx-object_id : 0, spu); } +static void notify_spus_active(void) +{ + int node; + + /* +* Wake up the active spu_contexts. +* +* When the awakened processes see their notify_active flag is set, +* they will call spu_switch_notify(); +*/ + for_each_online_node(node) { + struct spu *spu; + mutex_lock(spu_prio-active_mutex[node]); + list_for_each_entry(spu, spu_prio-active_list[node], list) { + struct spu_context *ctx = spu-ctx; + set_bit(SPU_SCHED_NOTIFY_ACTIVE, ctx-sched_flags); + mb(); /* make sure any tasks woken up below */ + /* can see the bit(s) set above */ + wake_up_all(ctx-stop_wq); + } + mutex_unlock(spu_prio-active_mutex[node]); + } +} + int spu_switch_event_register(struct notifier_block * n) { - return blocking_notifier_chain_register(spu_switch_notifier, n); + int ret; + ret = blocking_notifier_chain_register(spu_switch_notifier, n); + if (!ret) + notify_spus_active(); + return ret; } +EXPORT_SYMBOL_GPL(spu_switch_event_register); int spu_switch_event_unregister(struct notifier_block * n) { return blocking_notifier_chain_unregister(spu_switch_notifier, n); } +EXPORT_SYMBOL_GPL(spu_switch_event_unregister); /** * spu_bind_context - bind spu context to physical spu Index: powerpc.git/arch/powerpc/platforms/cell/spufs/spufs.h === --- powerpc.git.orig/arch/powerpc/platforms/cell/spufs/spufs.h +++ powerpc.git/arch/powerpc/platforms/cell/spufs/spufs.h @@ -53,6 +53,11 @@ enum spuctx_execution_state { SPUCTX_UTIL_MAX }; +/* ctx-sched_flags */ +enum { + SPU_SCHED_NOTIFY_ACTIVE, +}; + struct spu_context { struct spu *spu; /* pointer to a physical SPU */ struct spu_state csa; /* SPU context save area. */ @@ -231,6 +236,7 @@ void spu_acquire_saved(struct spu_contex int spu_activate(struct spu_context *ctx, unsigned long flags); void spu_deactivate(struct spu_context *ctx); void spu_yield(struct spu_context *ctx); +void spu_switch_notify(struct spu *spu, struct spu_context *ctx); void spu_set_timeslice(struct spu_context *ctx); void spu_update_sched_info(struct spu_context *ctx); void __spu_update_sched_info(struct spu_context *ctx); Index: powerpc.git/arch/powerpc/platforms/cell/spufs/run.c === --- powerpc.git.orig/arch/powerpc/platforms/cell/spufs/run.c +++ powerpc.git/arch/powerpc/platforms/cell/spufs/run.c @@ -18,15 +18,17 @@ void spufs_stop_callback(struct spu *spu wake_up_all(ctx-stop_wq); } -static inline int spu_stopped(struct spu_context *ctx, u32 * stat) +static inline int spu_stopped(struct spu_context *ctx, u32 *stat) { struct spu *spu; u64 pte_fault; *stat = ctx-ops-status_read(ctx); - if (ctx-state != SPU_STATE_RUNNABLE) - return 1; + spu = ctx-spu; + if (ctx-state != SPU_STATE_RUNNABLE || + test_bit(SPU_SCHED_NOTIFY_ACTIVE, ctx-sched_flags)) + return 1; pte_fault = spu-dsisr (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED); return (!(*stat SPU_STATUS_RUNNING) || pte_fault || spu-class_0_pending) ? @@ -124,7 +126,7 @@ out: return ret; } -static int spu_run_init(struct spu_context *ctx, u32 * npc) +static int spu_run_init(struct
Re: [PATCH 04/14] spufs: add spu stats in sysfs and ctx stat file in spufs
On Friday 20 July 2007, Andrew Morton wrote: And what's up with all these powerpc people sending out patchbombs after the merge window has opened? Formally, _all_ of this: ... should be pushed back into 2.6.24 because it all arrived too late. I guess you're all doing that to Paul on a regular basis. Bad. Yes, I'm particularly bad at this usually. However, for the ps3 drivers and oprofile, the problem was really miscommunication about who gets to merge what first, because there were interdependencies with other subsystems: Paul wanted to have that code merged through other subsystems maintainers, which for different reasons just did not happen at first. The spufs patches mostly basically fixes that came up after all the other spufs code got merged. I'm also still sitting on the fixes (and two new drivers) that I submitted to you earlier this week, and asked Linus to pull consequently. My plan was to ask Linus again for merging them today, together with Jeremy's spufs patches and the updated oprofile stuff and another patch from Christoph. Would you prefer me to discard my new git tree and only ask him to pull what I had last week instead. Just trying to find out how to avoid merge conflicts on this. Arnd ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 04/14] spufs: add spu stats in sysfs and ctx stat file in spufs
On Friday 20 July 2007, Andrew Morton wrote: And what's up with all these powerpc people sending out patchbombs after the merge window has opened? Formally, _all_ of this: ... should be pushed back into 2.6.24 because it all arrived too late. I guess you're all doing that to Paul on a regular basis. Bad. Yes, I'm particularly bad at this usually. However, for the ps3 drivers and oprofile, the problem was really miscommunication about who gets to merge what first, because there were interdependencies with other subsystems: Paul wanted to have that code merged through other subsystems maintainers, which for different reasons just did not happen at first. The spufs patches mostly basically fixes that came up after all the other spufs code got merged. I'm also still sitting on the fixes (and two new drivers) that I submitted to you earlier this week, and asked Linus to pull consequently. My plan was to ask Linus again for merging them today, together with Jeremy's spufs patches and the oprofile stuff and another patch from Christoph. Would you prefer me not to do that but to instead just push out the patches I have queued myself? Arnd ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 1/2] OProfile - Enable SPU switch notification to detect currently active SPU tasks - update
On Fri, 20 Jul 2007 14:24:07 -0500 Bob Nelson [EMAIL PROTECTED] wrote: From: Maynard Johnson [EMAIL PROTECTED] This patch adds to the capability of spu_switch_event_register so that the caller is also notified of currently active SPU tasks. Exports spu_switch_event_register and spu_switch_event_unregister so that OProfile can get access to the notifications provided. Signed-off-by: Maynard Johnson [EMAIL PROTECTED] Signed-off-by: Carl Love [EMAIL PROTECTED] Signed-off-by: Bob Nelson [EMAIL PROTECTED] Acked-by: Arnd Bergmann [EMAIL PROTECTED] Acked-by: Paul Mackerras [EMAIL PROTECTED] --- We would like this patch included in -mm and 2.6.23 Changed for (node = 0; node MAX_NUMNODES; node++) loop to for_each_online_node(node). Added comment to memory barrier. Better info in changelog. here it is: --- a/arch/powerpc/platforms/cell/spufs/sched.c~oprofile-enable-spu-switch-notification-to-detect-currently-active-spu-tasks-update +++ a/arch/powerpc/platforms/cell/spufs/sched.c @@ -220,13 +220,14 @@ static void notify_spus_active(void) * When the awakened processes see their notify_active flag is set, * they will call spu_switch_notify(); */ - for (node = 0; node MAX_NUMNODES; node++) { + for_each_online_node(node) { struct spu *spu; mutex_lock(spu_prio-active_mutex[node]); list_for_each_entry(spu, spu_prio-active_list[node], list) { struct spu_context *ctx = spu-ctx; set_bit(SPU_SCHED_NOTIFY_ACTIVE, ctx-sched_flags); - mb(); + mb(); /* make sure any tasks woken up below */ + /* can see the bit(s) set above */ wake_up_all(ctx-stop_wq); } mutex_unlock(spu_prio-active_mutex[node]); _ I still wonder about that barrier. At the least it should be smp_mb(). But aren't our set_bit() semantics _alone_ sufficient to make this barrier unneeded? If it _is_ possible for the effects of a set_bit() to not be visible to a woken-up thread then I suspect we'll have nasty little problems in quite a few places. Maybe wake_up() should itself have a barrier to prevent such things? Doing that would be a documentation-only change, I suspect, given that the current implementation of wake_up() starts out with a spin_lock_irqsave(). ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 04/14] spufs: add spu stats in sysfs and ctx stat file in spufs
On Friday 20 July 2007, Andrew Morton wrote: I think it's better if you do it, please - I'm not doing anything useful here. Ok, I'm giving it some final testing, then send out the pull request. Do you also want me to handle the ps3 drivers? I think I'd prefer to leave those to you if you don't mind. Bob has just sent out an udpate to the oprofile patches btw. I'll cc you on the incrementals in case that's some use. I already have his patch and fixed up the remaining rejects I got against Christoph's patch. btw, I also found the below which I guess I'll merge: From: Mariusz Kozlowski [EMAIL PROTECTED] allnoconfig results in this: ... Ok. Arnd ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 04/14] spufs: add spu stats in sysfs and ctx stat file in spufs
On Fri, 20 Jul 2007 21:29:20 +0200 Arnd Bergmann [EMAIL PROTECTED] wrote: On Friday 20 July 2007, Andrew Morton wrote: I think it's better if you do it, please - I'm not doing anything useful here. Ok, I'm giving it some final testing, then send out the pull request. Do you also want me to handle the ps3 drivers? I think I'd prefer to leave those to you if you don't mind. No probs. Please cc me on the Linus pull request and I'll offer a little encouragement. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc: Add of_register_i2c_devices()
On Fri, 20 Jul 2007, Segher Boessenkool wrote: + strncpy(info-driver_name, i2c_devices[i].i2c_driver, KOBJ_NAME_LEN); + strncpy(info-type, i2c_devices[i].i2c_type, I2C_NAME_SIZE); Why not just strcpy(), btw? Because target strings are finite length, and sources are just pointers to some constant strings, which one might make arbitrarily long. + addr = of_get_property(node, reg, len); + if (!addr || len sizeof(int) || *addr 0x) + continue; Give a warning when the addr won't fit in 16 bits? Ok, version 3, hopefully last, below. Thanks Guennadi --- Guennadi Liakhovetski Scan the device tree for i2c devices, check their compatible property against a hard-coded table, and, if found, register with i2c boardinfo. Signed-off-by: G. Liakhovetski [EMAIL PROTECTED] diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 3289fab..727453d 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c @@ -305,6 +305,64 @@ err: arch_initcall(gfar_of_init); +#ifdef CONFIG_I2C_BOARDINFO +#include linux/i2c.h +struct i2c_driver_device { + char*of_device; + char*i2c_driver; + char*i2c_type; +}; + +static struct i2c_driver_device i2c_devices[] __initdata = { + {ricoh,rs5c372a, rtc-rs5c372, rs5c372a,}, + {ricoh,rs5c372b, rtc-rs5c372, rs5c372b,}, + {ricoh,rv5c386, rtc-rs5c372, rv5c386,}, + {ricoh,rv5c387a, rtc-rs5c372, rv5c387a,}, +}; + +static int __init of_find_i2c_driver(struct device_node *node, struct i2c_board_info *info) +{ + int i; + + for (i = 0; i ARRAY_SIZE(i2c_devices); i++) { + if (!of_device_is_compatible(node, i2c_devices[i].of_device)) + continue; + strncpy(info-driver_name, i2c_devices[i].i2c_driver, KOBJ_NAME_LEN); + strncpy(info-type, i2c_devices[i].i2c_type, I2C_NAME_SIZE); + return 0; + } + return -ENODEV; +} + +static void __init of_register_i2c_devices(struct device_node *adap_node, int bus_num) +{ + struct device_node *node = NULL; + + while ((node = of_get_next_child(adap_node, node))) { + struct i2c_board_info info; + const u32 *addr; + int len; + + addr = of_get_property(node, reg, len); + if (!addr || len sizeof(int) || *addr (1 10) - 1) { + printk(KERN_WARNING fsl_ioc.c: invalid i2c device entry\n); + continue; + } + + info.irq = irq_of_parse_and_map(node, 0); + if (info.irq == NO_IRQ) + info.irq = -1; + + if (of_find_i2c_driver(node, info) 0) + continue; + + info.platform_data = NULL; + info.addr = *addr; + + i2c_register_board_info(bus_num, info, 1); + } +} + static int __init fsl_i2c_of_init(void) { struct device_node *np; @@ -349,6 +407,8 @@ static int __init fsl_i2c_of_init(void) fsl_i2c_platform_data)); if (ret) goto unreg; + + of_register_i2c_devices(np, i); } return 0; @@ -360,6 +420,7 @@ err: } arch_initcall(fsl_i2c_of_init); +#endif #ifdef CONFIG_PPC_83xx static int __init mpc83xx_wdt_init(void) ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Please pull for-2.6.23 branch of cell-2.6.git
Hi Linus, Please pull from master.kernel.org:/pub/scm/linux/kernel/git/arnd/cell-2.6.git for-2.6.23 This is a number of changes that fell through the cracks because it wasn't clear how we were going to merge it in the absence of paulus. Mostly bug fixes, except a few features that should we should have submitted all along: * oprofile on Cell SPU * SPU affinity * Kdump saves SPU state * drivers for I/O buffer memory and MSI on the Axon south bridge Arnd shortlog [CELL] spufs: rework list management and associated locking [CELL] oprofile: add support to OProfile for profiling CELL BE SPUs [CELL] oprofile: enable SPU switch notification to detect currently active SPU tasks [CELL] spu_base: locking cleanup [CELL] cell: indexing of SPUs based on firmware vicinity properties [CELL] spufs: integration of SPE affinity with the scheduller [CELL] cell: add placement computation for scheduling of affinity contexts [CELL] spufs: extension of spu_create to support affinity definition [CELL] cell: add hardcoded spu vicinity information for QS20 [CELL] cell: add vicinity information on spus [CELL] cell: add per BE structure with info about its SPUs [CELL] spufs: use find_first_bit() instead of sched_find_first_bit() [CELL] spufs: remove unused file argument from spufs_run_spu() [CELL] spufs: change decrementer restore timing [CELL] spufs: dont halt decrementer at restore step 47 [CELL] spufs: limit saving MFC_CNTL bits [CELL] spufs: fix read and write for decr_status file [CELL] spufs: fix decr_status meanings [CELL] spufs: remove needless context save/restore code [CELL] spufs: fix array size of channel index [CELL] spufs: make sure context are scheduled again after spu_acquire_saved [CELL] spufs: add spu stats in sysfs and ctx stat file in spufs [CELL] spufs: Remove spurious WARN_ON for spu_deactivate for NOSCHED contexts [CELL] spufs: Make signal-notification files readonly for NOSCHED contexts [CELL] spufs: Avoid unexpectedly restaring MFC during context save [CELL] spufs: remove section mismatch warning [CELL] add support for MSI on Axon-based Cell systems [CELL] saving spus information for kexec crash [CELL] driver for DDR2 memory on AXON [CELL] allow linux to map Cell regs on legacy SLOF tree. [CELL] fix cbe_thermal for legacy SLOF tree. [CELL] fix cbe_cpufreq for legacy SLOF tree. [CELL] cbe_cpufreq: reorganize code [CELL] cbe_cpufreq: fix minor issues [CELL] cbe_cpufreq: fix initialization [CELL] cbe_cpufreq: fix latency measurement [CELL] pmi: remove support for mutiple devices. diffstat arch/powerpc/configs/cell_defconfig |3 arch/powerpc/kernel/crash.c | 67 + arch/powerpc/kernel/time.c |1 arch/powerpc/oprofile/Kconfig|7 arch/powerpc/oprofile/Makefile |4 arch/powerpc/oprofile/cell/pr_util.h | 97 + arch/powerpc/oprofile/cell/spu_profiler.c| 221 arch/powerpc/oprofile/cell/spu_task_sync.c | 484 arch/powerpc/oprofile/cell/vma_map.c | 287 + arch/powerpc/oprofile/common.c | 51 arch/powerpc/oprofile/op_model_7450.c| 14 arch/powerpc/oprofile/op_model_cell.c| 607 +-- arch/powerpc/oprofile/op_model_fsl_booke.c | 11 arch/powerpc/oprofile/op_model_pa6t.c| 12 arch/powerpc/oprofile/op_model_power4.c | 11 arch/powerpc/oprofile/op_model_rs64.c| 10 arch/powerpc/platforms/Kconfig | 10 arch/powerpc/platforms/cell/Kconfig | 10 arch/powerpc/platforms/cell/Makefile |6 arch/powerpc/platforms/cell/axon_msi.c | 445 arch/powerpc/platforms/cell/cbe_cpufreq.c| 217 --- arch/powerpc/platforms/cell/cbe_cpufreq.h| 24 arch/powerpc/platforms/cell/cbe_cpufreq_pervasive.c | 115 ++ arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c| 148 ++ arch/powerpc/platforms/cell/cbe_regs.c |7 arch/powerpc/platforms/cell/cbe_thermal.c| 25 arch/powerpc/platforms/cell/spu_base.c | 295 +++-- arch/powerpc/platforms/cell/spu_syscalls.c | 17 arch/powerpc/platforms/cell/spufs/context.c | 42 arch/powerpc/platforms/cell/spufs/coredump.c |2 arch/powerpc/platforms/cell/spufs/fault.c|8 arch/powerpc/platforms/cell/spufs/file.c | 104 +
Re: [PATCH 1/2] OProfile - Enable SPU switch notification to detect currently active SPU tasks - update
On Friday 20 July 2007, Andrew Morton wrote: + for_each_online_node(node) { struct spu *spu; mutex_lock(spu_prio-active_mutex[node]); list_for_each_entry(spu, spu_prio-active_list[node], list) { struct spu_context *ctx = spu-ctx; set_bit(SPU_SCHED_NOTIFY_ACTIVE, ctx-sched_flags); - mb(); + mb(); /* make sure any tasks woken up below */ + /* can see the bit(s) set above */ wake_up_all(ctx-stop_wq); } mutex_unlock(spu_prio-active_mutex[node]); _ I still wonder about that barrier. At the least it should be smp_mb(). But aren't our set_bit() semantics _alone_ sufficient to make this barrier unneeded? I believe they are sufficient on powerpc, and should be everywhere, so the mb() can probably go away entirely. set_bit() does a ldarx/stdcx, which is guaranteed to be atomic across CPUs. Arnd ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 5/6] 85xxCDS: Misc 8548 PCI Corrections.
On Jul 20, 2007, at 1:56 PM, Randy Vinson wrote: From cf18185b4e201ff45f2e2a948103dd3dc088c046 Mon Sep 17 00:00:00 2001 From: Randy Vinson [EMAIL PROTECTED] Date: Thu, 19 Jul 2007 10:40:53 -0700 Subject: [PATCH] 85xxCDS: Misc 8548 PCI Corrections. Setting the host bridge @8000 as primary and only calling setup_pci_atmu for the PCI Express host bridge. Also fixing a bug in setting the USB interrupt numbers. What issue exists with calling setup_pci_atmu on normal PCI? - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 5/6] 85xxCDS: Misc 8548 PCI Corrections.
Kumar Gala wrote: On Jul 20, 2007, at 1:56 PM, Randy Vinson wrote: From cf18185b4e201ff45f2e2a948103dd3dc088c046 Mon Sep 17 00:00:00 2001 From: Randy Vinson [EMAIL PROTECTED] Date: Thu, 19 Jul 2007 10:40:53 -0700 Subject: [PATCH] 85xxCDS: Misc 8548 PCI Corrections. Setting the host bridge @8000 as primary and only calling setup_pci_atmu for the PCI Express host bridge. Also fixing a bug in setting the USB interrupt numbers. What issue exists with calling setup_pci_atmu on normal PCI? At one point, it caused problems with the primary PCI controller, but I just tried it without the exclusion and it was OK. I'm wondering if my original problem was due to a buggy DTS file. I'll remove that part of the patch and resubmit. Randy Vinson ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v3] pcmcia: CompactFlash driver for PA Semi Electra boards
On Thu, 5 Jul 2007 09:49:14 -0500 [EMAIL PROTECTED] (Olof Johansson) wrote: Driver for the CompactFlash slot on the PA Semi Electra eval board. It's a simple device sitting on localbus, with interrupts and detect/voltage control over GPIO. The driver is implemented as an of_platform driver, and adds localbus as a bus being probed by the of_platform framework. Signed-off-by: Olof Johansson [EMAIL PROTECTED] --- On Mon, Jun 25, 2007 at 03:43:41PM -0500, olof wrote: The ifdef is needed since for CONFIG_PCMCIA=n builds, the bus notifier isn't available. I wanted to do the bus notifier registration explicitly before the of_platform bus probe to avoid later surprises due to reordered initcalls in case it was split up in it's own initcall. I could add the code under ifdef as well, but it didn't seem too critical. Once the second major board comes along I'll probably move it out to a per-board file, there's no real need for it just yet. Alright, turns out I still need to declare the extern bus type, which would mean two #ifdefs in one function. Moving it out instead. I've addressed Milton's comments as well. Who's maintaining PCMCIA? MAINTAINERS only lists a mailing list, no person. Seems weird for a component that's marked as maintained. Dominik Brodowski. He's having a bit of downtime at present (exams, I think). He expects to return. Meanwhile, cc'ing me usually has some effect. ... +static const char driver_name[] = electra-cf; ... +static struct of_device_id electra_cf_match[] = +{ + { + .compatible = electra-cf, + }, + {}, +}; Could have reused driver_name[] here, if that was appropriate. +static struct of_platform_driver electra_cf_driver = +{ + .name = (char *)driver_name, ug. But it's not your fault - we should have always made it const. --- mainline.orig/arch/powerpc/platforms/pasemi/setup.c +++ mainline/arch/powerpc/platforms/pasemi/setup.c I never know who maintains random-scruffy-ppc code like this. From a peek in the git-whatchanged output, it appears to be yourself. Have a few little fixies: --- a/drivers/pcmcia/electra_cf.c~pcmcia-compactflash-driver-for-pa-semi-electra-boards-fix +++ a/drivers/pcmcia/electra_cf.c @@ -201,9 +201,7 @@ static int __devinit electra_cf_probe(st if (!cf) return -ENOMEM; - init_timer(cf-timer); - cf-timer.function = electra_cf_timer; - cf-timer.data = (unsigned long) cf; + setup_timer(cf-timer, electra_cf_timer, (unsigned long)cf); cf-irq = NO_IRQ; cf-ofdev = ofdev; @@ -340,16 +338,14 @@ static int __devexit electra_cf_remove(s return 0; } -static struct of_device_id electra_cf_match[] = -{ +static struct of_device_id electra_cf_match[] = { { .compatible = electra-cf, }, {}, }; -static struct of_platform_driver electra_cf_driver = -{ +static struct of_platform_driver electra_cf_driver = { .name = (char *)driver_name, .match_table= electra_cf_match, .probe= electra_cf_probe, @@ -371,4 +367,3 @@ module_exit(electra_cf_exit); MODULE_LICENSE(GPL); MODULE_AUTHOR (Olof Johansson [EMAIL PROTECTED]); MODULE_DESCRIPTION(PA Semi Electra CF driver); - _ ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc: mpic protected sources
On Saturday 21 July 2007, Benjamin Herrenschmidt wrote: 0% probability of being spam. Full report: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.7-deb Some HW platforms, such as the new cell blades, requires some MPIC sources to be left alone by the operating system. This patch implements support for a protected-sources property in the mpic controller node containing a list of source numbers to be protected against operating system interference. For those interested in the gory details, the MPIC on the southbridge of those blades has some of the processor outputs routed to the cell, and at least one routed as a GPIO to the service processor. It will be used in the GA product for routing some of the southbridge error interrupts to the service processor which implements some of the RAS stuff, such as checkstopping when fatal errors occurs before they can propagate. Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED] Acked-by: Arnd Bergmann [EMAIL PROTECTED] ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/5] ehca: Generate event when SRQ limit reached
thanks, applied. BTW, does your SRQ-capable hardware support generating the last WQE reached event? There's not any reliable way to avoid problems when destroying QPs attached to an SRQ without it, and the IB spec requires CAs that support SRQs to generate it (o11-5.2.5 in chapter 11 of vol 1). I don't see any code in ehca to generate the event, and IPoIB CM at least will be very unhappy when using SRQs if the event is not generated. - R. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 3/5] ehca: Make ehca2ib_return_code() non-inline
thanks, applied ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [ofa-general] [PATCH 5/5] ehca: Support small QP queues
thanks, applied. I fixed this up myself to work with commit 20c2df83, which got rid of the destructor argument to kmem_cache_create() -- you probably want to check my tree to make sure it's OK. Also the same as I said before about checkpatch.pl's warning: WARNING: externs should be avoided in .c files #337: FILE: drivers/infiniband/hw/ehca/ehca_pd.c:91: + extern struct kmem_cache *small_qp_cache; please fix that up when you get a chance ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev