Commit cdbd392c authored by Jay Estabrook's avatar Jay Estabrook Committed by Linus Torvalds

[PATCH] for Alpha against 2.6.0-test6

Here is a very small set of fixes for Linux/axp, with a new one for
"sched_clock" just introduced.

Note that all but the arch/alpha/mm/init.c are required for a clean
build, since warnings->errors is still on.

The arch/alpha/mm/init.c stuff is from Jeff for MARVEL, and MUST be there
for any machines running the latest firmware...
parent 0cf26c7e
...@@ -1203,7 +1203,7 @@ show_cpuinfo(struct seq_file *f, void *slot) ...@@ -1203,7 +1203,7 @@ show_cpuinfo(struct seq_file *f, void *slot)
platform_string(), nr_processors); platform_string(), nr_processors);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
seq_printf(f, "cpus active\t\t: %d\n" seq_printf(f, "cpus active\t\t: %ld\n"
"cpu active mask\t\t: %016lx\n", "cpu active mask\t\t: %016lx\n",
num_online_cpus(), cpu_present_mask); num_online_cpus(), cpu_present_mask);
#endif #endif
......
...@@ -597,7 +597,7 @@ smp_cpus_done(unsigned int max_cpus) ...@@ -597,7 +597,7 @@ smp_cpus_done(unsigned int max_cpus)
if (cpu_online(cpu)) if (cpu_online(cpu))
bogosum += cpu_data[cpu].loops_per_jiffy; bogosum += cpu_data[cpu].loops_per_jiffy;
printk(KERN_INFO "SMP: Total of %d processors activated " printk(KERN_INFO "SMP: Total of %ld processors activated "
"(%lu.%02lu BogoMIPS).\n", "(%lu.%02lu BogoMIPS).\n",
num_online_cpus(), num_online_cpus(),
(bogosum + 2500) / (500000/HZ), (bogosum + 2500) / (500000/HZ),
......
...@@ -89,6 +89,16 @@ static inline __u32 rpcc(void) ...@@ -89,6 +89,16 @@ static inline __u32 rpcc(void)
return result; return result;
} }
/*
* Scheduler clock - returns current time in nanosec units.
*
* Copied from ARM code for expediency... ;-}
*/
unsigned long long sched_clock(void)
{
return (unsigned long long)jiffies * (1000000000 / HZ);
}
/* /*
* timer_interrupt() needs to keep up the real-time clock, * timer_interrupt() needs to keep up the real-time clock,
......
...@@ -210,7 +210,8 @@ callback_init(void * kernel_end) ...@@ -210,7 +210,8 @@ callback_init(void * kernel_end)
/* Allocate one PGD and one PMD. In the case of SRM, we'll need /* Allocate one PGD and one PMD. In the case of SRM, we'll need
these to actually remap the console. There is an assumption these to actually remap the console. There is an assumption
here that only one of each is needed, and this allows for 8MB. here that only one of each is needed, and this allows for 8MB.
Currently (late 1999), big consoles are still under 4MB. On systems with larger consoles, additional pages will be
allocated as needed during the mapping process.
In the case of not SRM, but not CONFIG_ALPHA_LARGE_VMALLOC, In the case of not SRM, but not CONFIG_ALPHA_LARGE_VMALLOC,
we need to allocate the PGD we use for vmalloc before we start we need to allocate the PGD we use for vmalloc before we start
...@@ -237,6 +238,15 @@ callback_init(void * kernel_end) ...@@ -237,6 +238,15 @@ callback_init(void * kernel_end)
unsigned long pfn = crb->map[i].pa >> PAGE_SHIFT; unsigned long pfn = crb->map[i].pa >> PAGE_SHIFT;
crb->map[i].va = vaddr; crb->map[i].va = vaddr;
for (j = 0; j < crb->map[i].count; ++j) { for (j = 0; j < crb->map[i].count; ++j) {
/* Newer console's (especially on larger
systems) may require more pages of
PTEs. Grab additional pages as needed. */
if (pmd != pmd_offset(pgd, vaddr)) {
memset(kernel_end, 0, PAGE_SIZE);
pmd = pmd_offset(pgd, vaddr);
pmd_set(pmd, (pte_t *)kernel_end);
kernel_end += PAGE_SIZE;
}
set_pte(pte_offset_kernel(pmd, vaddr), set_pte(pte_offset_kernel(pmd, vaddr),
pfn_pte(pfn, PAGE_KERNEL)); pfn_pte(pfn, PAGE_KERNEL));
pfn++; pfn++;
......
...@@ -159,7 +159,7 @@ static unsigned int get_time_pit(void) ...@@ -159,7 +159,7 @@ static unsigned int get_time_pit(void)
#define DELTA(x,y) ((y)-(x)) #define DELTA(x,y) ((y)-(x))
#define TIME_NAME "TSC" #define TIME_NAME "TSC"
#elif __alpha__ #elif __alpha__
#define GET_TIME(x) do { x = get_cycles(x); } while (0) #define GET_TIME(x) do { x = get_cycles(); } while (0)
#define DELTA(x,y) ((y)-(x)) #define DELTA(x,y) ((y)-(x))
#define TIME_NAME "PCC" #define TIME_NAME "PCC"
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment