PCI: pciehp: Convert to threaded polling
We've just converted pciehp to threaded IRQ handling, but still cannot sleep in pciehp_ist() because the function is also called in poll mode, which runs in softirq context (from a timer). Convert poll mode to a kthread so that pciehp_ist() always runs in task context. Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:

committed by
Bjorn Helgaas

parent
7b4ce26bcf
commit
ec07a44730
@@ -97,7 +97,7 @@ struct event_info {
|
||||
* used for synchronous writes to the Slot Control register
|
||||
* @slot_cap: cached copy of the Slot Capabilities register
|
||||
* @slot_ctrl: cached copy of the Slot Control register
|
||||
* @poll_timer: timer to poll for slot events if no IRQ is available,
|
||||
* @poll_thread: thread to poll for slot events if no IRQ is available,
|
||||
* enabled with pciehp_poll_mode module parameter
|
||||
* @cmd_started: jiffies when the Slot Control register was last written;
|
||||
* the next write is allowed 1 second later, absent a Command Completed
|
||||
@@ -122,7 +122,7 @@ struct controller {
|
||||
wait_queue_head_t queue;
|
||||
u32 slot_cap;
|
||||
u16 slot_ctrl;
|
||||
struct timer_list poll_timer;
|
||||
struct task_struct *poll_thread;
|
||||
unsigned long cmd_started; /* jiffies */
|
||||
unsigned int cmd_busy:1;
|
||||
unsigned int link_active_reporting:1;
|
||||
|
Reference in New Issue
Block a user