kernel-fxtec-pro1x/arch/m68k/include/asm
Heiko Carstens 0ee000e5e8 locking, m68k: Calculate thread_info offset with asm offset
m68k has the thread_info structure embedded in its task struct.
Therefore its not possible to implement current_thread_info()
by looking at the stack pointer and do some simple calculations
like most other architectures do it.

To return the thread_info pointer for a task two defines are
used. This works until the spinlock function bodies get moved
into an own header file and CONFIG_SPINLOCK_DEBUG is turned on.
That results into this compile error:

  In file included from include/linux/spinlock.h:378,
                   from include/linux/seqlock.h:29,
                   from include/linux/time.h:8,
                   from include/linux/timex.h:56,
                   from include/linux/sched.h:54,
                   from arch/m68k/kernel/asm-offsets.c:12:
  include/linux/spinlock_api_smp.h: In function '__spin_unlock_irq':
  include/linux/spinlock_api_smp.h:371: error: 'current' undeclared (first use in this function)
  include/linux/spinlock_api_smp.h:371: error: (Each undeclared identifier is reported only once
  include/linux/spinlock_api_smp.h:371: error: for each function it appears in.)

Including asm/current.h to asm-offsets.c wouldn't help since
the definition of struct task is needed. So we end up with ugly
header file include dependencies.

To solve this calculate the offset of the thread_info structure
into the task struct in asm-offsets.h and use the offset in
task_thread_info(). This works just like it does for IA64 as
well.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Horst Hartmann <horsth@linux.vnet.ibm.com>
Cc: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: David Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: <linux-arch@vger.kernel.org>
LKML-Reference: <20090831124417.329662275@de.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-08-31 18:08:49 +02:00
..
a.out-core.h
a.out.h
adb_iop.h
amigahw.h
amigaints.h
amigayle.h
amipcmcia.h
anchor.h
apollodma.h
apollohw.h
atafd.h
atafdreg.h
atari_joystick.h
atari_stdma.h
atari_stram.h
atarihw.h m68k: atari - Rename "mfp" to "st_mfp" 2009-02-22 09:23:02 -08:00
atariints.h m68k: atari - Rename "mfp" to "st_mfp" 2009-02-22 09:23:02 -08:00
atarikb.h
atomic.h
atomic_mm.h asm-generic: rename atomic.h to atomic-long.h 2009-06-11 21:02:17 +02:00
atomic_no.h asm-generic: rename atomic.h to atomic-long.h 2009-06-11 21:02:17 +02:00
auxvec.h
bitops.h
bitops_mm.h
bitops_no.h
bitsperlong.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
blinken.h
bootinfo.h m68k: use the mmu version of bootinfo.h for m68knommu as well 2009-03-24 15:17:44 +10:00
bootstd.h
bug.h m68k: merge the mmu and non-mmu versions of bug.h 2009-03-24 15:17:44 +10:00
bugs.h m68k: merge the mmu and non-mmu versions of bugs.h 2009-03-24 15:17:45 +10:00
bvme6000hw.h
byteorder.h
cache.h m68k: use the mmu version of cache.h for m68knommu as well 2009-03-24 15:17:44 +10:00
cachectl.h
cacheflush.h
cacheflush_mm.h
cacheflush_no.h m68knommu: fix cache flushing for the 527x ColdFire processors 2009-01-27 16:42:00 +10:00
checksum.h
checksum_mm.h
checksum_no.h
coldfire.h
commproc.h
contregs.h
cputime.h
current.h m68k: merge the mmu and non-mmu versions of current.h 2009-03-24 15:17:45 +10:00
dbg.h
delay.h
delay_mm.h
delay_no.h
device.h
div64.h m68k: merge the mmu and non-mmu versions of div64.h 2009-03-24 15:17:45 +10:00
dma-mapping.h m68k: swtich non-mmu setups to use the mmu dma-mapping.h 2009-03-24 15:17:41 +10:00
dma.h
dma_mm.h
dma_no.h
dsp56k.h
dvma.h
elf.h m68k: use mmu version of elf.h for non-mmu builds as well 2009-03-24 15:17:42 +10:00
elia.h
emergency-restart.h
entry.h
entry_mm.h locking, m68k/asm-offsets: Rename pt_regs offset defines 2009-08-31 18:08:49 +02:00
entry_no.h locking, m68k/asm-offsets: Rename pt_regs offset defines 2009-08-31 18:08:49 +02:00
errno.h
fb.h m68k: merge the mmu and non-mmu versions of fb.h 2009-03-24 15:17:44 +10:00
fbio.h
fcntl.h
flat.h flat: fix data sections alignment 2009-05-29 08:40:02 -07:00
floppy.h
fpu.h m68k: use mmu fpu.h for non-mmu builds as well 2009-03-24 15:17:42 +10:00
ftrace.h tracing: make CALLER_ADDRx overwriteable 2009-03-02 16:49:37 -05:00
futex.h
hardirq.h
hardirq_mm.h
hardirq_no.h
hp300hw.h
hw_irq.h m68k: the one hw_irq.h can be used buy all m68k 2009-03-24 15:17:42 +10:00
hwtest.h
ide.h ide: cleanup <asm-m68k/ide.h> 2009-03-27 12:46:23 +01:00
idprom.h
intersil.h
io.h
io_mm.h
io_no.h
ioctl.h
ioctls.h
ipcbuf.h
irq.h
irq_mm.h m68k: irq_node.handler() should return irqreturn_t 2009-03-26 21:15:30 +01:00
irq_no.h
irq_regs.h
Kbuild
kdebug.h
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
linkage.h
local.h
m520xsim.h m68knommu: move CPU reset code for the 520x ColdFire into its platform code 2009-06-11 13:09:10 +10:00
m523xsim.h m68knommu: move CPU reset code for the 523x ColdFire into its platform code 2009-06-11 13:09:10 +10:00
m527xsim.h m68knommu: move CPU reset code for the 527x ColdFire into its platform code 2009-06-11 13:09:10 +10:00
m528xsim.h m68knommu: move CPU reset code for the 528x ColdFire into its platform code 2009-06-11 13:09:10 +10:00
m532xsim.h m68knommu: add CPU reset code for the 532x ColdFire 2009-06-11 13:09:10 +10:00
m5206sim.h
m5249sim.h
m5272sim.h
m5307sim.h
m5407sim.h
m68360.h
m68360_enet.h
m68360_pram.h
m68360_quicc.h
m68360_regs.h
mac_asc.h
mac_baboon.h
mac_iop.h
mac_mouse.h
mac_oss.h
mac_psc.h
mac_via.h
machdep.h
machdep_mm.h
machdep_no.h
machines.h
machw.h
macintosh.h m68k: mac - Add a new entry in mac_model to identify the floppy controller type. 2009-03-26 21:15:27 +01:00
macints.h
math-emu.h locking, m68k/asm-offsets: Rename pt_regs offset defines 2009-08-31 18:08:49 +02:00
MC68EZ328.h
MC68VZ328.h
MC68328.h
MC68332.h
mc146818rtc.h m68k: use the mc146818rtc.h for non-mmu setups as well. 2009-03-24 15:17:41 +10:00
mcfcache.h
mcfdma.h
mcfmbus.h
mcfne.h
mcfpit.h
mcfsim.h
mcfsmc.h
mcftimer.h
mcfuart.h
mcfwdebug.h
md.h
mman.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
mmu.h m68k: merge the mmu and non-mmu versions of mmu.h 2009-03-24 15:17:42 +10:00
mmu_context.h m68k: merge the mmu and non-mmu versions of mmu_context.h 2009-03-24 15:17:45 +10:00
mmzone.h
module.h m68k: merge the mmu and non-mmu versions of module.h 2009-03-24 15:17:45 +10:00
motorola_pgalloc.h arch/m68k/include/asm/motorola_pgalloc.h: fix kunmap arg 2009-08-26 23:14:49 +02:00
motorola_pgtable.h
movs.h
msgbuf.h
mutex.h
mvme16xhw.h
mvme147hw.h
nettel.h
nubus.h
openprom.h
oplib.h
page.h
page_mm.h asm-generic: rename page.h and uaccess.h 2009-06-11 21:02:17 +02:00
page_no.h asm-generic: rename page.h and uaccess.h 2009-06-11 21:02:17 +02:00
page_offset.h m68k: merge the mmu and non-mmu versions of page_offset.h 2009-03-24 15:17:43 +10:00
param.h m68k: merge the non-MMU and MMU versions of param.h 2009-03-16 17:52:16 +10:00
parport.h
pci.h m68k: use the mmu pci.h for m68knommu as well 2009-03-24 15:17:41 +10:00
percpu.h
pgalloc.h m68k: merge the mmu and non-mmu versions of pgalloc.h 2009-03-24 15:17:43 +10:00
pgtable.h
pgtable_mm.h m68k: Fix redefinition of pgprot_noncached 2009-08-26 23:14:49 +02:00
pgtable_no.h m68knommu: mv definition of check_pgt_cache() 2009-03-24 15:17:43 +10:00
poll.h
posix_types.h
processor.h
processor_mm.h
processor_no.h m68knommu: enumerate INIT_THREAD fields properly 2009-06-11 13:09:11 +10:00
ptrace.h m68k: merge the non-MMU and MMU versions of ptrace.h 2009-03-17 08:44:42 +10:00
q40_master.h
q40ints.h
quicc_simple.h
raw_io.h
resource.h
rtc.h m68k: Hook up rtc-generic 2009-04-02 01:05:31 +00:00
sbus.h
scatterlist.h m68k: Use dma_addr_t for scatterlist.dma_address 2009-03-24 15:17:43 +10:00
sections.h
segment.h m68k: merge the mmu and non-mmu versions of segment.h 2009-03-24 15:17:44 +10:00
sembuf.h
serial.h
setup.h m68k: use MMU version of setup.h for both MMU and non-MMU 2009-03-17 08:44:41 +10:00
shm.h
shmbuf.h
shmparam.h
sigcontext.h m68k: merge the non-MMU and MMU versions of sigcontext.h 2009-03-16 18:00:25 +10:00
siginfo.h m68k: merge the non-MMU and MMU versions of siginfo.h 2009-03-17 08:47:11 +10:00
signal.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
smp.h
socket.h net: new user space API for time stamping of incoming and outgoing packets 2009-02-15 22:43:33 -08:00
sockios.h
spinlock.h
stat.h
statfs.h
string.h
string_mm.h
string_no.h
sun3-head.h
sun3_pgalloc.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
sun3_pgtable.h
sun3ints.h
sun3mmu.h
sun3x.h
sun3xflop.h
sun3xprom.h
swab.h headers_check fix: m68k, swab.h 2009-06-11 13:09:11 +10:00
system.h
system_mm.h
system_no.h m68knommu: remove obsolete reset code 2009-06-11 13:09:11 +10:00
termbits.h
termios.h
thread_info.h
thread_info_mm.h locking, m68k: Calculate thread_info offset with asm offset 2009-08-31 18:08:49 +02:00
thread_info_no.h sched: INIT_PREEMPT_COUNT 2009-07-10 14:24:05 -07:00
timex.h m68k: use mmu timex.h for non-mmu setups as well 2009-03-24 15:17:42 +10:00
tlb.h
tlbflush.h m68k: merge the mmu and non-mmu versions of tlbflush.h 2009-03-24 15:17:45 +10:00
topology.h
traps.h
traps_mm.h
traps_no.h
types.h
uaccess.h
uaccess_mm.h
uaccess_no.h
ucontext.h m68k: merge the mmu and non-mmu versions of ucontext.h 2009-03-24 15:17:43 +10:00
unaligned.h m68k: Restore correct include guards for <asm/unaligned.h> 2009-03-24 15:17:43 +10:00
unistd.h m68k,m68knommu: Wire up rt_tgsigqueueinfo and perf_counter_open 2009-08-26 23:14:50 +02:00
user.h
virtconvert.h
xor.h
zorro.h