Commit c0d92706 authored by Anton Blanchard's avatar Anton Blanchard

ppc64: Use generic asm/offset.h creation rules

parent be13f508
......@@ -62,7 +62,22 @@ endif
cp -f arch/ppc64/configs/$(@:config=defconfig) arch/ppc64/defconfig
archclean:
rm -f arch/ppc64/kernel/{ppc_defs.h,mk_defs.s,mk_defs_out.c,mk_defs_tpl}
@$(MAKEBOOT) clean
archmrproper:
prepare: include/asm-$(ARCH)/offsets.h
arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
include/config/MARKER
include/asm-$(ARCH)/offsets.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s
@$(generate-asm-offsets.h) < $< > $@
include/asm-$(ARCH)/offsets.h: include/asm-$(ARCH)/offsets.h.tmp
@echo -n ' Generating $@'
@$(update-if-changed)
CLEAN_FILES += include/asm-$(ARCH)/offsets.h.tmp \
include/asm-$(ARCH)/offsets.h
......@@ -40,25 +40,3 @@ obj-y += prom.o lmb.o rtas.o rtas-proc.o chrp_setup.o i8259.o
include $(TOPDIR)/Rules.make
#
# This is just to get the dependencies...
#
head.o: head.S ppc_defs.h
misc.o: misc.S ppc_defs.h
entry.o: entry.S ppc_defs.h
hvCall.o: hvCall.S ppc_defs.h
pSeries_hvCall.o: pSeries_hvCall.S ppc_defs.h
sys32.o: sys32.S ppc_defs.h
ppc_defs.h: mk_defs.c ppc_defs.head \
$(TOPDIR)/include/asm/mmu.h \
$(TOPDIR)/include/asm/processor.h \
$(TOPDIR)/include/asm/pgtable.h \
$(TOPDIR)/include/asm/ptrace.h
$(CC) $(CFLAGS) -S mk_defs.c
cp ppc_defs.head ppc_defs.h
# for bk, this way we can write to the file even if it's not checked out
chmod u+w ppc_defs.h
grep '^#define' mk_defs.s >> ppc_defs.h
rm mk_defs.s
......@@ -13,7 +13,6 @@
* 2 of the License, or (at your option) any later version.
*/
#include <stddef.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/kernel.h>
......@@ -37,10 +36,11 @@
#include <asm/rtas.h>
#define DEFINE(sym, val) \
asm volatile("\n#define\t" #sym "\t%0" : : "i" (val))
asm volatile("\n->" #sym " %0 " #val : : "i" (val))
int
main(void)
#define BLANK() asm volatile("\n->" : : )
int main(void)
{
/* thread struct on stack */
DEFINE(THREAD_SHIFT, THREAD_SHIFT);
......
......@@ -58,7 +58,6 @@
#include <asm/naca.h>
#include <asm/time.h>
#include "local_irq.h"
#include "i8259.h"
#include "open_pic.h"
#include "xics.h"
......
......@@ -20,14 +20,15 @@
* 2 of the License, or (at your option) any later version.
*/
#include "ppc_asm.h"
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/sys.h>
#include <asm/processor.h>
#include <asm/page.h>
#include <asm/mmu.h>
#include <asm/thread_info.h>
#include <linux/errno.h>
#include <linux/sys.h>
#include <linux/config.h>
#include <asm/ppc_asm.h>
#include <asm/offsets.h>
#ifdef CONFIG_PPC_ISERIES
#define DO_SOFT_DISABLE
......
......@@ -25,12 +25,12 @@
#define SECONDARY_PROCESSORS
#include "ppc_asm.h"
#include "ppc_defs.h"
#include <linux/config.h>
#include <asm/processor.h>
#include <asm/page.h>
#include <linux/config.h>
#include <asm/mmu.h>
#include <asm/ppc_asm.h>
#include <asm/offsets.h>
#ifdef CONFIG_PPC_ISERIES
#define DO_SOFT_DISABLE
......
......@@ -11,9 +11,8 @@
* 2 of the License, or (at your option) any later version.
*/
#include "ppc_asm.h"
#include <asm/ppc_asm.h>
#include <asm/processor.h>
#include <linux/config.h>
.text
......
......@@ -9,8 +9,6 @@
#ifndef _PPC_KERNEL_i8259_H
#define _PPC_KERNEL_i8259_H
#include "local_irq.h"
extern struct hw_interrupt_type i8259_pic;
void i8259_init(void);
......
......@@ -53,8 +53,6 @@
#include <asm/machdep.h>
#include <asm/paca.h>
#include "local_irq.h"
void enable_irq(unsigned int irq_nr);
void disable_irq(unsigned int irq_nr);
......@@ -69,7 +67,6 @@ irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned =
{ [0 ... NR_IRQS-1] = { 0, NULL, NULL, 0, SPIN_LOCK_UNLOCKED}};
int ppc_spurious_interrupts = 0;
struct irqaction *ppc_irq_action[NR_IRQS];
unsigned long lpEvent_count = 0;
/* nasty hack for shared irq's since we need to do kmalloc calls but
......
/*
* c 2001 PowerPC 64 Team, IBM Corp
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#ifndef _PPC_KERNEL_LOCAL_IRQ_H
#define _PPC_KERNEL_LOCAL_IRQ_H
#include <linux/kernel_stat.h>
#include <linux/interrupt.h>
#include <linux/cache.h>
#include <linux/spinlock.h>
#include <linux/irq.h>
void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq);
#define NR_MASK_WORDS ((NR_IRQS + 63) / 64)
extern int ppc_spurious_interrupts;
extern int ppc_second_irq;
extern struct irqaction *ppc_irq_action[NR_IRQS];
#endif /* _PPC_KERNEL_LOCAL_IRQ_H */
......@@ -25,7 +25,8 @@
#include <asm/processor.h>
#include <asm/page.h>
#include <asm/cache.h>
#include "ppc_asm.h"
#include <asm/ppc_asm.h>
#include <asm/offsets.h>
.text
......
......@@ -23,7 +23,6 @@
#include <asm/machdep.h>
#include "local_irq.h"
#include "open_pic.h"
#include "open_pic_defs.h"
#include "i8259.h"
......
......@@ -11,14 +11,13 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/config.h>
#include <linux/sys.h>
#include <asm/unistd.h>
#include <asm/errno.h>
#include <asm/processor.h>
#include <asm/page.h>
#include <asm/cache.h>
#include "ppc_asm.h"
#include <asm/ppc_asm.h>
/*
* hcall interface to pSeries LPAR
......
/*
* WARNING! This file is automatically generated - DO NOT EDIT!
*/
......@@ -15,7 +15,7 @@
* 2 of the License, or (at your option) any later version.
*/
#include "ppc_asm.h"
#include <asm/ppc_asm.h>
#include <asm/errno.h>
#include <asm/processor.h>
......
......@@ -13,6 +13,7 @@
#include <linux/threads.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/irq.h>
#include <asm/prom.h>
#include <asm/io.h>
#include <asm/pgtable.h>
......
......@@ -12,8 +12,6 @@
#ifndef _PPC_KERNEL_XICS_H
#define _PPC_KERNEL_XICS_H
#include "local_irq.h"
extern struct hw_interrupt_type xics_pic;
extern struct hw_interrupt_type xics_8259_pic;
......
......@@ -15,7 +15,7 @@
#include <linux/sys.h>
#include <asm/processor.h>
#include <asm/errno.h>
#include <asm/ppc_asm.tmpl>
#include <asm/ppc_asm.h>
/*
* ip_fast_csum(r3=buf, r4=len) -- Optimized for IP header
......
......@@ -9,7 +9,7 @@
* 2 of the License, or (at your option) any later version.
*/
#include <asm/processor.h>
#include "../kernel/ppc_asm.h"
#include <asm/ppc_asm.h>
_GLOBAL(copy_page)
std r31,-8(1)
......
......@@ -9,7 +9,7 @@
* 2 of the License, or (at your option) any later version.
*/
#include <asm/processor.h>
#include "../kernel/ppc_asm.h"
#include <asm/ppc_asm.h>
.align 7
_GLOBAL(__copy_tofrom_user)
......
......@@ -9,7 +9,7 @@
* 2 of the License, or (at your option) any later version.
*/
#include <asm/processor.h>
#include "../kernel/ppc_asm.h"
#include <asm/ppc_asm.h>
.align 7
_GLOBAL(memcpy)
......
......@@ -8,9 +8,9 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <asm/ppc_asm.tmpl>
#include <asm/processor.h>
#include <asm/errno.h>
#include <asm/ppc_asm.h>
_GLOBAL(strcpy)
addi r5,r3,-1
......
......@@ -16,6 +16,7 @@
#include <asm/irq.h>
int timer_interrupt(struct pt_regs *);
extern void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq);
#ifdef CONFIG_PPC_ISERIES
......
......@@ -51,5 +51,7 @@ static __inline__ int irq_cannonicalize(int irq)
return irq;
}
#define NR_MASK_WORDS ((NR_IRQS + 63) / 64)
#endif /* _ASM_IRQ_H */
#endif /* __KERNEL__ */
......@@ -11,9 +11,6 @@
* 2 of the License, or (at your option) any later version.
*/
#include <asm/ppc_asm.tmpl>
#include "ppc_defs.h"
/*
* Macros for storing registers into and loading registers from
* exception frames.
......@@ -113,3 +110,118 @@
rldicr rd,rd,32,31; \
add rd,rs,rd
/* Condition Register Bit Fields */
#define cr0 0
#define cr1 1
#define cr2 2
#define cr3 3
#define cr4 4
#define cr5 5
#define cr6 6
#define cr7 7
/* General Purpose Registers (GPRs) */
#define r0 0
#define r1 1
#define r2 2
#define r3 3
#define r4 4
#define r5 5
#define r6 6
#define r7 7
#define r8 8
#define r9 9
#define r10 10
#define r11 11
#define r12 12
#define r13 13
#define r14 14
#define r15 15
#define r16 16
#define r17 17
#define r18 18
#define r19 19
#define r20 20
#define r21 21
#define r22 22
#define r23 23
#define r24 24
#define r25 25
#define r26 26
#define r27 27
#define r28 28
#define r29 29
#define r30 30
#define r31 31
/* Floating Point Registers (FPRs) */
#define fr0 0
#define fr1 1
#define fr2 2
#define fr3 3
#define fr4 4
#define fr5 5
#define fr6 6
#define fr7 7
#define fr8 8
#define fr9 9
#define fr10 10
#define fr11 11
#define fr12 12
#define fr13 13
#define fr14 14
#define fr15 15
#define fr16 16
#define fr17 17
#define fr18 18
#define fr19 19
#define fr20 20
#define fr21 21
#define fr22 22
#define fr23 23
#define fr24 24
#define fr25 25
#define fr26 26
#define fr27 27
#define fr28 28
#define fr29 29
#define fr30 30
#define fr31 31
#define vr0 0
#define vr1 1
#define vr2 2
#define vr3 3
#define vr4 4
#define vr5 5
#define vr6 6
#define vr7 7
#define vr8 8
#define vr9 9
#define vr10 10
#define vr11 11
#define vr12 12
#define vr13 13
#define vr14 14
#define vr15 15
#define vr16 16
#define vr17 17
#define vr18 18
#define vr19 19
#define vr20 20
#define vr21 21
#define vr22 22
#define vr23 23
#define vr24 24
#define vr25 25
#define vr26 26
#define vr27 27
#define vr28 28
#define vr29 29
#define vr30 30
#define vr31 31
/* Condition Register Bit Fields */
#define cr0 0
#define cr1 1
#define cr2 2
#define cr3 3
#define cr4 4
#define cr5 5
#define cr6 6
#define cr7 7
/* General Purpose Registers (GPRs) */
#define r0 0
#define r1 1
#define r2 2
#define r3 3
#define r4 4
#define r5 5
#define r6 6
#define r7 7
#define r8 8
#define r9 9
#define r10 10
#define r11 11
#define r12 12
#define r13 13
#define r14 14
#define r15 15
#define r16 16
#define r17 17
#define r18 18
#define r19 19
#define r20 20
#define r21 21
#define r22 22
#define r23 23
#define r24 24
#define r25 25
#define r26 26
#define r27 27
#define r28 28
#define r29 29
#define r30 30
#define r31 31
/* Floating Point Registers (FPRs) */
#define fr0 0
#define fr1 1
#define fr2 2
#define fr3 3
#define fr4 4
#define fr5 5
#define fr6 6
#define fr7 7
#define fr8 8
#define fr9 9
#define fr10 10
#define fr11 11
#define fr12 12
#define fr13 13
#define fr14 14
#define fr15 15
#define fr16 16
#define fr17 17
#define fr18 18
#define fr19 19
#define fr20 20
#define fr21 21
#define fr22 22
#define fr23 23
#define fr24 24
#define fr25 25
#define fr26 26
#define fr27 27
#define fr28 28
#define fr29 29
#define fr30 30
#define fr31 31
#define vr0 0
#define vr1 1
#define vr2 2
#define vr3 3
#define vr4 4
#define vr5 5
#define vr6 6
#define vr7 7
#define vr8 8
#define vr9 9
#define vr10 10
#define vr11 11
#define vr12 12
#define vr13 13
#define vr14 14
#define vr15 15
#define vr16 16
#define vr17 17
#define vr18 18
#define vr19 19
#define vr20 20
#define vr21 21
#define vr22 22
#define vr23 23
#define vr24 24
#define vr25 25
#define vr26 26
#define vr27 27
#define vr28 28
#define vr29 29
#define vr30 30
#define vr31 31
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