Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 597
b: refs/heads/master
c: 8443b16
h: refs/heads/master
i:
  595: b73e6b5
v: v3
  • Loading branch information
Lennert Buytenhek authored and Russell King committed Apr 29, 2005
1 parent a54d689 commit 0a817d5
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 99 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: a879cbbb34cbecfa9707fbb6e5a00c503ac1ecb9
refs/heads/master: 8443b165f13d21214e5d5495eee7c3bf7f2456bf
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-ixp2000/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static int pci_master_aborts = 0;

static int clear_master_aborts(void);

static u32 *
u32 *
ixp2000_pci_config_addr(unsigned int bus_nr, unsigned int devfn, int where)
{
u32 *paddress;
Expand Down
8 changes: 5 additions & 3 deletions trunk/arch/i386/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,11 @@ restore_nocheck:
.section .fixup,"ax"
iret_exc:
sti
pushl $0 # no error code
pushl $do_iret_error
jmp error_code
movl $__USER_DS, %edx
movl %edx, %ds
movl %edx, %es
movl $11,%eax
call do_exit
.previous
.section __ex_table,"a"
.align 4
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/i386/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@ DO_ERROR(10, SIGSEGV, "invalid TSS", invalid_TSS)
DO_ERROR(11, SIGBUS, "segment not present", segment_not_present)
DO_ERROR(12, SIGBUS, "stack segment", stack_segment)
DO_ERROR_INFO(17, SIGBUS, "alignment check", alignment_check, BUS_ADRALN, 0)
DO_ERROR_INFO(32, SIGSEGV, "iret exception", iret_error, ILL_BADSTK, 0)

fastcall void do_general_protection(struct pt_regs * regs, long error_code)
{
Expand Down
94 changes: 5 additions & 89 deletions trunk/drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static inline void adjust_jiffies(unsigned long val, struct cpufreq_freqs *ci)
}
if ((val == CPUFREQ_PRECHANGE && ci->old < ci->new) ||
(val == CPUFREQ_POSTCHANGE && ci->old > ci->new) ||
(val == CPUFREQ_RESUMECHANGE || val == CPUFREQ_SUSPENDCHANGE)) {
(val == CPUFREQ_RESUMECHANGE)) {
loops_per_jiffy = cpufreq_scale(l_p_j_ref, l_p_j_ref_freq, ci->new);
dprintk("scaling loops_per_jiffy to %lu for frequency %u kHz\n", loops_per_jiffy, ci->new);
}
Expand Down Expand Up @@ -865,91 +865,12 @@ unsigned int cpufreq_get(unsigned int cpu)
EXPORT_SYMBOL(cpufreq_get);


/**
* cpufreq_suspend - let the low level driver prepare for suspend
*/

static int cpufreq_suspend(struct sys_device * sysdev, u32 state)
{
int cpu = sysdev->id;
unsigned int ret = 0;
unsigned int cur_freq = 0;
struct cpufreq_policy *cpu_policy;

dprintk("resuming cpu %u\n", cpu);

if (!cpu_online(cpu))
return 0;

/* we may be lax here as interrupts are off. Nonetheless
* we need to grab the correct cpu policy, as to check
* whether we really run on this CPU.
*/

cpu_policy = cpufreq_cpu_get(cpu);
if (!cpu_policy)
return -EINVAL;

/* only handle each CPU group once */
if (unlikely(cpu_policy->cpu != cpu)) {
cpufreq_cpu_put(cpu_policy);
return 0;
}

if (cpufreq_driver->suspend) {
ret = cpufreq_driver->suspend(cpu_policy, state);
if (ret) {
printk(KERN_ERR "cpufreq: suspend failed in ->suspend "
"step on CPU %u\n", cpu_policy->cpu);
cpufreq_cpu_put(cpu_policy);
return ret;
}
}


if (cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)
goto out;

if (cpufreq_driver->get)
cur_freq = cpufreq_driver->get(cpu_policy->cpu);

if (!cur_freq || !cpu_policy->cur) {
printk(KERN_ERR "cpufreq: suspend failed to assert current "
"frequency is what timing core thinks it is.\n");
goto out;
}

if (unlikely(cur_freq != cpu_policy->cur)) {
struct cpufreq_freqs freqs;

if (!(cpufreq_driver->flags & CPUFREQ_PM_NO_WARN))
printk(KERN_DEBUG "Warning: CPU frequency is %u, "
"cpufreq assumed %u kHz.\n",
cur_freq, cpu_policy->cur);

freqs.cpu = cpu;
freqs.old = cpu_policy->cur;
freqs.new = cur_freq;

notifier_call_chain(&cpufreq_transition_notifier_list,
CPUFREQ_SUSPENDCHANGE, &freqs);
adjust_jiffies(CPUFREQ_SUSPENDCHANGE, &freqs);

cpu_policy->cur = cur_freq;
}

out:
cpufreq_cpu_put(cpu_policy);
return 0;
}

/**
* cpufreq_resume - restore proper CPU frequency handling after resume
*
* 1.) resume CPUfreq hardware support (cpufreq_driver->resume())
* 2.) if ->target and !CPUFREQ_CONST_LOOPS: verify we're in sync
* 3.) schedule call cpufreq_update_policy() ASAP as interrupts are
* restored.
* 3.) schedule call cpufreq_update_policy() ASAP as interrupts are restored.
*/
static int cpufreq_resume(struct sys_device * sysdev)
{
Expand Down Expand Up @@ -994,25 +915,21 @@ static int cpufreq_resume(struct sys_device * sysdev)
cur_freq = cpufreq_driver->get(cpu_policy->cpu);

if (!cur_freq || !cpu_policy->cur) {
printk(KERN_ERR "cpufreq: resume failed to assert "
"current frequency is what timing core "
"thinks it is.\n");
printk(KERN_ERR "cpufreq: resume failed to assert current frequency is what timing core thinks it is.\n");
goto out;
}

if (unlikely(cur_freq != cpu_policy->cur)) {
struct cpufreq_freqs freqs;

printk(KERN_WARNING "Warning: CPU frequency is %u, "
"cpufreq assumed %u kHz.\n",
cur_freq, cpu_policy->cur);
"cpufreq assumed %u kHz.\n", cur_freq, cpu_policy->cur);

freqs.cpu = cpu;
freqs.old = cpu_policy->cur;
freqs.new = cur_freq;

notifier_call_chain(&cpufreq_transition_notifier_list,
CPUFREQ_RESUMECHANGE, &freqs);
notifier_call_chain(&cpufreq_transition_notifier_list, CPUFREQ_RESUMECHANGE, &freqs);
adjust_jiffies(CPUFREQ_RESUMECHANGE, &freqs);

cpu_policy->cur = cur_freq;
Expand All @@ -1028,7 +945,6 @@ static int cpufreq_resume(struct sys_device * sysdev)
static struct sysdev_driver cpufreq_sysdev_driver = {
.add = cpufreq_add_dev,
.remove = cpufreq_remove_dev,
.suspend = cpufreq_suspend,
.resume = cpufreq_resume,
};

Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-arm/arch-ixp2000/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ unsigned long ixp2000_gettimeoffset(void);

struct pci_sys_data;

u32 *ixp2000_pci_config_addr(unsigned int bus, unsigned int devfn, int where);
void ixp2000_pci_preinit(void);
int ixp2000_pci_setup(int, struct pci_sys_data*);
struct pci_bus* ixp2000_pci_scan_bus(int, struct pci_sys_data*);
Expand Down
5 changes: 1 addition & 4 deletions trunk/include/linux/cpufreq.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ struct cpufreq_policy {
#define CPUFREQ_PRECHANGE (0)
#define CPUFREQ_POSTCHANGE (1)
#define CPUFREQ_RESUMECHANGE (8)
#define CPUFREQ_SUSPENDCHANGE (9)

struct cpufreq_freqs {
unsigned int cpu; /* cpu nr */
Expand Down Expand Up @@ -201,7 +200,6 @@ struct cpufreq_driver {

/* optional */
int (*exit) (struct cpufreq_policy *policy);
int (*suspend) (struct cpufreq_policy *policy, u32 state);
int (*resume) (struct cpufreq_policy *policy);
struct freq_attr **attr;
};
Expand All @@ -213,8 +211,7 @@ struct cpufreq_driver {
#define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel
* "constants" aren't affected by
* frequency transitions */
#define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed
* mismatches */


int cpufreq_register_driver(struct cpufreq_driver *driver_data);
int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
Expand Down
2 changes: 2 additions & 0 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,8 @@ static inline void choose_new_parent(task_t *p, task_t *reaper, task_t *child_re
*/
BUG_ON(p == reaper || reaper->exit_state >= EXIT_ZOMBIE);
p->real_parent = reaper;
if (p->parent == p->real_parent)
BUG();
}

static inline void reparent_thread(task_t *p, task_t *father, int traced)
Expand Down

0 comments on commit 0a817d5

Please sign in to comment.