Generally, system resources should be configured as disabled
at default, and for drivers, the correct usage should be only requesting
and enabling the resources just in need, then the sort of 'cleanup' things
can be avoided.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line
On Fri, May 10, 2013 at 1:04 AM, Takashi Iwai wrote:
> At Thu, 9 May 2013 16:43:28 +0800,
> Ming Lei wrote:
>>
>> On Thu, May 9, 2013 at 3:31 PM, Takashi Iwai wrote:
>> > At Thu, 9 May 2013 09:25:35 +0800,
>> > Ming Lei wrote:
>> >>
>>
I found this bug in my edac testing on intel 56xx motherboard. I did mce-inject
test on AMD 64 CPU also. Thanks
Subject: [PATCH] mce_start times out waiting for the logical cores which have
never received the mce broadcast. It can potentially turn non fatal mce
exception into kernel panic com
print_info(KERN_DEFAULT);
+ //show_regs_print_info(KERN_DEFAULT);
Looks a bit weird, anyone can give a hint?
Thanks,
--
Ming Lei
[1], 'perf top' mistaken output
Samples: 17K of event 'cpu-clock', Event count (approx.): 3516532661
97.51% [smsc95xx][k] 0x
On Fri, May 17, 2013 at 10:16 AM, Ming Lei wrote:
> diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
> index f219703..89bc3a4 100644
> --- a/arch/arm/kernel/process.c
> +++ b/arch/arm/kernel/process.c
> @@ -225,7 +225,7 @@ void __show_regs(struc
o persue this, I guess other obvious questions are: which kernel
> are you running? Does this affect multiple architectures (your diff only
Either 3.10-rc1 or today's -next tree(3.10.0-rc1-next-20130516).
> changes ARM)? What's the workload which you are profiling?
I only tested i
; We need an apples-for-apples comparison if you think there's a bug in the
> kernel. Can you try profiling hackbench or something?
>
>> Or could anyone else try to verify the problem on their own environment?
>
> How are you running perf top?
sudo perf top
Thanks
--
Ming
On Fri, May 17, 2013 at 5:54 PM, Will Deacon wrote:
> On Fri, May 17, 2013 at 10:48:23AM +0100, Ming Lei wrote:
>> On Fri, May 17, 2013 at 5:36 PM, Will Deacon wrote:
>> >
>> > It's probably easier if you choose a workload, otherwise it's difficult to
&
> device_unregister(), is it correct ?
Looks it is correct but it is a bit implicit.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
fix the firmware loader side, at least, not to
>> stall during shutdown.
>
> What's the status of these? Ming, still have objections?
I have no objections now, but Takashi need to submit v2 to fix one
mistake which may break current firmware cache.
Thanks,
--
Ming Lei
--
To unsub
@@@
70
sys_enter_select |@
49
sys_enter_read |
25
sys_enter_write |
22
sys_enter_clock_gettime |@@@
19
sys_enter_ioctl |@
6
sys_enter_gettimeofday |
4
sys_enter_munmap |
3
On Wed, May 22, 2013 at 12:15 PM, Ming Lei wrote:
> On Tue, May 21, 2013 at 11:56 AM, zhangwei(Jovi)
>
> Nice job, I have run it on ARM already with only one line change.
>
> But looks 'Control-C' can't stop the tracing or need some time to complete it,
> see b
On Wed, May 22, 2013 at 12:19 PM, Ming Lei wrote:
> On Wed, May 22, 2013 at 12:15 PM, Ming Lei wrote:
>> On Tue, May 21, 2013 at 11:56 AM, zhangwei(Jovi)
>>
>> Nice job, I have run it on ARM already with only one line change.
>>
>> But looks 'Control-C
isters a
> reboot notifier so that it can abort all pending f/w bufs before
> issuing usermodehelper_disable().
>
> Signed-off-by: Takashi Iwai
Acked-by: Ming Lei
thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a
ed to set that option, so I'm not bothered
> if there's an actual bug here or not, but the behaviour seems odd.
If the option isn't set, the firmware will be lost for the requested CPU, :-)
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe lin
it has been already there, wrt. this problem, I think we
need to know why the direct loading is failed.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at
equested f/w file doesn't exist.
> And it's fine, because the microcode update is an optional operation.
> If no f/w file is found, it's not handled as an error. It just means
> that no need to update, continuing to work.
OK, as said above, the example is very specific, and might b
On Thu, May 23, 2013 at 8:05 PM, Takashi Iwai wrote:
> At Thu, 23 May 2013 18:45:29 +0800,
> Ming Lei wrote:
>>
>> On Thu, May 23, 2013 at 6:36 PM, Takashi Iwai wrote:
>> >
>> > No, f/w loader always fall back to user mode helper, as long as its
>>
On Thu, May 23, 2013 at 9:21 PM, Takashi Iwai wrote:
> At Thu, 23 May 2013 21:04:53 +0800,
> Ming Lei wrote:
>>
>> On Thu, May 23, 2013 at 8:05 PM, Takashi Iwai wrote:
>> > At Thu, 23 May 2013 18:45:29 +0800,
>> > Ming Lei wrote:
>> >>
>> &
On Thu, May 23, 2013 at 10:36 PM, Takashi Iwai wrote:
> At Thu, 23 May 2013 22:28:51 +0800,
> Ming Lei wrote:
>>
>> On Thu, May 23, 2013 at 9:21 PM, Takashi Iwai wrote:
>> > At Thu, 23 May 2013 21:04:53 +0800,
>> > Ming Lei wrote:
>> >>
>> &
is falls back to user helper
> mode, and now you're seeing the problem.
The problem is that if driver call request_firmware(), it means it need
the firmware and it know there should be one. So maybe the driver
shouldn't call request_firmware() if it can figure out that case.
> S
Iwai's patch of "firmware: Avoid deadlock of
usermodehelper lock at shutdown".
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/m
t hit in direct loading too.
Cc: Takashi Iwai
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c |9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index e650c25..64e7870 100644
--- a/drivers/base/f
This patch kills the firmware loading requests of FW_ACTION_NOHOTPLUG
before suspend to avoid blocking suspend because there is no timeout
for these requests.
Cc: Takashi Iwai
Signed-off-by: Ming Lei
---
This patch depends on Takashi Iwai's patch of "firmware: Avoid deadlock of
user
On Mon, May 27, 2013 at 8:40 PM, anish singh
wrote:
> On Mon, May 27, 2013 at 5:53 PM, Takashi Iwai wrote:
>> At Mon, 27 May 2013 17:26:22 +0530,
>> anish singh wrote:
>>>
>>> On Mon, May 27, 2013 at 4:00 PM, Ming Lei wrote:
>>> > Generally there ar
observed on
ARMv7(Pandaboard) with the chage, at average ~25us is saved about ehci irq
handling under usbnet ping test case.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordo
ctual completed buffer should be more
efficient. Considered that unmapping is often called in hard irq
context, time of irq handling can be saved.
Cc: Shuah Khan
Cc: Joerg Roedel
Cc: Andrew Morton
Cc: Alexander Duyck
Cc: Konrad Rzeszutek Wilk
Signed-off-by: Ming Lei
---
lib/dma-debug.c |
:
#ping -f -s 1472 IP_A
- compute ehci interrupt handling time on Pandaboard during ping
test
Cc: Alan Stern
Signed-off-by: Ming Lei
---
drivers/usb/core/hcd.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/core/hcd.c b/drivers/usb
).
It isn't related with perf tool.
Finally, looks the problem disappeared after upgrading gcc to "gcc version
4.7.3 (Sourcery CodeBench Lite 2013.05-24)" from "gcc version 4.5.1
(Sourcery G++ Lite 2010.09-50)", so it should be caused by compiler.
Thanks,
--
Ming Lei
--
e or 3.10,
a revert commit is required.
We know it is a problem, sorry, :-(
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
st code on the
link:
https://patchwork.kernel.org/patch/2160771/
This patch fixes the use after free under this situation.
Cc:
Reported-by: Li Zefan
Signed-off-by: Ming Lei
---
fs/sysfs/dir.c | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/fs/sys
efore
setup_arch(), and enabling CONFIG_LOCK_STAT or CONFIG_DEBUG_LOCKDEP
can trigger kernel hang.
Cc: Tejun Heo
Cc: Peter Zijlstra
Cc: Ingo Molnar
Cc: Rob Herring
Cc: Will Deacon
Cc: Nicolas Pitre
Cc: Russell King
Signed-off-by: Ming Lei
---
arch/arm/kernel/setup.c |7 +++
1
ore cpu_init() called inside setup_arch().
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
ccessed by lockdep before
setup_arch(), and enabling CONFIG_LOCK_STAT or CONFIG_DEBUG_LOCKDEP
can trigger kernel hang.
Cc: Peter Zijlstra
Cc: Ingo Molnar
Cc: Rob Herring
Cc: Will Deacon
Cc: Nicolas Pitre
Cc: Russell King
Signed-off-by: Ming Lei
---
V1:
- documents lockdep uses percp
((err = device_add(ddev)))
+ return err;
if (!sysfs_deprecated) {
err = sysfs_create_link(block_depr, &ddev->kobj,
kobject_name(&ddev->kobj));
if (err) {
device_del(ddev);
- return;
+ return err;
}
}
@@ -566,6 +566,7 @@ exit:
while ((part = disk_part_iter_next(&piter)))
kobject_uevent(&part_to_dev(part)->kobj, KOBJ_ADD);
disk_part_iter_exit(&piter);
+ return 0;
}
/**
@@ -613,7 +614,11 @@ void add_disk(struct gendisk *disk)
blk_register_region(disk_devt(disk), disk->minors, NULL,
exact_match, exact_lock, disk);
- register_disk(disk);
+ retval = register_disk(disk);
+ if (retval) {
+ WARN_ON(retval);
+ return;
+ }
blk_register_queue(disk);
/*
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
m a bit.
Cc: Andrew Morton
Cc: Shaohua Li
Cc: Al Viro
Signed-off-by: Ming Lei
---
include/linux/atomic.h | 28 ++--
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/include/linux/atomic.h b/include/linux/atomic.h
index 5b08a85..aa951d8 100644
--- a/includ
68]
> [watchdog] kernel became tainted! Last seed was 2579687274
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
ice() from usbdev_do_ioctl().
I am wondering why the device lock is needed for usbdev_do_ioctl()? Looks
device lock isn't required for USB transfer of kernel driver.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a messa
we need to hold device lock in submitting
URB path? Device lock isn't required before submitting URBs
in kernel driver.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More major
On Tue, Mar 12, 2013 at 12:08 AM, Alan Stern wrote:
> On Mon, 11 Mar 2013, Ming Lei wrote:
>
>> On Mon, Mar 11, 2013 at 11:32 PM, Alan Stern
>> wrote:
>> >
>> > Of course you have to lock the device before changing its driver. What
>> > would happ
On Tue, Mar 12, 2013 at 7:59 AM, Frederic Weisbecker wrote:
> 2013/3/9 Ming Lei :
>> Generally, both atomic_inc_unless_negative() and
>> atomic_dec_unless_positive() need at least two atomic_cmpxchg()
>> to complete the atomic operation. In fact, the 1st atomic_cmpxchg()
&g
On Thu, Mar 7, 2013 at 9:35 PM, Ming Lei wrote:
> Commit 14318efb(ARM: 7587/1: implement optimized percpu variable access)
> introduces arm's __my_cpu_offset to optimize percpu vaiable access,
> which really works well on hackbench, but will cause __my_cpu_offset
> to return gar
) around atomic_read()
can guarantee that too.
Andrew, please ignore the patch, thanks.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
On Wed, Jul 25, 2012 at 10:37 PM, Borislav Petkov wrote:
> On Wed, Jul 25, 2012 at 01:00:06AM +0800, Ming Lei wrote:
>> @@ -213,13 +291,8 @@ static ssize_t firmware_loading_show(struct device *dev,
>> /* firmware holds the ownership of pages */
>> static void firmware_f
| 15 +
6 files changed, 747 insertions(+), 116 deletions(-)
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
cycle.
In fact, this patch fixes one bug: if writing data into
firmware loader device is bypassed between writting 1 and 0 to
'loading', OOPS will be triggered without the patch.
Also handle the vmap failure case, and add some comments to make
code more readable.
Signed-off-by: Ming Le
mutex_lock(&fw_lock), and 'echo 1 > loading'
still may happen during the period, so this patch checks FW_STATUS_DONE
to prevent pages' buffer completed from being freed in firmware_loading_store.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 20 ++
oader device name to fix the problem since the following patches
for caching firmware will make sure only one loading for same
firmware is alllowd at the same time.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dr
This patch introduces struct firmware_buf to describe the buffer
which holds the firmware data, which will make the following
cache_firmware/uncache_firmware implemented easily.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 180 +++--
1 file
mage and its drivers
call request_firmware concurrently.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 240 +
include/linux/firmware.h |3 +
2 files changed, 174 insertions(+), 69 deletions(-)
diff --git a/drivers/base/firmware_cl
x27;t request firmware from user space.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 100 +
include/linux/firmware.h | 12 +
2 files changed, 104 insertions(+), 8 deletions(-)
diff --git a/drivers/base/firmware_class.c b/drivers
constraint
should be reasonable and can be satisfied.
Also this patch holds the reference count of @device before
schedule_work() in request_firmware_nowait() to avoid that
the @device is released after request_firmware_nowait returns
and before the worker function is scheduled.
Signed-off-by: Ming Lei
request_firmware_nowait is allowed to be called in atomic
context now if @gfp is GFP_ATOMIC, so fix the obsolete
comments and states which situations are suitable for using
it.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 10 +++---
1 file changed, 7 insertions(+), 3
This patch will store firmware name into devres list of the device
which is requesting firmware loading, so that we can implement
auto cache and uncache firmware for devices in need.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 64 +
1
This patch introduces one devres API of devres_for_each_res
so that the device's driver can iterate each resource it has
interest in.
The firmware loader will use the API to get each firmware name
from the device instance.
Signed-off-by: Ming Lei
---
drivers/base/devres.c |
The above helpers will be used to cache device firmware during
system suspend/resume cycle in the following patches.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 221 +++--
1 file changed, 215 insertions(+), 6 deletions(-)
diff --git a/drivers
Because device_cache_fw_images only cache the firmware which has been
loaded sucessfully at leat once, using a small loading timeout should
be reasonable.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/drivers/base
ering suspend.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 32
1 file changed, 32 insertions(+)
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 8ca0052..5bd2100 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers
suspend.
Cc: linux-wirel...@vger.kernel.org
Cc: "Luis R. Rodriguez"
Cc: Jouni Malinen
Cc: Vasanthakumar Thiagarajan
Cc: Senthil Balasubramanian
Cc: "John W. Linville"
Signed-off-by: Ming Lei
---
drivers/net/wireless/ath/ath9k/hif_usb.c | 34 --
The wmb() inside fw_load_abort is not necessary, since
complete() and wait_on_completion() has implied one pair
of memory barrier.
Also wmb() isn't a correct usage, so just remove it.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c |1 -
1 file changed, 1 deletion(-)
diff
On ARMv7, sizeof(struct dev_pm_info) becomes 344Bytes from 352Bytes
after applying the patch which only changes fields' order, so we can
save 8bytes per device. Nothing in behaviour changed.
GCC: gcc version 4.5.1
Signed-off-by: Ming Lei
---
include/linux/pm.h | 22 +++-
Cc systemd-devel
Hi,
On Tue, Aug 21, 2012 at 1:34 PM, Ming Lei wrote:
> Hi Kay,
>
> I found that udev 182 doesn't response for the request_firmware in
> module_probe path until 30sec later after the 'ADD' event of firmware
> device, but no such problem in udev17
On Thu, Aug 23, 2012 at 11:31 PM, Kay Sievers wrote:
> On Thu, Aug 23, 2012 at 5:16 PM, Ming Lei wrote:
>> On Tue, Aug 21, 2012 at 1:34 PM, Ming Lei wrote:
>
>>> I found that udev 182 doesn't response for the request_firmware in
>>> module_probe path until 3
inside its .probe(), and maybe udev need to support the usage.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
: matched device spdif-dit with driver
> spdif-dit
> bus: 'platform': really_probe: probing driver spdif-dit with device spdif-dit
> driver: 'spdif-dit': driver_bound: bound to device 'spdif-dit'
> bus: 'platform': really_probe: bound device spdif
p;priv->knode_bus, &bus->p->klist_drivers);
if (drv->bus->p->drivers_autoprobe) {
error = driver_attach(drv);
if (error)
goto out_unregister;
}
- klist_add_tail(&priv->knode_bus, &bus->p->klist_dri
On Sat, Aug 4, 2012 at 12:01 PM, Ming Lei wrote:
> Hi,
>
> In [1][2], the problem below has been discussed for some time:
>
> device's firmware may be lost during suspend/resume
> cycle because device might be unplugged and plugged again
> or
ete:
timer = lock_timer(timer_id, &flags);
- if (!timer)
+ if (!timer) {
+ read_unlock(&tasklist_lock);
return -EINVAL;
+ }
if (timer_delete_hook(timer) == TIMER_RETRY) {
unlock_timer(timer, flags);
goto retry_del
CC guys who discussed the problem in the below link in Jan. :
http://marc.info/?t=13252895602&r=10&w=2
On Fri, Jul 20, 2012 at 8:33 PM, Ming Lei wrote:
> The RFC patch is just for discussing if the idea of deferring
> request_firmware is doable for addressin
On Sat, Jul 21, 2012 at 5:56 PM, Rafael J. Wysocki wrote:
> On Saturday, July 21, 2012, Ming Lei wrote:
>> CC guys who discussed the problem in the below link in Jan. :
>>
>> http://marc.info/?t=13252895602&r=10&w=2
>>
>> On Fri, Jul 20, 2012
Thanks for your so detailed comments.
On Sun, Jul 22, 2012 at 1:31 AM, Linus Torvalds
wrote:
> On Fri, Jul 20, 2012 at 5:33 AM, Ming Lei wrote:
>> The RFC patch is just for discussing if the idea of deferring
>> request_firmware is doable for addressing the issue of
>>
On Sun, Jul 22, 2012 at 1:49 AM, Rafael J. Wysocki wrote:
> On Friday, July 20, 2012, Ming Lei wrote:
>> + if (system_state != SYSTEM_RUNNING)
>> + return -EPROBE_DEFER;
>
> You can't just return here, _request_firmware_cleanup() has to be done
On Sun, Jul 22, 2012 at 4:38 AM, Linus Torvalds
wrote:
>
> I agree that this is a problem. At the same time, early boot has some
> of the exact same problems as resume has, and I do wish that people
> would ask themselves: "why do I try to load the firmware at early boot
> time"?
>
> There is real
to do it.
[1]. http://marc.info/?t=13427879084&r=1&w=2
[2]. http://marc.info/?t=13252895602&r=10&w=2
[3]. http://marc.info/?l=linux-usb&m=132554118928398&w=2
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
t
cycle.
In fact, this patch fixes one bug: if writing data into
firmware loader device is bypassed between writting 1 and 0 to
'loading', OOPS will be triggered without the patch.
Also add some comments to make code more readable.
Signed-off-by: Ming Lei
---
drivers/base/fir
mutex_lock(&fw_lock), and 'echo 1 > loading'
still may happen during the period, so this patch checks FW_STATUS_DONE
to prevent pages' buffer completed from being freed in firmware_loading_store.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 20 ++
The wmb() inside fw_load_abort is not necessary, since
complete() and wait_on_completion() has implied one pair
of memory barrier.
Also wmb() isn't a correct usage, so just remove it.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c |1 -
1 file changed, 1 deletion(-)
diff
This patch introduces struct firmware_buf to describe the buffer
which holds the firmware data, which will make the following
cache_firmware/uncache_firmware implemented easily.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 176 +++--
1 file
oncurrently.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 222 -
include/linux/firmware.h |3 +
2 files changed, 157 insertions(+), 68 deletions(-)
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 986
x27;t request firmware from user space.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 79 +
include/linux/firmware.h | 12 +++
2 files changed, 91 insertions(+)
diff --git a/drivers/base/firmware_class.c b/drivers
called in atomic context now,
so fix the obsolete comments.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c |9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 674cb11..540b2e1 100644
--- a
This patch will store firmware name into devres list of the device
which is requesting firmware loading, so that we can implement
auto cache firmware for devices in need.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 66 +
1 file changed
This patch introduces one devres API of devres_for_each_res
so that the device's driver can iterate each resource it has
interest in.
The firmware loader will use the API to get each firmware name
from the device instance.
Signed-off-by: Ming Lei
---
drivers/base/devres.c |
ached firmwares.
The above helpers should be used to cache device firmwares during
system suspend/resume cycle in the following patches.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 236 +++--
1 file changed, 230 insertions(+), 6 deletions(-)
diff --
Because device_cache_firmwares only cache the firmware which has been
loaded sucessfully at leat once, using a small loading timeout should
be OK.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/drivers/base
ering suspend.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c | 32
1 file changed, 32 insertions(+)
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 0918b26..59384e0 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers
oader device name to fix the problem since the following patches
for caching firmware will make sure only one loading for same
firmware is alllowd at the same time.
Signed-off-by: Ming Lei
---
drivers/base/firmware_class.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dr
On Wed, Jul 25, 2012 at 1:00 AM, Ming Lei wrote:
> Hi,
>
> In [1][2], the problem below has been discussed for some time:
>
> device's firmware may be lost during suspend/resume
> cycle because device is unplugged and plugged again
> or device exp
From: Ming Lei
device_del can happen anytime, so once it happens,
the devres of the device will be freed inside device_del, but
drivers can't know it has been deleted and may still add
resources into the device, so memory leak is caused.
This patch moves the devres_release_all to fi
can't solve the isight camera problem after warm reset. But now,
this specific
problem can be solved easily by letting its driver defer probe.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger
pages buffer should be dropped and return failure
from request_firmware or the callback of request_firmware_nowait.
I will fix it against this patch set if cache/uncache firmware can be
accepted.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel&q
+0x0/0x48)
[ 168.260375] Enabling non-boot CPUs ...
Signed-off-by: Ming Lei
---
kernel/watchdog.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 69add8a..7ddb11b 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -623,7
__thaw_task(p);
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
usermodehelper_enable();
+ /* let kthread see usermodehelper enabled flag */
+ thaw_kernel_threads();
+
schedule();
printk("done.\n");
}
purpose since
- usermodehelper flag should be set/get as enabled after user space
tasks have been waken up
- no harm to thaw all user space tasks before thawing all kernel threads
(there isn't any dependency about the thawing order)
Thanks,
--
Ming Lei
--
To unsubscribe from this
On Wed, Jul 25, 2012 at 8:50 PM, Ming Lei wrote:
> - no harm to thaw all user space tasks before thawing all kernel threads
> (there isn't any dependency about the thawing order)
Sorry, I mean there isn't any constraint about the order, but the 'dependency'
@@ void thaw_processes(void)
> pm_freezing = false;
> pm_nosig_freezing = false;
>
> + /*
> +* User mode helper are available again (or will be,
> +* modulo scheduling)
> +*/
> + usermodehelper_enable();
This may wake up tasks earlier than befor
On Wed, Jul 25, 2012 at 3:54 PM, Stephen Boyd wrote:
> On 7/24/2012 10:00 AM, Ming Lei wrote:
>>
>> +
>> +int cache_firmware(const char *name)
>> +{
>> + return -ENOENT;
>> +}
>> +
>> +int uncache_firmware(const char *name)
>> +{
kup_and_alloate_buf(). I will try to introduce __fw_lookup_buf
and reuse it in both fw_lookup_and_alloate_buf and fw_lookup_buf.
Also will fix the comments and code style you mentioned in -v1.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel"
offset += page_cnt;
>> count -= page_cnt;
>> @@ -320,12 +334,13 @@ out:
>
> While you're at it, you can indent this "out:" label one space to the
> right so that the diff can pick up the function name in the hunk tag
> above instead of the labe
Asynchronous variant of request_firmware() for user contexts where
* it is not possible to sleep for long time.
and maybe it should be changed to below:
* Asynchronous variant of request_firmware() for user contexts where
* it is not possible to sleep for long time or can't
301 - 400 of 2944 matches
Mail list logo