0ee000e5e8
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> |
||
---|---|---|
.. | ||
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 | ||
atariints.h | ||
atarikb.h | ||
atomic.h | ||
atomic_mm.h | ||
atomic_no.h | ||
auxvec.h | ||
bitops.h | ||
bitops_mm.h | ||
bitops_no.h | ||
bitsperlong.h | ||
blinken.h | ||
bootinfo.h | ||
bootstd.h | ||
bug.h | ||
bugs.h | ||
bvme6000hw.h | ||
byteorder.h | ||
cache.h | ||
cachectl.h | ||
cacheflush.h | ||
cacheflush_mm.h | ||
cacheflush_no.h | ||
checksum.h | ||
checksum_mm.h | ||
checksum_no.h | ||
coldfire.h | ||
commproc.h | ||
contregs.h | ||
cputime.h | ||
current.h | ||
dbg.h | ||
delay.h | ||
delay_mm.h | ||
delay_no.h | ||
device.h | ||
div64.h | ||
dma-mapping.h | ||
dma.h | ||
dma_mm.h | ||
dma_no.h | ||
dsp56k.h | ||
dvma.h | ||
elf.h | ||
elia.h | ||
emergency-restart.h | ||
entry.h | ||
entry_mm.h | ||
entry_no.h | ||
errno.h | ||
fb.h | ||
fbio.h | ||
fcntl.h | ||
flat.h | ||
floppy.h | ||
fpu.h | ||
ftrace.h | ||
futex.h | ||
hardirq.h | ||
hardirq_mm.h | ||
hardirq_no.h | ||
hp300hw.h | ||
hw_irq.h | ||
hwtest.h | ||
ide.h | ||
idprom.h | ||
intersil.h | ||
io.h | ||
io_mm.h | ||
io_no.h | ||
ioctl.h | ||
ioctls.h | ||
ipcbuf.h | ||
irq.h | ||
irq_mm.h | ||
irq_no.h | ||
irq_regs.h | ||
Kbuild | ||
kdebug.h | ||
kmap_types.h | ||
linkage.h | ||
local.h | ||
m520xsim.h | ||
m523xsim.h | ||
m527xsim.h | ||
m528xsim.h | ||
m532xsim.h | ||
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 | ||
macints.h | ||
math-emu.h | ||
MC68EZ328.h | ||
MC68VZ328.h | ||
MC68328.h | ||
MC68332.h | ||
mc146818rtc.h | ||
mcfcache.h | ||
mcfdma.h | ||
mcfmbus.h | ||
mcfne.h | ||
mcfpit.h | ||
mcfsim.h | ||
mcfsmc.h | ||
mcftimer.h | ||
mcfuart.h | ||
mcfwdebug.h | ||
md.h | ||
mman.h | ||
mmu.h | ||
mmu_context.h | ||
mmzone.h | ||
module.h | ||
motorola_pgalloc.h | ||
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 | ||
page_no.h | ||
page_offset.h | ||
param.h | ||
parport.h | ||
pci.h | ||
percpu.h | ||
pgalloc.h | ||
pgtable.h | ||
pgtable_mm.h | ||
pgtable_no.h | ||
poll.h | ||
posix_types.h | ||
processor.h | ||
processor_mm.h | ||
processor_no.h | ||
ptrace.h | ||
q40_master.h | ||
q40ints.h | ||
quicc_simple.h | ||
raw_io.h | ||
resource.h | ||
rtc.h | ||
sbus.h | ||
scatterlist.h | ||
sections.h | ||
segment.h | ||
sembuf.h | ||
serial.h | ||
setup.h | ||
shm.h | ||
shmbuf.h | ||
shmparam.h | ||
sigcontext.h | ||
siginfo.h | ||
signal.h | ||
smp.h | ||
socket.h | ||
sockios.h | ||
spinlock.h | ||
stat.h | ||
statfs.h | ||
string.h | ||
string_mm.h | ||
string_no.h | ||
sun3-head.h | ||
sun3_pgalloc.h | ||
sun3_pgtable.h | ||
sun3ints.h | ||
sun3mmu.h | ||
sun3x.h | ||
sun3xflop.h | ||
sun3xprom.h | ||
swab.h | ||
system.h | ||
system_mm.h | ||
system_no.h | ||
termbits.h | ||
termios.h | ||
thread_info.h | ||
thread_info_mm.h | ||
thread_info_no.h | ||
timex.h | ||
tlb.h | ||
tlbflush.h | ||
topology.h | ||
traps.h | ||
traps_mm.h | ||
traps_no.h | ||
types.h | ||
uaccess.h | ||
uaccess_mm.h | ||
uaccess_no.h | ||
ucontext.h | ||
unaligned.h | ||
unistd.h | ||
user.h | ||
virtconvert.h | ||
xor.h | ||
zorro.h |