Re: [PATCH 08/25] gpio/mpc8xxx: add a const qualifier
On Mon, Jul 23, 2012 at 11:13 AM, Uwe Kleine-König wrote: > This prepares *of_device_id.data becoming const. Without this change > the following warning would occur: > > drivers/gpio/gpio-mpc8xxx.c: In function 'mpc8xxx_add_controller': > drivers/gpio/gpio-mpc8xxx.c:360:30: warning: assignment discards > 'const' qualifier from pointer target type [enabled by default] > > Signed-off-by: Uwe Kleine-König Acked-by: Linus Walleij Yours, Linus Walleij ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] scsi/ibmvscsi: /sys/class/scsi_host/hostX/config doesn't show any information
On Fri, 2012-07-27 at 07:56 +0100, James Bottomley wrote: > On Fri, 2012-07-27 at 15:19 +1000, Benjamin Herrenschmidt wrote: > > On Wed, 2012-07-18 at 18:49 +0200, o...@aepfle.de wrote: > > > From: Linda Xie > > > > James, can I assume you're picking up those two ? > > If they get acked by the maintiners ... I don't think we have a specific upstream maintainer for those drivers, so let's assume it's my job... NAK on the sysfs one, the other one is ok, I'll reply to the respective patches. Cheers, Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH -V4 11/12] arch/powerpc: properly offset the context bits for 1T segemnts
On Wed, Jul 25, 2012 at 06:28:04PM +0530, Aneesh Kumar K.V wrote: > From: "Aneesh Kumar K.V" > > We should do rldimi r10,r9,USER_ESID_BITS,0 only after populating > r10 with ESID bits. This needs a lot more explanation as to what the problem is that this patch aims to fix. Is it a problem today without your other patches, or is it introduced by previous patches? In any case I think there is an error in the patch, see below... > 0: /* user address: proto-VSID = context << 15 | ESID. First check > @@ -155,13 +157,16 @@ END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT) > ld r9,PACACONTEXTID(r13) > BEGIN_FTR_SECTION > cmpldi r10,0x1000 > + bge 9f > END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT) > rldimi r10,r9,USER_ESID_BITS,0 > + b slb_finish_load > BEGIN_FTR_SECTION > - bge slb_finish_load_1T > +9: > + srdir10,r10,40-28 /* get 1T ESID */ > + rldimi r10,r9,USER_ESID_BITS,0 Shouldn't this one be USER_ESID_BITS_1T? And in that case, since USER_ESID_BITS == USER_ESID_BITS_1T + 12, I think the patch would then introduce no change in behaviour (other than being slightly slower than the current code). Or am I missing something? -- in that case we really need a longer and better explanation with the patch. Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] scsi/ibmvscsi: add module alias for ibmvscsic
On Wed, 2012-07-18 at 18:49 +0200, o...@aepfle.de wrote: > From: Olaf Hering > > The driver is named ibmvscsic, at runtime it its name is advertised as > ibmvscsi. For this reason mkinitrd wont pickup the driver properly. > Reported by IBM during SLES11 beta testing: > > https://bugzilla.novell.com/show_bug.cgi?id=459933 > LTC50724 So while this would work, I do wonder however whether we could instead fix it by simplifying the whole thing as follow since iSeries is now gone and so we don't need split backends anymore: scsi/ibmvscsi: Remove backend abstraction Now that the iSeries code is gone the backend abstraction in this driver is no longer necessary, which allows us to consolidate the driver in one file. The side effect is that the module name is now ibmvscsi.ko which matches the driver hotplug name and fixes auto-load issues. Signed-off-by: Benjamin Herrenschmidt --- --- drivers/scsi/ibmvscsi/Makefile|6 +- drivers/scsi/ibmvscsi/ibmvscsi.c | 348 +-- drivers/scsi/ibmvscsi/ibmvscsi.h | 22 --- drivers/scsi/ibmvscsi/rpa_vscsi.c | 368 - 4 files changed, 330 insertions(+), 414 deletions(-) delete mode 100644 drivers/scsi/ibmvscsi/rpa_vscsi.c diff --git a/drivers/scsi/ibmvscsi/Makefile b/drivers/scsi/ibmvscsi/Makefile index ff5b5c5..cb150d1 100644 --- a/drivers/scsi/ibmvscsi/Makefile +++ b/drivers/scsi/ibmvscsi/Makefile @@ -1,7 +1,3 @@ -obj-$(CONFIG_SCSI_IBMVSCSI)+= ibmvscsic.o - -ibmvscsic-y+= ibmvscsi.o -ibmvscsic-$(CONFIG_PPC_PSERIES)+= rpa_vscsi.o - +obj-$(CONFIG_SCSI_IBMVSCSI)+= ibmvscsi.o obj-$(CONFIG_SCSI_IBMVSCSIS) += ibmvstgt.o obj-$(CONFIG_SCSI_IBMVFC) += ibmvfc.o diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index 3a6c474..d2bd2c0 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c @@ -93,13 +93,13 @@ static int max_requests = IBMVSCSI_MAX_REQUESTS_DEFAULT; static int max_events = IBMVSCSI_MAX_REQUESTS_DEFAULT + 2; static int fast_fail = 1; static int client_reserve = 1; +static char partition_name[97] = "UNKNOWN"; +static unsigned int partition_number = -1; static struct scsi_transport_template *ibmvscsi_transport_template; #define IBMVSCSI_VERSION "1.5.9" -static struct ibmvscsi_ops *ibmvscsi_ops; - MODULE_DESCRIPTION("IBM Virtual SCSI"); MODULE_AUTHOR("Dave Boutcher"); MODULE_LICENSE("GPL"); @@ -118,6 +118,315 @@ MODULE_PARM_DESC(fast_fail, "Enable fast fail. [Default=1]"); module_param_named(client_reserve, client_reserve, int, S_IRUGO ); MODULE_PARM_DESC(client_reserve, "Attempt client managed reserve/release"); +static void ibmvscsi_handle_crq(struct viosrp_crq *crq, + struct ibmvscsi_host_data *hostdata); + +/* + * Routines for managing the command/response queue + */ +/** + * ibmvscsi_handle_event: - Interrupt handler for crq events + * @irq: number of irq to handle, not used + * @dev_instance: ibmvscsi_host_data of host that received interrupt + * + * Disables interrupts and schedules srp_task + * Always returns IRQ_HANDLED + */ +static irqreturn_t ibmvscsi_handle_event(int irq, void *dev_instance) +{ + struct ibmvscsi_host_data *hostdata = + (struct ibmvscsi_host_data *)dev_instance; + vio_disable_interrupts(to_vio_dev(hostdata->dev)); + tasklet_schedule(&hostdata->srp_task); + return IRQ_HANDLED; +} + +/** + * release_crq_queue: - Deallocates data and unregisters CRQ + * @queue: crq_queue to initialize and register + * @host_data: ibmvscsi_host_data of host + * + * Frees irq, deallocates a page for messages, unmaps dma, and unregisters + * the crq with the hypervisor. + */ +static void ibmvscsi_release_crq_queue(struct crq_queue *queue, + struct ibmvscsi_host_data *hostdata, + int max_requests) +{ + long rc = 0; + struct vio_dev *vdev = to_vio_dev(hostdata->dev); + free_irq(vdev->irq, (void *)hostdata); + tasklet_kill(&hostdata->srp_task); + do { + if (rc) + msleep(100); + rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address); + } while ((rc == H_BUSY) || (H_IS_LONG_BUSY(rc))); + dma_unmap_single(hostdata->dev, +queue->msg_token, +queue->size * sizeof(*queue->msgs), DMA_BIDIRECTIONAL); + free_page((unsigned long)queue->msgs); +} + +/** + * crq_queue_next_crq: - Returns the next entry in message queue + * @queue: crq_queue to use + * + * Returns pointer to next entry in queue, or NULL if there are no new + * entried in the CRQ. + */ +static struct viosrp_crq *crq_queue_next_crq(struct crq_queue *queue) +{ + struct viosrp_crq *crq; + unsigned long flags; + + spin_lock_irqsave(&queue->lock,
Re: [PATCH] scsi/ibmvscsi: /sys/class/scsi_host/hostX/config doesn't show any information
n Wed, 2012-07-18 at 18:49 +0200, o...@aepfle.de wrote: > From: Linda Xie > > Expected result: > It should show something like this: > x1521p4:~ # cat /sys/class/scsi_host/host1/config > PARTITIONNAME='x1521p4' > NWSDNAME='X1521P4' > HOSTNAME='X1521P4' > DOMAINNAME='RCHLAND.IBM.COM' > NAMESERVERS='9.10.244.100 9.10.244.200' > > Actual result: > x1521p4:~ # cat /sys/class/scsi_host/host0/config > x1521p4:~ # > > This patch changes the size of the buffer used for transfering config > data to 4K. It was tested against 2.6.19-rc2 tree. > > Reported by IBM during SLES11 beta testing: So this patch just seems to blindly replace all occurrences of PAGE_SIZE with HOST_PAGE_SIZE which is utterly wrong. Only one of those needs to be changed, the one passed to ibmvscsi_do_host_config() which is what's visible to the server, all the rest is just sysfs attributes and should remain as-is. Additionally (not even mentioning that there is no explanation as to what the real problem is anywhere in the changeset) I don't like the fix. The root of the problem is that the MAD header has a 16-bit length field, so writing 0x1 (64K PAGE_SIZE) into it doesn't quite work. So in addition to a better comment, I would suggest a fix more like this: scsi/ibmvscsi: Fix host config length field overflow The length field in the host config packet is only 16-bit long, so passing it 0x1 (64K which is our standard PAGE_SIZE) doesn't work and result in an empty config from the server. Signed-off-by: Benjamin Herrenschmidt CC: --- diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index 3a6c474..337e8b3 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c @@ -1541,6 +1541,9 @@ static int ibmvscsi_do_host_config(struct ibmvscsi_host_data *hostdata, host_config = &evt_struct->iu.mad.host_config; + /* The transport length field is only 16-bit */ + length = min(0x, length); + /* Set up a lun reset SRP command */ memset(host_config, 0x00, sizeof(*host_config)); host_config->common.type = VIOSRP_HOST_CONFIG_TYPE; ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [RFC PATCH v5 05/19] memory-hotplug: check whether memory is present or not
At 07/28/2012 04:17 AM, Tony Luck Wrote: > On Fri, Jul 27, 2012 at 3:28 AM, Wen Congyang wrote: >> +static inline int pfns_present(unsigned long pfn, unsigned long nr_pages) >> +{ >> + int i; >> + for (i = 0; i < nr_pages; i++) { >> + if (pfn_present(pfn + 1)) > > Typo? I think you meant "pfn + i" Typo error. Thanks for pointing it out. Wen Congyang > >> + continue; >> + else >> + return -EINVAL; >> + } >> + return 0; >> +} > > -Tony > ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
RE: [PATCH v4 3/7] fsl-dma: change release process of dma descriptor for supporting async_tx
Hi Dan and Vinod, Can you apply these patches of fsl-dma to -next if there is not any comments? Thanks. > -Original Message- > From: Liu Qiang-B32616 > Sent: Friday, July 27, 2012 5:16 PM > To: linux-cry...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org > Cc: Phillips Kim-R1AAHA; herb...@gondor.hengli.com.au; > da...@davemloft.net; Liu Qiang-B32616; Dan Williams; Vinod Koul; Li Yang- > R58472; Ira W. Snyder > Subject: [PATCH v4 3/7] fsl-dma: change release process of dma descriptor > for supporting async_tx > > From: Qiang Liu > > Fix the potential risk when enable config NET_DMA and ASYNC_TX. > Async_tx is lack of support in current release process of dma descriptor, > all descriptors will be released whatever is acked or no-acked by > async_tx, > so there is a potential race condition when dma engine is uesd by others > clients (e.g. when enable NET_DMA to offload TCP). > > In our case, a race condition which is raised when use both of talitos > and dmaengine to offload xor is because napi scheduler will sync all > pending requests in dma channels, it affects the process of raid > operations > due to ack_tx is not checked in fsl dma. The no-acked descriptor is freed > which is submitted just now, as a dependent tx, this freed descriptor > trigger > BUG_ON(async_tx_test_ack(depend_tx)) in async_tx_submit(). > > TASK = ee1a94a0[1390] 'md0_raid5' THREAD: ecf4 CPU: 0 > GPR00: 0001 ecf41ca0 ee44/921a94a0 003f 0001 c00593e4 > 0001 > GPR08: a7a7a7a7 0001 045/92002 42028042 100a38d4 > ed576d98 > GPR16: ed5a11b0 2b162000 0200 046/92000 2d555000 > ed3015e8 c15a7aa0 > GPR24: c155fc40 ecb63220 ecf41d28 e47/92f640bb0 > ef640c30 ecf41ca0 > NIP [c02b048c] async_tx_submit+0x6c/0x2b4 > LR [c02b068c] async_tx_submit+0x26c/0x2b4 > Call Trace: > [ecf41ca0] [c02b068c] async_tx_submit+0x26c/0x2b448/92 (unreliable) > [ecf41cd0] [c02b0a4c] async_memcpy+0x240/0x25c > [ecf41d20] [c0421064] async_copy_data+0xa0/0x17c > [ecf41d70] [c0421cf4] __raid_run_ops+0x874/0xe10 > [ecf41df0] [c0426ee4] handle_stripe+0x820/0x25e8 > [ecf41e90] [c0429080] raid5d+0x3d4/0x5b4 > [ecf41f40] [c04329b8] md_thread+0x138/0x16c > [ecf41f90] [c008277c] kthread+0x8c/0x90 > [ecf41ff0] [c0011630] kernel_thread+0x4c/0x68 > > Cc: Dan Williams > Cc: Vinod Koul > Cc: Li Yang > Cc: Ira W. Snyder > Signed-off-by: Qiang Liu > --- > drivers/dma/fsldma.c | 242 +++- > -- > drivers/dma/fsldma.h |1 + > 2 files changed, 172 insertions(+), 71 deletions(-) > > diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c > index 4f2f212..87f52c0 100644 > --- a/drivers/dma/fsldma.c > +++ b/drivers/dma/fsldma.c > @@ -400,6 +400,125 @@ out_splice: > list_splice_tail_init(&desc->tx_list, &chan->ld_pending); > } > > +static void fsldma_cleanup_descriptor(struct fsldma_chan *chan); > +static void fsl_chan_xfer_ld_queue(struct fsldma_chan *chan); > + > +/** > + * fsldma_clean_completed_descriptor - free all descriptors which > + * has been completed and acked > + * @chan: Freescale DMA channel > + * > + * This function is used on all completed and acked descriptors. > + * All descriptors should only be freed in this function. > + */ > +static int > +fsldma_clean_completed_descriptor(struct fsldma_chan *chan) > +{ > + struct fsl_desc_sw *desc, *_desc; > + > + /* Run the callback for each descriptor, in order */ > + list_for_each_entry_safe(desc, _desc, &chan->ld_completed, node) { > + > + if (async_tx_test_ack(&desc->async_tx)) { > + /* Remove from the list of transactions */ > + list_del(&desc->node); > +#ifdef FSL_DMA_LD_DEBUG > + chan_dbg(chan, "LD %p free\n", desc); > +#endif > + dma_pool_free(chan->desc_pool, desc, > + desc->async_tx.phys); > + } > + } > + > + return 0; > +} > + > +/** > + * fsldma_run_tx_complete_actions - cleanup and free a single link > descriptor > + * @chan: Freescale DMA channel > + * @desc: descriptor to cleanup and free > + * @cookie: Freescale DMA transaction identifier > + * > + * This function is used on a descriptor which has been executed by the > DMA > + * controller. It will run any callbacks, submit any dependencies. > + */ > +static dma_cookie_t fsldma_run_tx_complete_actions(struct fsl_desc_sw > *desc, > + struct fsldma_chan *chan, dma_cookie_t cookie) > +{ > + struct dma_async_tx_descriptor *txd = &desc->async_tx; > + struct device *dev = chan->common.device->dev; > + dma_addr_t src = get_desc_src(chan, desc); > + dma_addr_t dst = get_desc_dst(chan, desc); > + u32 len = get_desc_cnt(chan, desc); > + > + BUG_ON(txd->cookie < 0); > + > + if (txd->cookie > 0) { > + cookie = txd->cookie; > + > + /* Run the link descriptor callback function */ > + i
Re: [RFC PATCH v5 19/19] memory-hotplug: remove sysfs file of node
At 07/27/2012 06:45 PM, Yasuaki Ishimatsu Wrote: > Hi Wen, > > 2012/07/27 19:36, Wen Congyang wrote: >> From: Yasuaki Ishimatsu >> >> The patch adds node_set_offline() and unregister_one_node() to >> remove_memory() >> for removing sysfs file of node. >> >> CC: David Rientjes >> CC: Jiang Liu >> CC: Len Brown >> CC: Benjamin Herrenschmidt >> CC: Paul Mackerras >> CC: Christoph Lameter >> Cc: Minchan Kim >> CC: Andrew Morton >> CC: KOSAKI Motohiro >> CC: Wen Congyang >> Signed-off-by: Yasuaki Ishimatsu >> --- >> mm/memory_hotplug.c |5 + >> 1 files changed, 5 insertions(+), 0 deletions(-) >> >> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c >> index 5ac035f..5681968 100644 >> --- a/mm/memory_hotplug.c >> +++ b/mm/memory_hotplug.c >> @@ -1267,6 +1267,11 @@ int __ref remove_memory(int nid, u64 start, u64 >> size) >> /* remove memmap entry */ >> firmware_map_remove(start, start + size, "System RAM"); >> >> +if (!node_present_pages(nid)) { > > Applying [PATCH v5 17/19], pgdat->node_spanned_pages can become 0 when > all memory of the pgdat is removed. When pgdat->node_spanned_pages is 0, > it means the pgdat has no memory. So I think node_spanned_pages() is > better. node_spanned_pages = present_pages + hole_pages So present_pages is always less or equal than spanned_pages, and I think checking present pages is better. Thanks Wen Congyang > > Thanks, > Yasuaki Ishimatsu > >> +node_set_offline(nid); >> +unregister_one_node(nid); >> +} >> + >> arch_remove_memory(start, size); >> out: >> unlock_memory_hotplug(); >> > > > ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
RE: [PATCH v4 0/7] Raid: enable talitos xor offload for improving performance
Hi, Vinod, Dan, ping? > -Original Message- > From: linux-crypto-ow...@vger.kernel.org [mailto:linux-crypto- > ow...@vger.kernel.org] On Behalf Of qiang@freescale.com > Sent: Friday, July 27, 2012 5:16 PM > To: linux-cry...@vger.kernel.org; vinod.k...@intel.com; > dan.j.willi...@intel.com; herb...@gondor.hengli.com.au; linuxppc- > d...@lists.ozlabs.org > Cc: Li Yang-R58472; Phillips Kim-R1AAHA > Subject: [PATCH v4 0/7] Raid: enable talitos xor offload for improving > performance > > Hi, > > The following 7 patches enabling fsl-dma and talitos offload raid > operations for improving raid performance and balancing CPU load. > > Write performance will be improved by 25-30% tested by iozone. > Write performance is improved about 2% after using spin_lock_bh replace > spin_lock_irqsave. > CPU load will be reduced by 8%. > > Changes in V4: > - fix an error in talitos when dest addr is same with src addr, > dest > should be freed only one time if src is same with dest addr; > - correct coding style in fsl-dma according to Ira's comments; > - fix a race condition in fsl-dma fsl_tx_status(), remove the > interface > which is used to free descriptors in queue ld_completed, this > interface > has been included in fsldma_cleanup_descriptor(), in v3, there is > one > place missed spin_lock protect; > - split the original patch 3/4 up to 2 patches 3/7 and 4/7 > according to > Li Yang's comments. > - fix a warning of unitialized cookie; > - add memory copy self test in fsl-dma; > - add more detail description about use spin_lock_bh() to instead > of > spin_lock_irqsave() according to Timur's comments; > > Changes in v3: > - change release process of fsl-dma descriptor for resolve the > potential race condition > - add test result when use spin_lock_bh replace spin_lock_irqsave > - modify the benchmark results according to the latest patch > > Changes in v2: > - rebase onto cryptodev tree > - split the patch 3/4 up to 3 independent patches > - remove the patch 4/4, the fix is not for cryptodev tree > > > Qiang Liu (4): > Talitos: Support for async_tx XOR offload > fsl-dma: remove attribute DMA_INTERRUPT of dmaengine > fsl-dma: change release process of dma descriptor for supporting > async_tx > fsl-dma: use spin_lock_bh to instead of spin_lock_irqsave > > Qiang Liu (7): > Talitos: Support for async_tx XOR offload > fsl-dma: remove attribute DMA_INTERRUPT of dmaengine > fsl-dma: change release process of dma descriptor for supporting > async_tx > fsl-dma: move the function ahead of its invoke function > fsl-dma: use spin_lock_bh to instead of spin_lock_irqsave > fsl-dma: fix a warning of unitialized cookie > fsl-dma: add memcpy self test interface > > drivers/crypto/Kconfig |9 + > drivers/crypto/talitos.c | 413 ++ > drivers/crypto/talitos.h | 53 + > drivers/dma/fsldma.c | 550 +--- > -- > drivers/dma/fsldma.h |1 + > 5 files changed, 822 insertions(+), 204 deletions(-) > > -- > To unsubscribe from this list: send the line "unsubscribe linux-crypto" > in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [RFC PATCH v5 19/19] memory-hotplug: remove sysfs file of node
At 07/27/2012 06:45 PM, Yasuaki Ishimatsu Wrote: > Hi Wen, > > 2012/07/27 19:36, Wen Congyang wrote: >> From: Yasuaki Ishimatsu >> >> The patch adds node_set_offline() and unregister_one_node() to >> remove_memory() >> for removing sysfs file of node. >> >> CC: David Rientjes >> CC: Jiang Liu >> CC: Len Brown >> CC: Benjamin Herrenschmidt >> CC: Paul Mackerras >> CC: Christoph Lameter >> Cc: Minchan Kim >> CC: Andrew Morton >> CC: KOSAKI Motohiro >> CC: Wen Congyang >> Signed-off-by: Yasuaki Ishimatsu >> --- >> mm/memory_hotplug.c |5 + >> 1 files changed, 5 insertions(+), 0 deletions(-) >> >> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c >> index 5ac035f..5681968 100644 >> --- a/mm/memory_hotplug.c >> +++ b/mm/memory_hotplug.c >> @@ -1267,6 +1267,11 @@ int __ref remove_memory(int nid, u64 start, u64 >> size) >> /* remove memmap entry */ >> firmware_map_remove(start, start + size, "System RAM"); >> >> +if (!node_present_pages(nid)) { > > Applying [PATCH v5 17/19], pgdat->node_spanned_pages can become 0 when > all memory of the pgdat is removed. When pgdat->node_spanned_pages is 0, > it means the pgdat has no memory. So I think node_spanned_pages() is > better. Hmm, if the node contains cpu, and the cpu is onlined, can we offline this node? Thanks Wen Congyang > > Thanks, > Yasuaki Ishimatsu > >> +node_set_offline(nid); >> +unregister_one_node(nid); >> +} >> + >> arch_remove_memory(start, size); >> out: >> unlock_memory_hotplug(); >> > > > ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH -V4 11/12] arch/powerpc: properly offset the context bits for 1T segemnts
Paul Mackerras writes: > On Wed, Jul 25, 2012 at 06:28:04PM +0530, Aneesh Kumar K.V wrote: >> From: "Aneesh Kumar K.V" >> >> We should do rldimi r10,r9,USER_ESID_BITS,0 only after populating >> r10 with ESID bits. > > This needs a lot more explanation as to what the problem is that this > patch aims to fix. Is it a problem today without your other patches, > or is it introduced by previous patches? > > In any case I think there is an error in the patch, see below... > >> 0: /* user address: proto-VSID = context << 15 | ESID. First check >> @@ -155,13 +157,16 @@ END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT) >> ld r9,PACACONTEXTID(r13) >> BEGIN_FTR_SECTION >> cmpldi r10,0x1000 >> +bge 9f >> END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT) >> rldimi r10,r9,USER_ESID_BITS,0 >> +b slb_finish_load >> BEGIN_FTR_SECTION >> -bge slb_finish_load_1T >> +9: >> +srdir10,r10,40-28 /* get 1T ESID */ >> +rldimi r10,r9,USER_ESID_BITS,0 > > Shouldn't this one be USER_ESID_BITS_1T? And in that case, since > USER_ESID_BITS == USER_ESID_BITS_1T + 12, I think the patch would > then introduce no change in behaviour (other than being slightly > slower than the current code). Or am I missing something? -- in > that case we really need a longer and better explanation with the > patch. Ok I missed that we used USER_ESID_BITS there. This patch can be dropped. I looked at the 1T code, and assumed that we were wrongly shifting the context bits there. -aneesh ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
RE: [PATCH 5/6] powerpc/fsl-pci: Add pci inbound/outbound PM support
> -Original Message- > From: Kumar Gala [mailto:ga...@kernel.crashing.org] > Sent: Friday, July 27, 2012 9:24 PM > To: Jia Hongtao-B38951 > Cc: linuxppc-dev@lists.ozlabs.org; Wood Scott-B07421; Li Yang-R58472 > Subject: Re: [PATCH 5/6] powerpc/fsl-pci: Add pci inbound/outbound PM > support > > > On Jul 24, 2012, at 5:20 AM, Jia Hongtao wrote: > > > Power supply for PCI inbound/outbound window registers is off when > system > > go to deep-sleep state. We save the values of registers before suspend > > and restore to registers after resume. > > > > Signed-off-by: Jiang Yutang > > Signed-off-by: Jia Hongtao > > Signed-off-by: Li Yang > > --- > > arch/powerpc/include/asm/pci-bridge.h |2 +- > > arch/powerpc/sysdev/fsl_pci.c | 121 > + > > 2 files changed, 122 insertions(+), 1 deletions(-) > > Remind me why we need to save/restore PCI ATMUs, why not just re-parse > the device tree to restore? > > - k Save/restore is the more efficient way. Latency of sleep/wakeup is one of most important features in power management. -Hongtao. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev