Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199858
b: refs/heads/master
c: d7636e0
h: refs/heads/master
v: v3
  • Loading branch information
apatard@mandriva.com authored and Greg Kroah-Hartman committed Jun 4, 2010
1 parent c7ca083 commit 709d088
Show file tree
Hide file tree
Showing 96 changed files with 29,012 additions and 1,165 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f9196e7c03bfefbb8933c7af579c3c6caa72ea53
refs/heads/master: d7636e0b0769e0f4f437ff33168d723f86e7c080
9 changes: 9 additions & 0 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,15 @@ Who: Avi Kivity <avi@redhat.com>

----------------------------

What: "acpi=ht" boot option
When: 2.6.35
Why: Useful in 2003, implementation is a hack.
Generally invoked by accident today.
Seen as doing more harm than good.
Who: Len Brown <len.brown@intel.com>

----------------------------

What: iwlwifi 50XX module parameters
When: 2.6.40
Why: The "..50" modules parameters were used to configure 5000 series and
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/frv/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,10 @@ asmlinkage void do_page_fault(int datammu, unsigned long esr0, unsigned long ear
*/
out_of_memory:
up_read(&mm->mmap_sem);
if (!user_mode(__frame))
goto no_context;
pagefault_out_of_memory();
return;
printk("VM: killing process %s\n", current->comm);
if (user_mode(__frame))
do_group_exit(SIGKILL);
goto no_context;

do_sigbus:
up_read(&mm->mmap_sem);
Expand Down
14 changes: 10 additions & 4 deletions trunk/arch/m32r/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code,
if ((error_code & ACE_INSTRUCTION) && !(vma->vm_flags & VM_EXEC))
goto bad_area;

survive:
/*
* If for any reason at all we couldn't handle the fault,
* make sure we exit gracefully rather than endlessly redo
Expand Down Expand Up @@ -270,10 +271,15 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code,
*/
out_of_memory:
up_read(&mm->mmap_sem);
if (!(error_code & ACE_USERMODE))
goto no_context;
pagefault_out_of_memory();
return;
if (is_global_init(tsk)) {
yield();
down_read(&mm->mmap_sem);
goto survive;
}
printk("VM: killing process %s\n", tsk->comm);
if (error_code & ACE_USERMODE)
do_group_exit(SIGKILL);
goto no_context;

do_sigbus:
up_read(&mm->mmap_sem);
Expand Down
9 changes: 5 additions & 4 deletions trunk/arch/mn10300/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,11 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long fault_code,
*/
out_of_memory:
up_read(&mm->mmap_sem);
if ((fault_code & MMUFCR_xFC_ACCESS) != MMUFCR_xFC_ACCESS_USR)
goto no_context;
pagefault_out_of_memory();
return;
monitor_signal(regs);
printk(KERN_ALERT "VM: killing process %s\n", tsk->comm);
if ((fault_code & MMUFCR_xFC_ACCESS) == MMUFCR_xFC_ACCESS_USR)
do_exit(SIGKILL);
goto no_context;

do_sigbus:
up_read(&mm->mmap_sem);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/kernel/skas/uaccess.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static int do_op_one_page(unsigned long addr, int len, int is_write,

current->thread.fault_catcher = NULL;

kunmap_atomic((void *)addr, KM_UML_USERCOPY);
kunmap_atomic(page, KM_UML_USERCOPY);

return n;
}
Expand Down
14 changes: 10 additions & 4 deletions trunk/arch/xtensa/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ void do_page_fault(struct pt_regs *regs)
* make sure we exit gracefully rather than endlessly redo
* the fault.
*/
survive:
fault = handle_mm_fault(mm, vma, address, is_write ? FAULT_FLAG_WRITE : 0);
if (unlikely(fault & VM_FAULT_ERROR)) {
if (fault & VM_FAULT_OOM)
Expand Down Expand Up @@ -145,10 +146,15 @@ void do_page_fault(struct pt_regs *regs)
*/
out_of_memory:
up_read(&mm->mmap_sem);
if (!user_mode(regs))
bad_page_fault(regs, address, SIGKILL);
else
pagefault_out_of_memory();
if (is_global_init(current)) {
yield();
down_read(&mm->mmap_sem);
goto survive;
}
printk("VM: killing process %s\n", current->comm);
if (user_mode(regs))
do_group_exit(SIGKILL);
bad_page_fault(regs, address, SIGKILL);
return;

do_sigbus:
Expand Down
22 changes: 6 additions & 16 deletions trunk/drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ enum {
EC_FLAGS_GPE_STORM, /* GPE storm detected */
EC_FLAGS_HANDLERS_INSTALLED, /* Handlers for GPE and
* OpReg are installed */
EC_FLAGS_BLOCKED, /* Transactions are blocked */
EC_FLAGS_FROZEN, /* Transactions are suspended */
};

/* If we find an EC via the ECDT, we need to keep a ptr to its context */
Expand Down Expand Up @@ -293,7 +293,7 @@ static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t)
if (t->rdata)
memset(t->rdata, 0, t->rlen);
mutex_lock(&ec->lock);
if (test_bit(EC_FLAGS_BLOCKED, &ec->flags)) {
if (test_bit(EC_FLAGS_FROZEN, &ec->flags)) {
status = -EINVAL;
goto unlock;
}
Expand Down Expand Up @@ -459,7 +459,7 @@ int ec_transaction(u8 command,

EXPORT_SYMBOL(ec_transaction);

void acpi_ec_block_transactions(void)
void acpi_ec_suspend_transactions(void)
{
struct acpi_ec *ec = first_ec;

Expand All @@ -468,11 +468,11 @@ void acpi_ec_block_transactions(void)

mutex_lock(&ec->lock);
/* Prevent transactions from being carried out */
set_bit(EC_FLAGS_BLOCKED, &ec->flags);
set_bit(EC_FLAGS_FROZEN, &ec->flags);
mutex_unlock(&ec->lock);
}

void acpi_ec_unblock_transactions(void)
void acpi_ec_resume_transactions(void)
{
struct acpi_ec *ec = first_ec;

Expand All @@ -481,20 +481,10 @@ void acpi_ec_unblock_transactions(void)

mutex_lock(&ec->lock);
/* Allow transactions to be carried out again */
clear_bit(EC_FLAGS_BLOCKED, &ec->flags);
clear_bit(EC_FLAGS_FROZEN, &ec->flags);
mutex_unlock(&ec->lock);
}

void acpi_ec_unblock_transactions_early(void)
{
/*
* Allow transactions to happen again (this function is called from
* atomic context during wakeup, so we don't need to acquire the mutex).
*/
if (first_ec)
clear_bit(EC_FLAGS_BLOCKED, &first_ec->flags);
}

static int acpi_ec_query_unlocked(struct acpi_ec *ec, u8 * data)
{
int result;
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/acpi/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ void acpi_early_processor_set_pdc(void);
int acpi_ec_init(void);
int acpi_ec_ecdt_probe(void);
int acpi_boot_ec_enable(void);
void acpi_ec_block_transactions(void);
void acpi_ec_unblock_transactions(void);
void acpi_ec_unblock_transactions_early(void);
void acpi_ec_suspend_transactions(void);
void acpi_ec_resume_transactions(void);

/*--------------------------------------------------------------------------
Suspend/Resume
Expand Down
17 changes: 11 additions & 6 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ module_param(nocst, uint, 0000);
static unsigned int latency_factor __read_mostly = 2;
module_param(latency_factor, uint, 0644);

static u64 us_to_pm_timer_ticks(s64 t)
static s64 us_to_pm_timer_ticks(s64 t)
{
return div64_u64(t * PM_TIMER_FREQUENCY, 1000000);
}
Expand Down Expand Up @@ -731,10 +731,10 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)

seq_puts(seq, "demotion[--] ");

seq_printf(seq, "latency[%03d] usage[%08d] duration[%020Lu]\n",
seq_printf(seq, "latency[%03d] usage[%08d] duration[%020llu]\n",
pr->power.states[i].latency,
pr->power.states[i].usage,
us_to_pm_timer_ticks(pr->power.states[i].time));
(unsigned long long)pr->power.states[i].time);
}

end:
Expand Down Expand Up @@ -861,6 +861,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
ktime_t kt1, kt2;
s64 idle_time_ns;
s64 idle_time;
s64 sleep_ticks = 0;

pr = __get_cpu_var(processors);

Expand Down Expand Up @@ -905,6 +906,8 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
idle_time = idle_time_ns;
do_div(idle_time, NSEC_PER_USEC);

sleep_ticks = us_to_pm_timer_ticks(idle_time);

/* Tell the scheduler how much we idled: */
sched_clock_idle_wakeup_event(idle_time_ns);

Expand All @@ -915,7 +918,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
cx->usage++;

lapic_timer_state_broadcast(pr, cx, 0);
cx->time += idle_time;
cx->time += sleep_ticks;
return idle_time;
}

Expand All @@ -937,6 +940,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
ktime_t kt1, kt2;
s64 idle_time_ns;
s64 idle_time;
s64 sleep_ticks = 0;


pr = __get_cpu_var(processors);
Expand Down Expand Up @@ -1018,10 +1022,11 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
spin_unlock(&c3_lock);
}
kt2 = ktime_get_real();
idle_time_ns = ktime_to_ns(ktime_sub(kt2, kt1));
idle_time_ns = ktime_to_us(ktime_sub(kt2, kt1));
idle_time = idle_time_ns;
do_div(idle_time, NSEC_PER_USEC);

sleep_ticks = us_to_pm_timer_ticks(idle_time);
/* Tell the scheduler how much we idled: */
sched_clock_idle_wakeup_event(idle_time_ns);

Expand All @@ -1032,7 +1037,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
cx->usage++;

lapic_timer_state_broadcast(pr, cx, 0);
cx->time += idle_time;
cx->time += sleep_ticks;
return idle_time;
}

Expand Down
Loading

0 comments on commit 709d088

Please sign in to comment.