Re: KASAN: use-after-free Read in ceph_mdsc_destroy

2020-07-23 Thread Xiubo Li
On 2020/7/23 14:27, syzbot wrote: Hello, syzbot found the following issue on: HEAD commit:f932d58a Merge tag 'scsi-fixes' of git://git.kernel.org/pu.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=152c6a8090 kernel config: https://syzkaller.appspot.

Re: netfilter: does the API break or something else ?

2020-05-14 Thread Xiubo Li
On 2020/5/14 18:54, Phil Sutter wrote: Hi, On Wed, May 13, 2020 at 11:20:35PM +0800, Xiubo Li wrote: Recently I hit one netfilter issue, it seems the API breaks or something else. Just for the record, this was caused by a misconfigured kernel. Yeah, thanks Phil for your help. BRs Xiubo

netfilter: does the API break or something else ?

2020-05-13 Thread Xiubo Li
Hi Experts, Recently I hit one netfilter issue, it seems the API breaks or something else. On CentOS8.1 with the recent upstream kernel built from source, such as 5.6.0-rc6/5.7.0-rc4. When running the following command: $ sudo bash -c 'iptables -A FORWARD -o enp3s0f1 -i ceph-brx -j ACCEPT' i

Re: [PATCH RESEND] nbd: avoid losing pointer to reallocated config->socks in nbd_add_socket

2019-09-21 Thread Xiubo Li
On 2019/9/21 0:06, Eugene Syromiatnikov wrote: In the (very unlikely) case of config->socks reallocation success and nsock allocation failure config->nsock will not get updated with the new pointer to socks array. Fix it by updating config->socks right after reallocation successfulness check. Fi

Re: [RFC PATCH] memalloc_noio: update the comment to make it cleaner

2019-09-18 Thread Xiubo Li
On 2019/9/18 16:14, Michal Hocko wrote: On Wed 18-09-19 16:02:52, Xiubo Li wrote: On 2019/9/18 15:25, Michal Hocko wrote: On Wed 18-09-19 04:58:20, xiu...@redhat.com wrote: From: Xiubo Li The GFP_NOIO means all further allocations will implicitly drop both __GFP_IO and __GFP_FS flags and so

Re: [RFC PATCH] memalloc_noio: update the comment to make it cleaner

2019-09-18 Thread Xiubo Li
On 2019/9/18 15:25, Michal Hocko wrote: On Wed 18-09-19 04:58:20, xiu...@redhat.com wrote: From: Xiubo Li The GFP_NOIO means all further allocations will implicitly drop both __GFP_IO and __GFP_FS flags and so they are safe for both the IO critical section and the the critical section from

Re: [PATCH v3] driver: uio: fix possible memory leak in uio_open

2019-01-02 Thread Xiubo Li
On 2019/1/3 22:28, liujian wrote: Fixes: 57c5f4df0a5a ("uio: fix crash after the device is unregistered") Signed-off-by: liujian --- v1->v2: rename the "err_infoopen" to "err_idev_info" v2->3: put the extra info after the "--" Looks good to me. Thanks. BRs drivers/uio/uio.c | 7 ---

Re: [PATCH] driver: uio: fix possible memory leak in uio_open

2019-01-01 Thread Xiubo Li
On 2019/1/3 0:26, liujian wrote: Fixes: 57c5f4df0a5a ("uio: fix crash after the device is unregistered") Signed-off-by: liujian --- drivers/uio/uio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 5c10fc7..bde7d7a 100644 --- a

Re: Problems with uio_pci_generic in v4.18-rc8

2018-08-12 Thread Xiubo Li
On 2018/8/12 19:03, gre...@linuxfoundation.org wrote: On Sun, Aug 12, 2018 at 06:55:58PM +0800, Xiubo Li wrote: Hi Harris, Since the lock protection in uio irq handler is useless currently as discussed in the mail list, so I will revert this commit with small changes and now the testing based

Re: Problems with uio_pci_generic in v4.18-rc8

2018-08-12 Thread Xiubo Li
Hi Harris, Since the lock protection in uio irq handler is useless currently as discussed in the mail list, so I will revert this commit with small changes and now the testing based LIO/TCMU has been finished. Thanks, BRs On 2018/8/11 5:12, Harris, James R wrote: Hi, Using Linux kernel

Re: [PATCH] uio: fix wrong return value from uio_mmap()

2018-07-19 Thread Xiubo Li
r the device is unregistered") CC: Xiubo Li Signed-off-by: Hailong Liu Signed-off-by: Jiang Biao --- drivers/uio/uio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index 5d421d7..0ddfda2 100644 --- a/drivers/uio/uio.c +++ b/d

Re: [PATCH v4 0/3] uio: fix potential crash bug

2018-07-15 Thread Xiubo Li
patch series of yours has caused no regression in our scenario. This was tested on PPC 64 bit system (NXP T2081). Hi Hamish, Cool and thanks very much for your testing about this. BRs Xiubo Thanks for resolving that. Regards, Hamish M. On 07/07/2018 02:05 PM, xiu...@redhat.com wrote: From: Xiu

Re: [PATCH v3 3/3] uio: fix crash after the device is unregistered

2018-07-09 Thread Xiubo Li
On 2018/7/10 1:06, Mike Christie wrote: On 07/06/2018 08:28 PM, Xiubo Li wrote: On 2018/7/7 2:23, Mike Christie wrote: On 07/05/2018 09:57 PM, xiu...@redhat.com wrote: static irqreturn_t uio_interrupt(int irq, void *dev_id) { struct uio_device *idev = (struct uio_device *)dev_id

Re: [PATCH v3 3/3] uio: fix crash after the device is unregistered

2018-07-09 Thread Xiubo Li
On 2018/7/10 0:40, Mike Christie wrote: On 07/06/2018 08:47 PM, Xiubo Li wrote: On 2018/7/7 2:58, Mike Christie wrote: On 07/05/2018 09:57 PM, xiu...@redhat.com wrote: void uio_event_notify(struct uio_info *info) { -struct uio_device *idev = info->uio_dev; +struct uio_dev

Re: [PATCH v3 3/3] uio: fix crash after the device is unregistered

2018-07-06 Thread Xiubo Li
On 2018/7/7 2:58, Mike Christie wrote: On 07/05/2018 09:57 PM, xiu...@redhat.com wrote: void uio_event_notify(struct uio_info *info) { - struct uio_device *idev = info->uio_dev; + struct uio_device *idev; + + if (!info) + return; + + idev = info->uio_dev

Re: [PATCH v3 3/3] uio: fix crash after the device is unregistered

2018-07-06 Thread Xiubo Li
On 2018/7/7 2:23, Mike Christie wrote: On 07/05/2018 09:57 PM, xiu...@redhat.com wrote: static irqreturn_t uio_interrupt(int irq, void *dev_id) { struct uio_device *idev = (struct uio_device *)dev_id; - irqreturn_t ret = idev->info->handler(irq, idev->info); + irqreturn_t

Re: [PATCH v3 0/3] uio: fix potential crash bug

2018-07-06 Thread Xiubo Li
ek. I intend to report back to you by July 13th. Hi Hamish, Thanks vey much for your quickly review and reply about this. Take your time :-) BRs Xiubo Thanks, Hamish M On 07/06/2018 02:57 PM, xiu...@redhat.com wrote: From: Xiubo Li The V2 patch set maybe not post successfully, so po

Re: [PATCH 2/2] uio: fix crash after the device is unregistered

2018-07-05 Thread Xiubo Li
On 2018/7/6 4:56, Jann Horn wrote: On Thu, Jul 5, 2018 at 10:53 PM wrote: From: Xiubo Li For the target_core_user use case, after the device is unregistered it maybe still opened in user space, then the kernel will crash, like: [...] Signed-off-by: Xiubo Li --- drivers/uio/uio.c | 101

Re: [PATCH 1/2] uio: change to use the mutex lock instead of the spin lock

2018-07-05 Thread Xiubo Li
On 2018/7/6 0:33, Greg KH wrote: On Thu, Jul 05, 2018 at 12:27:27PM -0400, xiu...@redhat.com wrote: From: Xiubo Li We are hitting a regression with the following commit: commit a93e7b331568227500186a465fee3c2cb5dffd1f Author: Hamish Martin Date: Mon May 14 13:32:23 2018 +1200 uio

Re: [PATCH] tcmu: Add fifo type waiter list support to avoidstarvation

2017-06-19 Thread Xiubo Li
Hi Nic & Mike I will update this just after the issue reported by Bryant on his environment been fixed later. Thanks, BRs Xiubo On 2017年06月04日 12:11, Mike Christie wrote: On 05/04/2017 09:51 PM, lixi...@cmss.chinamobile.com wrote: From: Xiubo Li The fifo type waiter list will hold

Re: [PATCH v6 2/2] tcmu: Add global data block pool support

2017-04-30 Thread Xiubo Li
[...] + +static bool tcmu_get_empty_blocks(struct tcmu_dev *udev, + struct tcmu_cmd *tcmu_cmd, + uint32_t blocks_needed) Can drop blocks_needed. Will fix it. [...] -static void *tcmu_get_block_addr(struct tcmu_dev *udev, uin

Re: [PATCH v6 1/2] tcmu: Add dynamic growing data area featuresupport

2017-04-30 Thread Xiubo Li
and the kunmap is at the end of aasda(). This as the initial patch, the memory is from slab cache now. But since the second patch followed will covert to use memory page from the buddy directly. Thanks, BRs Xiubo Li

Re: how to unmap pages in an anonymous mmap?

2017-03-09 Thread Xiubo Li
On 2017年02月28日 03:32, Andy Grover wrote: On 02/26/2017 09:59 PM, Xiubo Li wrote: But, We likely don't want to release memory from the data area anyways while active, in any case. How about if we set a timer when active commands go to zero, and then reduce data area to some minimum if n

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-03-01 Thread Xiubo Li
For now we will increase the data area size to 1G, and the cmd area size to 128M. The tcmu-runner should mmap() about (128M + 1G) when running and the TCMU will dynamically grows the data area from 0 to max 1G size. Cool. This is a good approach for an initial patch but this raises concerns ab

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-02-28 Thread Xiubo Li
Write throughput is pretty low at around 150 MB/s. What's the original write throughput without this patch? Is it also around 80 MB/s ? It is around 20-30 MB/s. Same fio args except using --rw=write. Got it. Thanks. BRs Xiubo

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-02-28 Thread Xiubo Li
On 02/17/2017 01:24 AM, lixi...@cmss.chinamobile.com wrote: From: Xiubo Li Currently for the TCMU, the ring buffer size is fixed to 64K cmd area + 1M data area, and this will be bottlenecks for high iops. Hi Xiubo, thanks for your work. daynmic -> dynamic Have you benchmarked this patch

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-02-26 Thread Xiubo Li
Cool. This is a good approach for an initial patch but this raises concerns about efficiently managing kernel memory usage -- the data area grows but never shrinks, and total possible usage increases per backstore. (What if there are 1000?) Any ideas how we could also improve these aspects of th

Re: [PATCH] target/user: Add daynmic growing data area featuresupport

2017-02-23 Thread Xiubo Li
When N is bigger, the ratio will be smaller. If N >= 1, the ratio will be [15/1024, 4/1024), for this the ratio 15 : 1024 will be enough. But maybe some iscsi cmds has no datas, N == 0. So the ratio should be bigger. For now we will increase the data area size to 1G, and the cmd area size to 12

Re: [PATCH] uio: add UIO_MEM_CUSTOM support

2017-02-15 Thread Xiubo Li
buffer(uio0 --> map0). Currently the TCMU will using the fixed small size map area as the ring buffer, but this will be the bottleneck for high iops. Without knowing how large it is enough, so the new scheme will use the fixed small ring buffer area(about 64M ~ 128M) + dynamically "growing" rin

Re: [PATCH] uio: add UIO_MEM_CUSTOM support

2017-02-15 Thread Xiubo Li
For example, the TCMU will use the map area as ISCSI commands & data ring buffer(uio0 --> map0). Currently the TCMU will using the fixed small size map area as the ring buffer, but this will be the bottleneck for high iops. Without knowing how large it is enough, so the new scheme will use the

Re: [PATCH] uio: add UIO_MEM_CUSTOM support

2017-02-15 Thread Xiubo Li
diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c index fba021f..6ca0ae0 100644 --- a/drivers/uio/uio.c +++ b/drivers/uio/uio.c @@ -708,6 +708,8 @@ static int uio_mmap(struct file *filep, struct vm_area_struct *vma) case UIO_MEM_LOGICAL: case UIO_MEM_VIRTUAL:

Re: [PATCH] target/user: Fix use-after-free cmd->se_cmd if the cmd isexpired

2017-01-04 Thread Xiubo Li
e issue. Maybe the best resolution is to move tcmu_handle_completion() between spin_lock(&udev->commands_lock) and spin_unlock(&udev->commands_lock)? Thanks. BRs Xiubo Li

[PATCH] blk-mq: remove the double hctx->numa_node init code.

2016-10-26 Thread Xiubo Li
Since the commit f14bbe77a96bb ("blk-mq: pass in suggested NUMA node to ->alloc_hctx()") has already computed and set the suggested NUMA node for hctx, so this code here is reduntant. Signed-off-by: Xiubo Li --- block/blk-mq.c | 19 ++- 1 file changed, 2 inse

[PATCH v2] attribute_container: Fix typo

2016-05-31 Thread Xiubo Li
The 't' in "function" was missing, this patch fixes this typo: s/funcion/function/g Signed-off-by: Xiubo Li --- Changes for V2: - Add changelog text. drivers/base/attribute_container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/attr

Re: [PATCH] attribute_container: Fix typo

2016-05-31 Thread Xiubo Li
On 31/05/2016 23:26, Greg KH wrote: On Tue, May 31, 2016 at 04:17:15PM +0800, Xiubo Li wrote: Signed-off-by: Xiubo Li I can't take patches without any changelog text, sorry. My mistake, I will send the v2 one. Thanks.

[PATCH] attribute_container: Fix typo

2016-05-31 Thread Xiubo Li
Signed-off-by: Xiubo Li --- drivers/base/attribute_container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c index 2ba4cac..95e3ef8 100644 --- a/drivers/base/attribute_container.c +++ b/drivers/base

[PATCHv2 2/3] regcache: Introduce the index parsing API by stride order

2016-01-04 Thread Xiubo Li
Here introduces regcache_get_index_by_order() for regmap cache, which uses the register stride order and bit rotation, to improve the performance. Signed-off-by: Xiubo Li --- drivers/base/regmap/internal.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/base/regmap/internal.h

[PATCHv2 3/3] regcache: flat: Introduce register strider order

2016-01-04 Thread Xiubo Li
I/O accessing. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache-flat.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/base/regmap/regcache-flat.c b/drivers/base/regmap/regcache-flat.c index 686c9e0..3ee7255 100644 --- a/drivers/base

[PATCHv2 0/3] regmap: Introduce regsiter stride order

2016-01-04 Thread Xiubo Li
Please ignore the V1 series. Changed in V2: - Introduce regsiter stride order by continue supporting non power of two strides. Xiubo Li (3): regmap: core: Introduce regsiter stride order regcache: Introduce the index parsing API by stride order regcache: flat: Introduce register strider

[PATCHv2 1/3] regmap: core: Introduce regsiter stride order

2016-01-04 Thread Xiubo Li
Since the register stride should always equal to 2^N, and bit rotation is much faster than multiplication and division. So introducing the stride order and using bit rotation to get the offset of the register from the index to improve the performance. Signed-off-by: Xiubo Li --- drivers/base

Re: [PATCH] regmap: flat: introduce register striding to savesomememories

2015-12-30 Thread Xiubo Li
zes including things like three bytes. Yes, if so, for this case the non power of two strides should be still supported. Thanks for your promotion, and I will think over of this carefully. BRs Xiubo Li -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in t

[PATCH 3/3] regcache: flat: Introduce regcache_get_index()

2015-12-17 Thread Xiubo Li
accessing. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache-flat.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/base/regmap/regcache-flat.c b/drivers/base/regmap/regcache-flat.c index 686c9e0..218cf39 100644 --- a/drivers/base/regmap/regcache

[PATCH 1/3] regmap: core: Introduce register stride order

2015-12-17 Thread Xiubo Li
Since the register stride should always equal to 2^N, and bit rotation is much faster than multiplication and division. So introducing the stride order and using bit rotation to get the offset of the register from the index to improve the performance. Signed-off-by: Xiubo Li --- drivers/base

[PATCH 0/3] Introduce reg stride order

2015-12-17 Thread Xiubo Li
Xiubo Li (3): regmap: core: Introduce register stride order regcache: Introduce the index parsing API regcache: flat: Introduce regcache_get_index() drivers/base/regmap/internal.h | 13 + drivers/base/regmap/regcache-flat.c | 11 ++- drivers/base/regmap/regmap.c

[PATCH 2/3] regcache: Introduce the index parsing API

2015-12-17 Thread Xiubo Li
Here introduces regcache_get_index() for regmap cache, which uses the register stride order and bit rotation. Signed-off-by: Xiubo Li --- drivers/base/regmap/internal.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h

[PATCH] regmap: use IS_ALIGNED instead of % to improve the performance

2015-12-16 Thread Xiubo Li
The stride value should always equal to 2^n, so we can use bit rotation instead of % to improve the performance. Signed-off-by: Xiubo Li --- drivers/base/regmap/regmap.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/base/regmap/regmap.c b/drivers

[PATCH] regmap: flat: introduce register striding to save some memories

2015-12-13 Thread Xiubo Li
ore memory space wasted. After introducing the register striding here can save some memeories for the system. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache-flat.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/base/regmap/regcache-flat.c

[PATCHv2 1/2] regmap: cache: Add warning info for the cache check

2015-12-10 Thread Xiubo Li
If there is no cache used for the drivers, the register defaults or the register defaults raw are not need any more. This patch will check this and print a warning. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache.c | 12 1 file changed, 8 insertions(+), 4 deletions

[PATCHv2 0/2] regmap: cache: Add invalid cache check warnings

2015-12-10 Thread Xiubo Li
Changed in V2: - Correct some words in the commit commnet and logs. - Add register defaults raw check. - Add [PATCHv2 2/2] Xiubo Li (2): regmap: cache: Add warning info for the cache check regmap: cache: Move the num_reg_defaults check as early as possible drivers/base/regmap/regcache.c

[PATCHv2 2/2] regmap: cache: Move the num_reg_defaults check as early as possible

2015-12-10 Thread Xiubo Li
If the register defaults are provided by the driver without the number by mistake, it should just return an error with one promotion. This should be as early as possible, then there is no need to verify the register defaults' stride and the other code followed. Signed-off-by: Xiu

Re: [PATCH] regmap: cache: Add warning info for the cache check

2015-12-10 Thread Xiubo Li
On 10/12/2015 20:45, Charles Keepax wrote: On Thu, Dec 10, 2015 at 10:40:53AM +0800, Xiubo Li wrote: If there is no cache used for the drivers, the register drfaults s/drfaults/defaults/ Yes,Thanks. are not need any more. This patch will check this and print a warning. Signed-off-by

[PATCH] regmap: cache: Add warning info for the cache check

2015-12-09 Thread Xiubo Li
If there is no cache used for the drivers, the register drfaults are not need any more. This patch will check this and print a warning. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/base/regmap

Re: [PATCH] regmap: speed up the regcache_init()

2015-12-09 Thread Xiubo Li
On 09/12/2015 23:05, Mark Brown wrote: On Wed, Dec 09, 2015 at 11:17:22AM +0800, Xiubo Li wrote: Yes, usually when the register cache is not used, the number of the defaults should be zero, but for some drivers like drv2267.c/led_lp8860.c will add the defaults register values though the

[PATCH] regmap: fix the warning about unused variable

2015-12-09 Thread Xiubo Li
The variable 'u64 *u64' should be only visible on 64-BIT platform. Signed-off-by: Xiubo Li --- drivers/base/regmap/regmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 1791180..a0d30a0 100644 --- a/drivers/b

Re: [PATCH 2/3] regmap: add 64-bit mode support

2015-12-09 Thread Xiubo Li
On 09/12/2015 16:45, Arnd Bergmann wrote: On Thursday 03 December 2015 17:31:52 Xiubo Li wrote: @@ -2488,11 +2581,17 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val, * we assume that the values are native

[PATCHv2 0/2] regmap: cache: Add 64-bit support.

2015-12-08 Thread Xiubo Li
Changed in v2: - Just add blank line to shut checkpatch up. Xiubo Li (2): regmap: cache: To suppress the noise of checkpatch regmap: cache: Add 64-bit mode support drivers/base/regmap/regcache.c | 21 + 1 file changed, 21 insertions(+) -- 1.8.3.1 -- To unsubscribe

[PATCHv2 2/2] regmap: cache: Add 64-bit mode support

2015-12-08 Thread Xiubo Li
Since the mmio has support the 64-bit has been supported for the 64-bit platform, so should the regcache core too. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap

[PATCHv2 1/2] regmap: cache: To suppress the noise of checkpatch

2015-12-08 Thread Xiubo Li
There will be some warning like the following when checking new patches near this code: "WARNING: Missing a blank line after declarations" This patch will suppress this warning. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache.c | 6 ++ 1 file changed, 6 insertion

Re: [PATCH 1/3] regmap: cache: Tidy up the code to suppress stylecheck warnings

2015-12-08 Thread Xiubo Li
On 09/12/2015 01:12, Mark Brown wrote: On Thu, Dec 03, 2015 at 05:31:51PM +0800, Xiubo Li wrote: There will be some warning like the following when checking new patches near this code: "WARNING: Missing a blank line after declarations" This patch will suppress th

Re: [PATCH] regmap: speed up the regcache_init()

2015-12-08 Thread Xiubo Li
On 09/12/2015 01:05, Mark Brown wrote: On Thu, Dec 03, 2015 at 10:19:10AM +0800, Xiubo Li wrote: If the cache is not used by the device driver, there is not need to check the striding of the registers. It will just return 0 from regcache_init() and let the register striding be checked in

[PATCH 0/3] regmap: add 64-bit support

2015-12-03 Thread Xiubo Li
This patch series add 64-bit support for 64 bit platform. Xiubo Li (3): regmap: cache: Tidy up the code to suppress style check warnings regmap: add 64-bit mode support regcache: add 64-bit mode support drivers/base/regmap/regcache.c | 45 +-- drivers/base/regmap/regmap.c

[PATCH 1/3] regmap: cache: Tidy up the code to suppress style check warnings

2015-12-03 Thread Xiubo Li
There will be some warning like the following when checking new patches near this code: "WARNING: Missing a blank line after declarations" This patch will suppress this warning. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache.c | 36 --

[PATCH 2/3] regmap: add 64-bit mode support

2015-12-03 Thread Xiubo Li
Since the mmio has support the 64-bit has been supported for the 64-bit platform, so should the regmap core too. Signed-off-by: Xiubo Li --- drivers/base/regmap/regmap.c | 99 1 file changed, 99 insertions(+) diff --git a/drivers/base/regmap

[PATCH 3/3] regcache: add 64-bit mode support

2015-12-03 Thread Xiubo Li
Since the mmio has support the 64-bit has been supported for the 64-bit platform, so should the regcache core too. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap

[PATCH 0/2] regmap: mmio: clean up the code

2015-12-02 Thread Xiubo Li
Xiubo Li (2): regmap: mmio: remove the useless code regmap: mmio: Add regmap_mmio_get_min_stride drivers/base/regmap/regmap-mmio.c | 50 +++ 1 file changed, 30 insertions(+), 20 deletions(-) -- 1.8.3.1 -- To unsubscribe from this list: send the line

[PATCH 1/2] regmap: mmio: remove the useless code

2015-12-02 Thread Xiubo Li
Signed-off-by: Xiubo Li --- drivers/base/regmap/regmap-mmio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/base/regmap/regmap-mmio.c b/drivers/base/regmap/regmap-mmio.c index 426a57e..38d0dc0 100644 --- a/drivers/base/regmap/regmap-mmio.c +++ b/drivers/base/regmap/regmap-mmio.c

[PATCH 2/2] regmap: mmio: Add regmap_mmio_get_min_stride

2015-12-02 Thread Xiubo Li
Splite the minimal stride parsing into one signal function. Signed-off-by: Xiubo Li --- drivers/base/regmap/regmap-mmio.c | 49 --- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/drivers/base/regmap/regmap-mmio.c b/drivers/base/regmap/regmap

[PATCH] regmap: speed up the regcache_init()

2015-12-02 Thread Xiubo Li
If the cache is not used by the device driver, there is not need to check the striding of the registers. It will just return 0 from regcache_init() and let the register striding be checked in proper place when needed. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache.c | 8 1

[PATCH 0/2] Regmap: let the code more readable

2015-11-20 Thread Xiubo Li
From: lixiubo Replace kzalloc/kmalloc with kcalloc/kmalloc_array. lixiubo (2): Regmap: replace kzalloc with kcalloc Regmap: replace kmalloc with kmalloc_array drivers/base/regmap/regcache-flat.c | 2 +- drivers/base/regmap/regcache-lzo.c| 6 +++--- drivers/base/regmap/regcache-rbtr

[PATCH 2/2] Regmap: replace kmalloc with kmalloc_array

2015-11-20 Thread Xiubo Li
From: lixiubo Replace kmalloc with specialized function kmalloc_array when the size is a multiplication of : number * size Signed-off-by: lixiubo --- drivers/base/regmap/regcache-lzo.c| 4 ++-- drivers/base/regmap/regcache-rbtree.c | 4 ++-- drivers/base/regmap/regmap-irq.c | 5 +++--

[PATCH 1/2] Regmap: replace kzalloc with kcalloc

2015-11-20 Thread Xiubo Li
From: lixiubo Replace kzalloc with specialized function kcalloc when the size is a multiplication of : number * sizeof Signed-off-by: lixiubo --- drivers/base/regmap/regcache-flat.c | 2 +- drivers/base/regmap/regcache-lzo.c| 2 +- drivers/base/regmap/regcache-rbtree.c | 5 +++-- drivers

[PATCH] regmap: fix typos in regmap.c

2015-08-12 Thread Xiubo Li
There are two typos in drivers/base/regmap/regmap.c, and they may introduce some noise when checking new patches. Signed-off-by: Xiubo Li --- drivers/base/regmap/regmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap

[PATCH] MAINTAINERS: update Xiubo's email address

2014-12-12 Thread Xiubo Li
My current email address will be gone shortly, update my email to be a gmail one. Signed-off-by: Xiubo Li --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7b712d8..c3e0abf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4022,7

[PATCHv2 2/4] video: fsl-dcfb: Add devicetree binding support

2014-12-03 Thread Xiubo Li
Add devicetree binding support for fsl-dcfb framebuffer driver. It uses the generic display bindings and helper functions. Signed-off-by: Xiubo Li --- .../devicetree/bindings/video/fsl,dcfb.txt | 52 ++ 1 file changed, 52 insertions(+) create mode 100644

[PATCHv2 1/4] video: fsl-dcfb: Add dcfb framebuffer driver for LS1021A platform

2014-12-03 Thread Xiubo Li
. o Dedicated memory blocks to store a cursor and Color Look Up Tables(CLUTs). o Temporal Dithering. Signed-off-by: Xiubo Li --- drivers/video/fbdev/Kconfig| 19 + drivers/video/fbdev/Makefile | 1 + drivers/video/fbdev/fsl-dcfb.c | 814 + 3 files

[PATCHv2 3/4] ARM: ls1021a: dtsi: Add dt node support for dcfb.

2014-12-03 Thread Xiubo Li
On LS1021A SoC, the dcfb device is in BE mode. Signed-off-by: Xiubo Li --- arch/arm/boot/dts/ls1021a.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index c70bb27..740a04e 100644 --- a/arch/arm/boot/dts

[PATCHv2 4/4] ARM: ls1021a: dts: Add and enable dt node for dcfb.

2014-12-03 Thread Xiubo Li
On LS1021A TWR board, the TFT LCD panel is WQVGA "480x272", and the bpp is 24. Signed-off-by: Xiubo Li --- arch/arm/boot/dts/ls1021a-twr.dts | 26 ++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls102

[PATCHv2 0/4] LS1021A: Add dcfb framebuffer driver support.

2014-12-03 Thread Xiubo Li
Framebuffer driver for the Freescale SoC Display Controller. Change in V2: - Use the native-mode timing as default. - Add to_fsl_private(). Xiubo Li (4): video: fsl-dcfb: Add dcfb framebuffer driver for LS1021A platform video: fsl-dcfb: Add devicetree binding support ARM: ls1021a: dtsi

[PATCH 3/4] ARM: ls1021a: dtsi: Add dt node support for dcfb.

2014-11-24 Thread Xiubo Li
On LS1021A SoC, the dcfb device is in BE mode. Signed-off-by: Xiubo Li --- arch/arm/boot/dts/ls1021a.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index c70bb27..740a04e 100644 --- a/arch/arm/boot/dts

[PATCH 1/4] video: fsl-dcfb: Add dcfb framebuffer driver for LS1021A platform

2014-11-24 Thread Xiubo Li
. o Dedicated memory blocks to store a cursor and Color Look Up Tables(CLUTs). o Temporal Dithering. Signed-off-by: Xiubo Li --- drivers/video/fbdev/Kconfig| 19 + drivers/video/fbdev/Makefile | 1 + drivers/video/fbdev/fsl-dcfb.c | 811 + 3 files

[PATCH 2/4] video: fsl-dcfb: Add devicetree binding support

2014-11-24 Thread Xiubo Li
Add devicetree binding support for fsl-dcfb framebuffer driver. It uses the generic display bindings and helper functions. Signed-off-by: Xiubo Li --- .../devicetree/bindings/video/fsl,dcfb.txt | 52 ++ 1 file changed, 52 insertions(+) create mode 100644

[PATCH 4/4] ARM: ls1021a: dts: Add and enable dt node for dcfb.

2014-11-24 Thread Xiubo Li
On LS1021A TWR board, the TFT LCD panel is WQVGA "480x272", and the bpp is 24. Signed-off-by: Xiubo Li --- arch/arm/boot/dts/ls1021a-twr.dts | 26 ++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/boot/dts/ls1021a-twr.dts b/arch/arm/boot/dts/ls102

[PATCH 0/4] LS1021A: Add dcfb framebuffer driver support.

2014-11-24 Thread Xiubo Li
Framebuffer driver for the Freescale SoC Display Controller. Xiubo Li (4): video: fsl-dcfb: Add dcfb framebuffer driver for LS1021A platform video: fsl-dcfb: Add devicetree binding support ARM: ls1021a: dtsi: Add dt node support for dcfb. ARM: ls1021a: dts: Add and enable dt node for dcfb

[PATCH] ARM: ls1021a: dtsi: add 'big-endian' property for scfg node

2014-11-24 Thread Xiubo Li
On LS1021A SoC, the scfg device is in BE mode. Signed-off-by: Xiubo Li --- arch/arm/boot/dts/ls1021a.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index 53c652a..28c37f1 100644 --- a/arch/arm/boot/dts/ls1021a.dtsi +++ b

[PATCH v2 0/3] pwm: ftm: add Power Management support

2014-10-14 Thread Xiubo Li
Changes in v2: - Fix one bug. - Add regmap cache support. - Remove run time PM for now. Xiubo Li (3): pwm: ftm: fix one bug of wrong counting the use counter. pwm: ftm: add regmap rbtree type cache support. pwm: ftm: add Power Management support for FTM pwm. drivers/pwm/pwm-fsl-ftm.c | 64

[PATCH v2 3/3] pwm: ftm: add Power Management support for FTM pwm.

2014-10-14 Thread Xiubo Li
Add PM support for FTM pwm driver using callback function suspend and resume in .driver.pm of platform_driver. Signed-off-by: Xiubo Li --- drivers/pwm/pwm-fsl-ftm.c | 49 ++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/drivers/pwm

[PATCH v2 1/3] pwm: ftm: fix one bug of wrong counting the use counter.

2014-10-14 Thread Xiubo Li
No matter what times the FTM pwm is enabled, the use_count will always be one. Signed-off-by: Xiubo Li --- drivers/pwm/pwm-fsl-ftm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pwm/pwm-fsl-ftm.c b/drivers/pwm/pwm-fsl-ftm.c index 0f2cc7e..1150598 100644 --- a

[PATCH v2 2/3] pwm: ftm: add regmap rbtree type cache support.

2014-10-14 Thread Xiubo Li
This patch is to prepare for adding PM support for FTM pwm driver using callback function suspend and resume in .driver.pm of platform_driver. Signed-off-by: Xiubo Li --- drivers/pwm/pwm-fsl-ftm.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/pwm/pwm-fsl-ftm.c b

[PATCH 3/6] regmap: cache: fix errno in regcache_hw_init()

2014-10-09 Thread Xiubo Li
When kmalloc() fails, we should return -ENOMEM. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index c13b821..8a7c270 100644 --- a/drivers/base/regmap

[PATCH 4/6] regmap: cache: speed regcache_hw_init() up.

2014-10-09 Thread Xiubo Li
This may speed regcache_hw_init() up for some cases that there has volatile registers. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index 8a7c270

[PATCH 5/6] regmap: cache: use kmalloc_array instead of kmalloc

2014-10-09 Thread Xiubo Li
This patch fixes checkpatch.pl warning for regmap cache. WARNING : prefer kmalloc_array over kmalloc with multiply Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/regmap/regcache.c b/drivers/base

[PATCH 6/6] regmap: cache: Fix possible ZERO_SIZE_PTR pointer dereferencing error.

2014-10-09 Thread Xiubo Li
eck before calling kmalloc(). If the count == 0, so we can make sure that all the registers are volatile, so no cache is need. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache.c | 50 -- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git

[PATCH 0/6] regmap: cache: cleanup and fix bugs.

2014-10-09 Thread Xiubo Li
Xiubo Li (6): regmap: cache: Sort include headers alphabetically regmap: cache: cleanup regcache_hw_init(). regmap: cache: fix errno in regcache_hw_init() regmap: cache: speed regcache_hw_init() up. regmap: cache: use kmalloc_array instead of kmalloc regmap: cache: Fix possible

[PATCH 2/6] regmap: cache: cleanup regcache_hw_init().

2014-10-09 Thread Xiubo Li
Remove the redundant code for regmap cache. Signed-off-by: Xiubo Li --- drivers/base/regmap/regcache.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index 4896804..c13b821 100644 --- a/drivers/base

[PATCH 1/6] regmap: cache: Sort include headers alphabetically

2014-10-09 Thread Xiubo Li
If the inlcude headers aren't sorted alphabetically, then the logical choice is to append new ones, however that creates a lot of potential for conflicts or duplicates because every change will then add new includes in the same location. Signed-off-by: Xiubo Li --- drivers/base/regmap/reg

[PATCH v3 1/2] clocksource: Update to the newer memory functions.

2014-09-29 Thread Xiubo Li
hem, using ioread{16,32}[be] is a good chioce here. Signed-off-by: Xiubo Li --- drivers/clocksource/mmio.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clocksource/mmio.c b/drivers/clocksource/mmio.c index 1593ade..d3cbf70 100644 --- a/drivers/clocksource/mm

[PATCH v3 2/2] clocksource: Add BE APIs support for clocksource counter reading.

2014-09-29 Thread Xiubo Li
Signed-off-by: Xiubo Li --- drivers/clocksource/mmio.c | 20 include/linux/clocksource.h | 4 2 files changed, 24 insertions(+) diff --git a/drivers/clocksource/mmio.c b/drivers/clocksource/mmio.c index d3cbf70..d35a407 100644 --- a/drivers/clocksource/mmio.c +++ b

[PATCH v3 0/2] clocksource: Add BE APIs support.

2014-09-29 Thread Xiubo Li
Change in V3: - Provide a separate patch for using newer memory accessors. Change in V2: - Using ioread{16,32}[be]() instead of readl_relaxed(). - Add clocksource_mmio_readX_Y_be() supports only. Xiubo Li (2): clocksource: Update to the newer memory functions. clocksource: Add BE APIs

[PATCH] mm, compaction: using uninitialized_var insteads setting 'flags' to 0 directly.

2014-09-28 Thread Xiubo Li
Setting 'flags' to zero will be certainly a misleading way to avoid warning of 'flags' may be used uninitialized. uninitialized_var is a correct way because the warning is a false possitive. Signed-off-by: Xiubo Li --- mm/compaction.c | 4 ++-- 1 file changed, 2 insert

[PATCH] regmap: fix possible ZERO_SIZE_PTR pointer dereferencing error.

2014-09-28 Thread Xiubo Li
Since we cannot make sure the 'val_count' will always be none zero here, and then if it equals to zero, the kmemdup() will return ZERO_SIZE_PTR, which equals to ((void *)16). So this patch fix this with just doing the zero check before calling kmemdup(). Signed-off-by: Xiubo Li --

  1   2   3   4   5   6   >