Merge commit 'upstream/master'

This commit is contained in:
Haavard Skinnemoen
2008-07-27 13:54:08 +02:00
當前提交 eda3d8f560
共有 4878 個文件被更改,包括 320563 次插入187290 次删除

查看文件

@@ -26,14 +26,16 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices);
* XXX: If/when a SMP-capable implementation of AVR32 will ever be
* made, we must make sure that the code executes on the correct CPU.
*/
static ssize_t show_pc0event(struct sys_device *dev, char *buf)
static ssize_t show_pc0event(struct sys_device *dev,
struct sysdev_attribute *attr, char *buf)
{
unsigned long pccr;
pccr = sysreg_read(PCCR);
return sprintf(buf, "0x%lx\n", (pccr >> 12) & 0x3f);
}
static ssize_t store_pc0event(struct sys_device *dev, const char *buf,
static ssize_t store_pc0event(struct sys_device *dev,
struct sysdev_attribute *attr, const char *buf,
size_t count)
{
unsigned long val;
@@ -46,15 +48,17 @@ static ssize_t store_pc0event(struct sys_device *dev, const char *buf,
sysreg_write(PCCR, val);
return count;
}
static ssize_t show_pc0count(struct sys_device *dev, char *buf)
static ssize_t show_pc0count(struct sys_device *dev,
struct sysdev_attribute *attr, char *buf)
{
unsigned long pcnt0;
pcnt0 = sysreg_read(PCNT0);
return sprintf(buf, "%lu\n", pcnt0);
}
static ssize_t store_pc0count(struct sys_device *dev, const char *buf,
size_t count)
static ssize_t store_pc0count(struct sys_device *dev,
struct sysdev_attribute *attr,
const char *buf, size_t count)
{
unsigned long val;
char *endp;
@@ -67,14 +71,16 @@ static ssize_t store_pc0count(struct sys_device *dev, const char *buf,
return count;
}
static ssize_t show_pc1event(struct sys_device *dev, char *buf)
static ssize_t show_pc1event(struct sys_device *dev,
struct sysdev_attribute *attr, char *buf)
{
unsigned long pccr;
pccr = sysreg_read(PCCR);
return sprintf(buf, "0x%lx\n", (pccr >> 18) & 0x3f);
}
static ssize_t store_pc1event(struct sys_device *dev, const char *buf,
static ssize_t store_pc1event(struct sys_device *dev,
struct sysdev_attribute *attr, const char *buf,
size_t count)
{
unsigned long val;
@@ -87,14 +93,16 @@ static ssize_t store_pc1event(struct sys_device *dev, const char *buf,
sysreg_write(PCCR, val);
return count;
}
static ssize_t show_pc1count(struct sys_device *dev, char *buf)
static ssize_t show_pc1count(struct sys_device *dev,
struct sysdev_attribute *attr, char *buf)
{
unsigned long pcnt1;
pcnt1 = sysreg_read(PCNT1);
return sprintf(buf, "%lu\n", pcnt1);
}
static ssize_t store_pc1count(struct sys_device *dev, const char *buf,
static ssize_t store_pc1count(struct sys_device *dev,
struct sysdev_attribute *attr, const char *buf,
size_t count)
{
unsigned long val;
@@ -108,14 +116,16 @@ static ssize_t store_pc1count(struct sys_device *dev, const char *buf,
return count;
}
static ssize_t show_pccycles(struct sys_device *dev, char *buf)
static ssize_t show_pccycles(struct sys_device *dev,
struct sysdev_attribute *attr, char *buf)
{
unsigned long pccnt;
pccnt = sysreg_read(PCCNT);
return sprintf(buf, "%lu\n", pccnt);
}
static ssize_t store_pccycles(struct sys_device *dev, const char *buf,
static ssize_t store_pccycles(struct sys_device *dev,
struct sysdev_attribute *attr, const char *buf,
size_t count)
{
unsigned long val;
@@ -129,14 +139,16 @@ static ssize_t store_pccycles(struct sys_device *dev, const char *buf,
return count;
}
static ssize_t show_pcenable(struct sys_device *dev, char *buf)
static ssize_t show_pcenable(struct sys_device *dev,
struct sysdev_attribute *attr, char *buf)
{
unsigned long pccr;
pccr = sysreg_read(PCCR);
return sprintf(buf, "%c\n", (pccr & 1)?'1':'0');
}
static ssize_t store_pcenable(struct sys_device *dev, const char *buf,
static ssize_t store_pcenable(struct sys_device *dev,
struct sysdev_attribute *attr, const char *buf,
size_t count)
{
unsigned long pccr, val;

查看文件

@@ -31,7 +31,7 @@ void cpu_idle(void)
{
/* endless idle loop with no priority at all */
while (1) {
tick_nohz_stop_sched_tick();
tick_nohz_stop_sched_tick(1);
while (!need_resched())
cpu_idle_sleep();
tick_nohz_restart_sched_tick();

查看文件

@@ -10,6 +10,7 @@
#include <linux/sched.h>
#include <linux/stacktrace.h>
#include <linux/thread_info.h>
#include <linux/module.h>
register unsigned long current_frame_pointer asm("r7");