Commit 679ab9a6 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://ppc.bkbits.net/for-linus-ppc

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 56340866 b2213433
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/cache.h>
#if 0 #if 0
#define DEBUGP printk #define DEBUGP printk
...@@ -105,8 +106,9 @@ long module_core_size(const Elf32_Ehdr *hdr, ...@@ -105,8 +106,9 @@ long module_core_size(const Elf32_Ehdr *hdr,
const char *secstrings, const char *secstrings,
struct module *module) struct module *module)
{ {
module->arch.core_plt_offset = module->core_size; module->arch.core_plt_offset = ALIGN(module->core_size, 4);
return module->core_size + get_plt_size(hdr, sechdrs, secstrings, 0); return module->arch.core_plt_offset
+ get_plt_size(hdr, sechdrs, secstrings, 0);
} }
long module_init_size(const Elf32_Ehdr *hdr, long module_init_size(const Elf32_Ehdr *hdr,
...@@ -114,8 +116,9 @@ long module_init_size(const Elf32_Ehdr *hdr, ...@@ -114,8 +116,9 @@ long module_init_size(const Elf32_Ehdr *hdr,
const char *secstrings, const char *secstrings,
struct module *module) struct module *module)
{ {
module->arch.init_plt_offset = module->init_size; module->arch.init_plt_offset = ALIGN(module->init_size, 4);
return module->init_size + get_plt_size(hdr, sechdrs, secstrings, 1); return module->arch.init_plt_offset
+ get_plt_size(hdr, sechdrs, secstrings, 1);
} }
int apply_relocate(Elf32_Shdr *sechdrs, int apply_relocate(Elf32_Shdr *sechdrs,
...@@ -142,7 +145,7 @@ static uint32_t do_plt_call(void *location, Elf32_Addr val, struct module *mod) ...@@ -142,7 +145,7 @@ static uint32_t do_plt_call(void *location, Elf32_Addr val, struct module *mod)
{ {
struct ppc_plt_entry *entry; struct ppc_plt_entry *entry;
DEBUGP("Doing plt for %u\n", (unsigned int)location); DEBUGP("Doing plt for call to 0x%x at 0x%x\n", val, (unsigned int)location);
/* Init, or core PLT? */ /* Init, or core PLT? */
if (location >= mod->module_core if (location >= mod->module_core
&& location < mod->module_core + mod->arch.core_plt_offset) && location < mod->module_core + mod->arch.core_plt_offset)
...@@ -162,6 +165,7 @@ static uint32_t do_plt_call(void *location, Elf32_Addr val, struct module *mod) ...@@ -162,6 +165,7 @@ static uint32_t do_plt_call(void *location, Elf32_Addr val, struct module *mod)
entry->jump[2] = 0x7d6903a6; /* mtctr r11 */ entry->jump[2] = 0x7d6903a6; /* mtctr r11 */
entry->jump[3] = 0x4e800420; /* bctr */ entry->jump[3] = 0x4e800420; /* bctr */
DEBUGP("Initialized plt for 0x%x at %p\n", val, entry);
return (uint32_t)entry; return (uint32_t)entry;
} }
......
...@@ -389,7 +389,7 @@ int __cpu_up(unsigned int cpu) ...@@ -389,7 +389,7 @@ int __cpu_up(unsigned int cpu)
/* create a process for the processor */ /* create a process for the processor */
/* only regs.msr is actually used, and 0 is OK for it */ /* only regs.msr is actually used, and 0 is OK for it */
memset(&regs, 0, sizeof(struct pt_regs)); memset(&regs, 0, sizeof(struct pt_regs));
p = do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL); p = do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL);
if (IS_ERR(p)) if (IS_ERR(p))
panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p)); panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p));
......
...@@ -898,12 +898,13 @@ static int proc_prep_residual_read(char * buf, char ** start, off_t off, ...@@ -898,12 +898,13 @@ static int proc_prep_residual_read(char * buf, char ** start, off_t off,
return n; return n;
} }
void __init int __init
proc_prep_residual_init(void) proc_prep_residual_init(void)
{ {
if (res->ResidualLength) if (res->ResidualLength)
create_proc_read_entry("residual", S_IRUGO, NULL, create_proc_read_entry("residual", S_IRUGO, NULL,
proc_prep_residual_read, NULL); proc_prep_residual_read, NULL);
return 0;
} }
__initcall(proc_prep_residual_init); __initcall(proc_prep_residual_init);
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/cache.h> #include <linux/cache.h>
#include <linux/smp_lock.h>
/* The __last_jiffy_stamp field is needed to ensure that no decrementer /* The __last_jiffy_stamp field is needed to ensure that no decrementer
* interrupt is lost on SMP machines. Since on most CPUs it is in the same * interrupt is lost on SMP machines. Since on most CPUs it is in the same
......
...@@ -635,9 +635,7 @@ extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); ...@@ -635,9 +635,7 @@ extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
* Bus types * Bus types
*/ */
#define EISA_bus 0 #define EISA_bus 0
#define EISA_bus__is_a_macro /* for versions in ksyms.c */
#define MCA_bus 0 #define MCA_bus 0
#define MCA_bus__is_a_macro /* for versions in ksyms.c */
/* Lazy FPU handling on uni-processor */ /* Lazy FPU handling on uni-processor */
extern struct task_struct *last_task_used_math; extern struct task_struct *last_task_used_math;
......
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