2005-04-21 00:57:58

by Linus Torvalds

[permalink] [raw]
Subject: Linux 2.6.12-rc3


Ok,
you know what the subject line means by now, but this release is a bit
different from the usual ones, for obvious reasons. It's the first in a
_long_ time that I've done without using BK, and it's the first one ever
that has been built up completely with "git".

It's available both as a patch (against 2.6.11) and as a tar-ball, and
for non-BK users the biggest difference is probably that the ChangeLog
format has changed a bit. And it will probably continue to evolve, since I
don't have my "release-script" tools set up for the new setup, so this
release was done largely manually with some ad-hoc scripting to get the
ChangeLog information etc out of git.

For BK users, I hope we can get a BK tree that tracks this set up soon,
and it should hopefully not be too disruptive either.

And for the crazy people, the git archive on kernel.org is up and running
under /pub/scm/linux/kernel/git/torvalds/linux-2.6.git. For the
adventurous of you, the name of the 2.6.12-rc3 release is a very nice and
readable:

a2755a80f40e5794ddc20e00f781af9d6320fafb

and eventually I'll try to make sure that I actually accompany all
releases with the SHA1 git name of the release signed with a digital
signature.

One of the tools I don't have set up yet is the old "shortlog" script, so
I did this really hacky conversion. You don't want to know, but let's say
that I'm re-aquainting myself with 'sed' after a long time ;). But if some
lines look like they got hacked up in the middle, rest assured that that's
exactly what happened, and the long log should have the rest ...

Linus

----
Changes since 2.6.12-rc2:

Adrian Bunk:
[PATCH] MAINTAINERS: remove obsolete ACP/MWAVE MODEM entry
[PATCH] let SOUND_AD1889 depend on PCI

Alan Stern:
[PATCH] USB: USB API documentation modification

Alexander Nyberg:
[PATCH] swsusp: SMP fix

Andi Kleen:
[PATCH] x86-64/i386: Revert cpuinfo siblings behaviour back to 2.6.10
[PATCH] x86-64: Fix BUG()
[PATCH] x86_64: Add acpi_skip_timer_override option
[PATCH] x86_64: Always use CPUID 80000008 to figure out MTRR address space size
[PATCH] x86_64: Call do_notify_resume unconditionally in entry.S
[PATCH] x86_64: Correct wrong comment in local.h
[PATCH] x86_64: Don't assume future AMD CPUs have K8 compatible performance counters
[PATCH] x86_64: Dump stack and prevent recursion on early fault
[PATCH] x86_64: Final support for AMD dual core
[PATCH] x86_64: Fix a small missing schedule race
[PATCH] x86_64: Fix interaction of single stepping with debuggers
[PATCH] x86_64: Handle programs that set TF in user space using popf while single stepping
[PATCH] x86_64: Keep only a single debug notifier chain
[PATCH] x86_64: Make IRDA devices are not really ISA devices not depend on CONFIG_ISA
[PATCH] x86_64: Make kernel math errors a die() now
[PATCH] x86_64: Minor microoptimization in syscall entry slow path
[PATCH] x86_64: Port over e820 gap detection from i386
[PATCH] x86_64: Regularize exception stack handling
[PATCH] x86_64: Remove duplicated syscall entry.
[PATCH] x86_64: Remove excessive stack allocation in MCE code with large NR_CPUS
[PATCH] x86_64: Remove unused macro in preempt support
[PATCH] x86_64: Rename the extended cpuid level field
[PATCH] x86_64: Rewrite exception stack backtracing
[PATCH] x86_64: Some fixes for single step handling
[PATCH] x86_64: Support constantly ticking TSCs
[PATCH] x86_64: Switch SMP bootup over to new CPU hotplug state machine
[PATCH] x86_64: Use a VMA for the 32bit vsyscall
[PATCH] x86_64: Use a common function to find code segment bases
[PATCH] x86_64: Use the e820 hole to map the IOMMU/AGP aperture
[PATCH] x86_64: Use the extended RIP MSR for machine check reporting if available.
[PATCH] x86_64: add support for Intel dual-core detection and displaying
[PATCH] x86_64: clean up ptrace single-stepping
[PATCH] x86_64: disable interrupts during SMP bogomips checking

Andrea Arcangeli:
[PATCH] oom-killer disable for iscsi/lvm2/multipath userland critical sections

Andrew Morton:
[PATCH] Fix acl Oops
[PATCH] USB: usb_cdc build fix
[PATCH] USB: usbnet printk warning fix
[PATCH] arm: add comment about dma_supported()
[PATCH] arm: add comment about max_low_pfn/max_pfn
[PATCH] arm: fix SIGBUS handling
[PATCH] arm: fix help text for ixdp465
[PATCH] end_buffer_write_sync() avoid pointless assignments
[PATCH] fix Bug 4395: modprobe bttv freezes the computer
[PATCH] jbd dirty buffer leak fix
[PATCH] vmscan: pageout(): remove unneeded test
[PATCH] x86_64 show_stack(): call touch_nmi_watchdog

Anton Blanchard:
[PATCH] ppc64: remove -fno-omit-frame-pointer

Arnaldo Carvalho de Melo:
[PATCH] net: don't call kmem_cache_create with a spinlock held
[SOCK]: on failure free the sock from the right place

Artem B. Bityuckiy:
[PATCH] crypto: call zlib end functions on deflate exit path

Benjamin Herrenschmidt:
[PATCH] fbdev MAINTAINERS update
[PATCH] pmac: Improve sleep code of tumbler driver
[PATCH] pmac: sound support for latest laptops
[PATCH] ppc32: Fix AGP and sleep again
[PATCH] ppc32: Fix cpufreq problems
[PATCH] ppc32: MV643XX ethernet is an option for Pegasos
[PATCH] ppc64: Detect altivec via firmware on unknown CPUs
[PATCH] ppc64: Fix semantics of __ioremap
[PATCH] ppc64: Improve mapping of vDSO
[PATCH] ppc64: remove bogus f50 hack in prom.c
[PATCH] ppc64: very basic desktop g5 sound support

Benoit Boissinot:
[PATCH] cpuset: remove function attribute const
[PATCH] ppc32: fix compilation error in arch/ppc/kernel/time.c
[PATCH] ppc32: fix compilation error in arch/ppc/syslib/open_pic_defs.h
[PATCH] ppc32: fix compilation error in include/asm-m68k/setup.h
[PATCH] ppc32: fix compilation error in include/asm/prom.h

Bernard Blackham:
[PATCH] ext2 corruption - regression between 2.6.9 and 2.6.10

Bert Wesarg:
[PATCH] fix module_param_string() calls
[PATCH] kernel/param.c: don't use .max when .num is NULL in param_array_set()

Bharath Ramesh:
[PATCH] AYSNC IO using singals other than SIGIO

Chris Wedgwood:
[PATCH] x86: fix acpi compile without CONFIG_ACPI_BUS

Christoph Hellwig:
[PATCH] fix up newly added jsm driver
[PATCH] kill #ifndef HAVE_ARCH_GET_SIGNAL_TO_DELIVER in signal.c
[PATCH] officially deprecate register_ioctl32_conversion

Christoph Lameter:
[PATCH] mmtimer build fix

Christopher Li:
[PATCH] USB: bug fix in usbdevfs

Colin Leroy:
[PATCH] CREDITS update

Coywolf Qi Hunt:
[PATCH] reparent_to_init cleanup

Daniel McNeil:
[PATCH] Direct IO async short read fix

Dave Airlie:
[PATCH] r128_state.c: break missing in switch statement

Dave Hansen:
[PATCH] undo do_readv_writev() behavior change

David Brownell:
[PATCH] USB: OHCI on Compaq Aramada 7400
[PATCH] USB: hcd suspend uses pm_message_t
[PATCH] USB: revert "fix" to usb_set_interface()
[PATCH] USB: usbnet and zaurus zl-5600
[PATCH] revert fs/char_dev.c CONFIG_BASE_FULL change
[PATCH] usb gadget: ethernet/rndis updates
[PATCH] usb resume fixes
[PATCH] usb suspend updates (interface suspend)

David Howells:
[PATCH] Add 32-bit compatibility for NFSv4 mount

David S. Miller:
[PATCH] Fix get_compat_sigevent()
[PATCH] Fix linux/atalk.h header
[PATCH] sparc64: Do not flush dcache for ZERO_PAGE.
[PATCH] sparc64: Fix stat
[PATCH] sparc64: Reduce ptrace cache flushing
[PATCH] sparc64: use message queue compat syscalls
[PATCH] sparc: Fix PTRACE_CONT bogosity
[RTNETLINK]: Add comma to final entry in link_rtnetlink_table

Eugene Surovegin:
[PATCH] ppc32: ppc4xx_pic - add acknowledge when enabling level-sensitive IRQ

Flavio Leitner:
[PATCH] pl2303 - status line
[PATCH] pl2303 - unplug device.

Geert Uytterhoeven:
[PATCH] M68k: Update defconfigs for 2.6.11
[PATCH] M68k: Update defconfigs for 2.6.12-rc2

Giovambattista Pulcini:
[PATCH] ppc32: Fix a problem with NTP on !(chrp||gemini)

Greg KH:
[PATCH] USB: fix up some sparse warnings about static functions that aren't static.

Hal Rosenstock:
[PATCH] IB: Remove incorrect comments
[PATCH] IB: remove unneeded includes
[PATCH] IPoIB: set skb->mac.raw on receive

Herbert Xu:
[ATALK]: Add missing dev_hold() to atrtr_create().
[IPSEC]: COW skb header in UDP decap
[IPV6]: IPV6_CHECKSUM socket option can corrupt kernel memory
[IPV6]: Replace bogus instances of inet->recverr
[NET]: Shave sizeof(ptr) bytes off dst_entry
[PATCH] Fix dst_destroy() race

Horms:
[PATCH] Maintainers list update: linux-net -> netdev

Hugh Dickins:
[PATCH] freepgt: arch FIRST_USER_ADDRESS 0
[PATCH] freepgt: arm FIRST_USER_ADDRESS PAGE_SIZE
[PATCH] freepgt: arm26 FIRST_USER_ADDRESS PAGE_SIZE
[PATCH] freepgt: free_pgtables from FIRST_USER_ADDRESS
[PATCH] freepgt: free_pgtables use vma list
[PATCH] freepgt: hugetlb area is clean
[PATCH] freepgt: hugetlb_free_pgd_range
[PATCH] freepgt: mpnt to vma cleanup
[PATCH] freepgt: remove FIRST_USER_ADDRESS hack
[PATCH] freepgt: remove MM_VM_SIZE(mm)
[PATCH] freepgt: remove arch pgd_addr_end
[PATCH] freepgt: sys_mincore ignore FIRST_USER_PGD_NR

Ingo Molnar:
[PATCH] sched: fix signed comparisons of long long

James Bottomley:
[PATCH] add Big Endian variants of ioread/iowrite
[PATCH] re-export cancel_rearming_delayed_workqueue
fully merge up to scsi-misc-2.6
merge by hand (scsi_device.h)

James Morris:
[PATCH] SELinux: add support for NETLINK_KOBJECT_UEVENT
[PATCH] SELinux: fix bug in Netlink message type detection

Jan Kara:
[PATCH] quota: fix possible oops on quotaoff

Jason Davis:
[PATCH] x86_64 genapic update

Jason Gaston:
[PATCH] ahci: AHCI mode SATA patch for Intel ESB2
[PATCH] ata_piix: IDE mode SATA patch for Intel ESB2
[PATCH] i2c-i801: I2C patch for Intel ESB2
[PATCH] intel8x0: AC'97 audio patch for Intel ESB2
[PATCH] irq and pci_ids: patch for Intel ESB2
[PATCH] piix: IDE PATA patch for Intel ESB2

Jean Delvare:
[PATCH] I2C: Fix incorrect sysfs file permissions in it87 and via686a drivers
[PATCH] I2C: via686a cleanups

Jean Tourrilhes:
[PATCH] irda_device() oops fix

Jeff Moyer:
[PATCH] filemap_getpage can block when MAP_NONBLOCK specified

Jens Axboe:
[PATCH] fix NMI lockup with CFQ scheduler
[PATCH] possible use-after-free of bio

Jesper Juhl:
[PATCH] USB: kfree cleanup for drivers/usb/* - no need to check for NULL
[PATCH] usb: kfree() cleanups in drivers/usb/core/devio.c

Jurij Smakov:
[PATCH] sparc64: Fix copy_sigingo_to_user32()

Kay Sievers:
[PATCH] sysfs: add sysfs_chmod_file()

Ken Chen:
[PATCH] use cheaper elv_queue_empty when unplug a device

Kumar Gala:
[PATCH] ppc32: Allow adjust of pfn offset in pte
[PATCH] ppc32: Fix pte_update for 64-bit PTEs
[PATCH] ppc32: Support 36-bit physical addressing on e500
[PATCH] ppc32: make usage of CONFIG_PTE_64BIT & CONFIG_PHYS_64BIT consistent

Larry Battraw:
[PATCH] USB: visor Tapwave Zodiac support patch

Leigh Brown:
[PATCH] ppc32: Make the Powerstack II Pro4000 boot again

Lennert Buytenhek:
[PATCH] pci enumeration on ixp2000: overflow in kernel/resource.c

Libor Michalek:
[PATCH] IB: Trivial FMR printk cleanup

Linus Torvalds:
Fix up some file mode differences due to the new git world order.
Linux v2.6.12-rc3
Linux-2.6.12-rc2
Merge SCSI tree from James Bottomley.
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6.git/
Merge with Greg's USB tree at kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6.git/
Merge with kernel.org:/pub/scm/linux/kernel/git/gregkh/aoe-2.6.git/
Merge with kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6.git/
Merge with master.kernel.org:/home/rmk/linux-2.6-rmk.git
Merge with master.kernel.org:/home/rmk/linux-2.6-rmk.git - ARM changes

Magnus Damm:
[PATCH] opl3sa2: MODULE_PARM_DESC

Martin Hicks:
[PATCH] meminfo: add Cached underflow check

Matt Mackall:
[PATCH] update maintainer for /dev/random

Michael S. Tsirkin:
[PATCH] IB/mthca: add SYNC_TPT firmware command
[PATCH] IB/mthca: add fast memory region implementation
[PATCH] IB/mthca: add mthca_table_find() function
[PATCH] IB/mthca: add mthca_write64_raw() for writing to MTT table directly
[PATCH] IB/mthca: allow unaligned memory regions
[PATCH] IB/mthca: encapsulate MTT buddy allocator
[PATCH] IB/mthca: fill in opcode field for send completions
[PATCH] IB/mthca: fix MR allocation error path
[PATCH] IB/mthca: split MR key munging routines

Michal Ostrowski:
[PATCH] debugfs: fix !debugfs prototypes

Neil Brown:
[PATCH] Avoid deadlock in sync_page_io by using GFP_NOIO
[PATCH] md: close a small race in md thread deregistration
[PATCH] md: remove a number of misleading calls to MD_BUG
[PATCH] nfsd4: callback create rpc client returns
[PATCH] nfsd4: fix struct file leak
[PATCH] nfsd: clear signals before exiting the nfsd() thread

Nishanth Aravamudan:
[PATCH] USB: usb/digi_acceleport: correct wait-queue state

Niu YaWei:
[PATCH] quota: possible bug in quota format v2 support

Olof Johansson:
[PATCH] ppc64: no prefetch for NULL pointers

Paolo 'Blaisorblade' Giarrusso:
[PATCH] uml: fix compilation for __CHOOSE_MODE addition

Paul E. McKenney:
[PATCH] Fix comment in list.h that refers to nonexistent API

Paul Mackerras:
[PATCH] ppc32: fix bogosity in process-freezing code
[PATCH] ppc32: fix single-stepping of emulated instructions
[PATCH] ppc32: improve timebase sync for SMP
[PATCH] ppc32: oops on kernel altivec assist exceptions
[PATCH] ppc64: fix export of wrong symbol

Pavel Machek:
[PATCH] Fix u32 vs. pm_message_t in drivers/char
[PATCH] Fix u32 vs. pm_message_t in x86-64
[PATCH] USB: fix up remaining pm_message_t usages
[PATCH] fix few remaining u32 vs. pm_message_t problems
[PATCH] fix pm_message_t vs. u32 in alsa
[PATCH] fix u32 vs. pm_message_t in PCI, PCIE
[PATCH] fix u32 vs. pm_message_t in driver/video
[PATCH] fix u32 vs. pm_message_t in drivers/
[PATCH] fix u32 vs. pm_message_t in drivers/macintosh
[PATCH] fix u32 vs. pm_message_t in drivers/media
[PATCH] fix u32 vs. pm_message_t in drivers/message
[PATCH] fix u32 vs. pm_message_t in drivers/mmc,mtd,scsi
[PATCH] fix u32 vs. pm_message_t in pcmcia
[PATCH] fix u32 vs. pm_message_t in rest of the tree
[PATCH] pm_message_t: more fixes in common and i386
[PATCH] power/video.txt: update documentation with more systems
[PATCH] u32 vs. pm_message_t fixes for drivers/net
[PATCH] u32 vs. pm_message_t in ppc and radeon

Peter Favrholdt:
[PATCH] USB: pl2303 new vendor/model ids

Phil Dibowitz:
[PATCH] Fix GO_SLOW delay

Randy.Dunlap:
[PATCH] Add dontdiff file

Robert Schwebel:
[PATCH] export platform_add_devices

Roland Dreier:
[PATCH] IB/mthca: add support for new MT25204 HCA
[PATCH] IB/mthca: allocate correct number of doorbell pages
[PATCH] IB/mthca: allow address handle creation in interrupt context
[PATCH] IB/mthca: clean up mthca_dereg_mr()
[PATCH] IB/mthca: encapsulate mem-free check into mthca_is_memfree()
[PATCH] IB/mthca: fill in more device query fields
[PATCH] IB/mthca: fix MTT allocation in mem-free mode
[PATCH] IB/mthca: fix calculation of RDB shift
[PATCH] IB/mthca: fix format of CQ number for CQ events
[PATCH] IB/mthca: fix posting sends with immediate data
[PATCH] IB/mthca: implement RDMA/atomic operations for mem-free mode
[PATCH] IB/mthca: map MPT/MTT context in mem-free mode
[PATCH] IB/mthca: map context for RDMA responder in mem-free mode
[PATCH] IB/mthca: only free doorbell records in mem-free mode
[PATCH] IB/mthca: print assigned IRQ when interrupt test fails
[PATCH] IB/mthca: release mutex on doorbell alloc error path
[PATCH] IB/mthca: tweaks to mthca_cmd.c
[PATCH] IB/mthca: update receive queue initialization for new HCAs
[PATCH] IB: Fix FMR pool crash
[PATCH] IB: Fix user MAD registrations with class 0
[PATCH] IPoIB: convert to debugfs
[PATCH] IPoIB: document conversion to debugfs
[PATCH] IPoIB: fix static rate calculation
[PATCH] debugfs: Reduce <linux/debugfs.h> dependencies
[PATCH] drivers/infiniband/hw/mthca/mthca_main.c: remove an unused label

Roland McGrath:
[PATCH] i386 vDSO: add PT_NOTE segment
[PATCH] i386: Use loaddebug macro consistently
[PATCH] x86-64: i386 vDSO: add PT_NOTE segment

Russell King:
[PATCH] ARM: Add missing new file for bitops patch
[PATCH] ARM: bitops
[PATCH] ARM: fix debug macros
[PATCH] ARM: footbridge rtc init
[PATCH] ARM: h3600_irda_set_speed arguments
[PATCH] ARM: showregs
[PATCH] arm: fix floppy disk dependencies
[PATCH] serial: fix comments in 8250.c

Sean Hefty:
[PATCH] IB: Keep MAD work completion valid

Siddha, Suresh B:
[PATCH] x86, x86_64: dual core proc-cpuinfo and sibling-map fix
[PATCH] x86_64-always-use-cpuid-80000008-to-figure-out-mtrr fix

Stas Sergeev:
[PATCH] fix crash in entry.S restore_all

Stephen Hemminger:
[NET]: skbuff: remove old NET_CALLER macro

Stephen Smalley:
[PATCH] SELinux: fix deadlock on dcache lock

Steven Cole:
[PATCH] 2.6.12-rc1-mm3 Fix ver_linux script for no udev utils.

Thomas Graf:
[RTNETLINK]: Protocol family wildcard dumping for routing rules

Thomas Winischhofer:
[PATCH] USB: new SIS device id

Tom Rini:
[PATCH] ppc32: Fix building 32bit kernel for 64bit machines
[PATCH] ppc32: Fix mpc8xx watchdog

Viktor A. Danilov:
[PATCH] USB: fix AIPTEK input doesn`t register `device` & `driver` section in sysfs (/sys/class/input/event#)

YOSHIFUJI Hideaki:
[IPV6]: Fix a branch prediction

Yoichi Yuasa:
[PATCH] mips: remove #include <linux/audit.h> two times
[PATCH] mips: remove obsolete VR41xx RTC function from vr41xx.h
[PATCH] mips: update VR41xx CPU-PCI bridge support

Yoshinori Sato:
[PATCH] h8300 header update

[email protected]:
[PATCH] zfcp: convert to compat_ioctl

[email protected]:
[PATCH] qla2xxx: add remote port codes...
[PATCH] qla2xxx: cleanup DMA mappings...
[PATCH] qla2xxx: remove /proc interface
[PATCH] qla2xxx: remove internal queuing...
[PATCH] qla2xxx: remove lun discovery codes...
[PATCH] qla2xxx: remove sale revision notes file
[PATCH] qla2xxx: update version to 8.00.02b5-k

[email protected]:
[PATCH] drivers/scsi/gdth.c: cleanups

[email protected]:
[PATCH] sg.c: update

[email protected]:
[PATCH] aoe 1/12: remove too-low cap on minor number
[PATCH] aoe 11/12: add support for disk statistics
[PATCH] aoe 12/12: send outgoing packets in order
[PATCH] aoe 2/12: allow multiple aoe devices with same MAC
[PATCH] aoe 3/12: update driver version to 6
[PATCH] aoe 4/12: handle distros that have a udev rules
[PATCH] aoe 5/12: don't try to free null bufpool
[PATCH] aoe 6/12: Alexey Dobriyan sparse cleanup
[PATCH] aoe 8/12: document env var for specifying number
[PATCH] aoe 9/12: add note about the need for deadlock-free sk_buff allocation

[email protected]:
[PATCH] USB Storage unusual_dev.h 07c4:a10b Datafab Systems, Inc.

[email protected]:
[PATCH] USB: add new visor id for Treo 650
[PATCH] kref: add link to original documentation to the kref documentation.

[email protected]:
[PATCH] consolidate timeout defintions in scsi.h
[PATCH] consolidate timeout defintions in scsi.h
[PATCH] kill old EH constants
[PATCH] kill old EH constants
[PATCH] remove old scsi data direction macros
[PATCH] remove outdated print_* functions
[PATCH] remove outdated print_* functions

[email protected]:
[PATCH] scsi: remove meaningless scsi_cmnd->serial_number_at_timeout field
[PATCH] scsi: remove meaningless scsi_cmnd->serial_number_at_timeout field
[PATCH] scsi: remove unused scsi_cmnd->internal_timeout field
[PATCH] scsi: remove unused scsi_cmnd->internal_timeout field
[PATCH] scsi: remove volatile from scsi data
[PATCH] scsi: scsi_send_eh_cmnd() cleanup

[email protected]:
[PATCH] finally fix 53c700 to use the generic iomem infrastructure
[PATCH] Convert i2o to compat_ioctl
[PATCH] Convert i2o to compat_ioctl
aic7xxx: add support for the SPI transport class
aic7xxx: convert to SPI transport class Domain Validation
lpfc: add Emulex FC driver version 8.0.28
qla2xxx: fix compiler warning in qla_attr.c
scsi: add DID_REQUEUE to the error handling
scsi: add DID_REQUEUE to the error handling
updates for CFQ oops fix
zfcp: add point-2-point support
zfcp: add point-2-point support

[email protected]:
[PATCH] w1: real fix for big endian machines.
[PATCH] w1_smem: w1 ID is only 8 bytes long.

[email protected]:
[PATCH] add TIMEOUT to firmware_class hotplug event
[PATCH] kobject/hotplug split - block core
[PATCH] kobject/hotplug split - class core
[PATCH] kobject/hotplug split - devices core
[PATCH] kobject/hotplug split - kobject add/remove
[PATCH] kobject/hotplug split - net bridge
[PATCH] kobject/hotplug split - usb cris

maximilian attems:
[PATCH] efi: eliminate bad section references
[PATCH] hd: eliminate bad section references
[PATCH] pnpbios: eliminate bad section references

[email protected]:
[PATCH] kref: add documentation


2005-04-21 01:07:40

by Alejandro Bonilla

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Linus Torvalds wrote:

>Ok,
> you know what the subject line means by now, but this release is a bit
>different from the usual ones, for obvious reasons. It's the first in a
>_long_ time that I've done without using BK, and it's the first one ever
>that has been built up completely with "git".
>
>It's available both as a patch (against 2.6.11) and as a tar-ball, and
>for non-BK users the biggest difference is probably that the ChangeLog
>format has changed a bit. And it will probably continue to evolve, since I
>don't have my "release-script" tools set up for the new setup, so this
>release was done largely manually with some ad-hoc scripting to get the
>ChangeLog information etc out of git.
>
>For BK users, I hope we can get a BK tree that tracks this set up soon,
>and it should hopefully not be too disruptive either.
>
>
>
Excuse me for being so uninformed, poor reader and so on...

Why is kb not used anymore? What happened?

Thanks for the time,

- Alejandro

2005-04-21 01:24:42

by James Purser

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Have a look through the mail archives and try "Bitkeeper and Linux" in
google, lets just say its been interesting.
--
James Purser
http://ksit.dynalias.com

2005-04-21 01:39:39

by Patrick McFarland

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Wednesday 20 April 2005 09:09 pm, Alejandro Bonilla wrote:
> Why is kb not used anymore? What happened?

Linus decided that keyboards are out, and voice activation is in. Remember to
use a high quality microphone!

--
Patrick "Diablo-D3" McFarland || [email protected]
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd
all be running around in darkened rooms, munching magic pills and listening to
repetitive electronic music." -- Kristian Wilson, Nintendo, Inc, 1989


Attachments:
(No filename) (509.00 B)
(No filename) (189.00 B)
Download all attachments

2005-04-21 01:59:36

by Alejandro Bonilla

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Patrick McFarland wrote:

>On Wednesday 20 April 2005 09:09 pm, Alejandro Bonilla wrote:
>
>
>>Why is kb not used anymore? What happened?
>>
>>
>
>Linus decided that keyboards are out, and voice activation is in. Remember to
>use a high quality microphone!
>
>
>
Ohh _G_ Is that Why!? I thought it was cause there were some problems
with 2 guys and a non-free Software? James gave me what I needed to
know. ;-) Thanks.

And I really hope that Linus can find a way to do things better for him
and everyone else. Hopefully someone can create an SCM as nice and good
as I read BK was...

Sorry for invoking this old topic.

- Alejandro

2005-04-21 04:03:16

by Barry K. Nathan

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Linux 2.6.12-rc3 is still missing the following compile fixes:

[PATCH] fix ultrastor.c compile error
http://marc.theaimsgroup.com/?l=linux-scsi&m=111391774018717&w=2

[PATCH] fix aic7xxx_osm.c compile failure (gcc 2.95.x only)
http://marc.theaimsgroup.com/?l=linux-scsi&m=111391769011616&w=2

[linux-usb-devel] Re: [PATCH] fix microtek.c compile failure
http://marc.theaimsgroup.com/?l=linux-usb-devel&m=111391865311903&w=2

Another LKML poster (who I added to CC on this message) already hit the
aic7xxx compile failure with 2.6.12-rc3...

-Barry K. Nathan <[email protected]>

2005-04-21 08:36:31

by Martin Schlemmer

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Wed, 2005-04-20 at 17:59 -0700, Linus Torvalds wrote:

> And for the crazy people, the git archive on kernel.org is up and running
> under /pub/scm/linux/kernel/git/torvalds/linux-2.6.git. For the
> adventurous of you, the name of the 2.6.12-rc3 release is a very nice and
> readable:
>
> a2755a80f40e5794ddc20e00f781af9d6320fafb
>
> and eventually I'll try to make sure that I actually accompany all
> releases with the SHA1 git name of the release signed with a digital
> signature.
>

Small nit - how about using 'git tag' to tag the releases? Then it will
not be a problem to find a release later on ...


Thanks,

--
Martin Schlemmer


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2005-04-21 08:51:22

by Jan Dittmer

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

> [email protected]:
> [PATCH] zfcp: convert to compat_ioctl

This does not seem to compile anymore with defconfig:

CC drivers/s390/scsi/zfcp_aux.o
/usr/src/ctest/rc/kernel/drivers/s390/scsi/zfcp_aux.c:63: warning: initialization from incompatible pointer type
/usr/src/ctest/rc/kernel/drivers/s390/scsi/zfcp_aux.c:366: error: conflicting types for `zfcp_cfdc_dev_ioctl'
/usr/src/ctest/rc/kernel/drivers/s390/scsi/zfcp_aux.c:55: error: previous declaration of `zfcp_cfdc_dev_ioctl'
make[3]: *** [drivers/s390/scsi/zfcp_aux.o] Error 1
make[2]: *** [drivers/s390/scsi] Error 2
make[1]: *** [drivers/s390] Error 2
make: *** [_all] Error 2

Jan

2005-04-21 09:00:24

by Jan Dittmer

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Linus Torvalds wrote:
> Geert Uytterhoeven:
> [PATCH] M68k: Update defconfigs for 2.6.11
> [PATCH] M68k: Update defconfigs for 2.6.12-rc2

Why do I still get this error when trying to cross-compile for m68k?

toolchain:

Reading specs from /usr/local/m68k-uclinux-tools/lib/gcc/m68k-uclinux/3.4.0/specs
Configured with: /usr/local/src/uclinux-tools/gcc-3.4.0/configure --target=m68k-uclinux --prefix=/usr/local/m68k-uclinux-tools
--enable-languages=c,c++ --enable-multilib --enable-target-optspace --with-gnu-ld --disable-nls --disable-__cxa_atexit --disable-c99 --disable-clocale
--disable-c-mbchar --disable-long-long --enable-threads=posix --enable-cxx-flags=-D_ISOC99_SOURCE -D_BSD_SOURCE
Thread model: posix
gcc version 3.4.0
GNU ld version 2.14.90.0.8 20040114

(I tried an alternative toolchain with gcc 3.3.3 as well)

$ make mrproper
$ make ARCH=m68k CROSS_COMPILE=m68k-elf- mrproper
$ make ARCH=m68k CROSS_COMPILE=m68k-elf- defconfig
$ make ARCH=m68k CROSS_COMPILE=m68k-elf-
CHK include/linux/version.h
UPD include/linux/version.h
SYMLINK include/asm -> include/asm-m68k
SPLIT include/linux/autoconf.h -> include/config/*
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
CC arch/m68k/kernel/asm-offsets.s
In file included from include/linux/spinlock.h:12,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from arch/m68k/kernel/asm-offsets.c:12:
include/linux/thread_info.h:30: error: parse error before '{' token
include/linux/thread_info.h:35: error: parse error before '{' token
include/linux/thread_info.h: In function `test_and_set_thread_flag':
include/linux/thread_info.h:42: error: `current' undeclared (first use in this function)
include/linux/thread_info.h:42: error: (Each undeclared identifier is reported only once
include/linux/thread_info.h:42: error: for each function it appears in.)
include/linux/thread_info.h: In function `test_and_clear_thread_flag':
include/linux/thread_info.h:47: error: `current' undeclared (first use in this function)
include/linux/thread_info.h: At top level:
include/linux/thread_info.h:50: error: parse error before '{' token
include/linux/thread_info.h:50: warning: type defaults to `int' in declaration of `___res'
include/linux/thread_info.h:50: warning: data definition has no type or storage class
include/linux/thread_info.h:50: error: parse error before '}' token
include/linux/thread_info.h: In function `set_ti_thread_flag':
include/linux/thread_info.h:57: error: structure has no member named `flags'
include/linux/thread_info.h:57: error: structure has no member named `flags'
include/linux/thread_info.h: In function `clear_ti_thread_flag':
include/linux/thread_info.h:62: error: structure has no member named `flags'
include/linux/thread_info.h:62: error: structure has no member named `flags'
include/linux/thread_info.h: In function `test_and_set_ti_thread_flag':
include/linux/thread_info.h:67: error: structure has no member named `flags'
include/linux/thread_info.h:67: error: structure has no member named `flags'
include/linux/thread_info.h: In function `test_and_clear_ti_thread_flag':
include/linux/thread_info.h:72: error: structure has no member named `flags'
include/linux/thread_info.h:72: error: structure has no member named `flags'
include/linux/thread_info.h: In function `test_ti_thread_flag':
include/linux/thread_info.h:77: error: structure has no member named `flags'
In file included from include/linux/spinlock.h:12,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from arch/m68k/kernel/asm-offsets.c:12:
include/linux/thread_info.h:80:41: macro "set_need_resched" passed 1 arguments, but takes just 0
include/linux/thread_info.h: At top level:
include/linux/thread_info.h:81: error: syntax error before '{' token
include/linux/thread_info.h:85:43: macro "clear_need_resched" passed 1 arguments, but takes just 0
include/linux/thread_info.h:86: error: syntax error before '{' token
In file included from arch/m68k/kernel/asm-offsets.c:12:
include/linux/sched.h:1108: error: parse error before '{' token
include/linux/sched.h:1113: error: parse error before '{' token
include/linux/sched.h:1118: error: parse error before '{' token
include/linux/sched.h:1118: warning: type defaults to `int' in declaration of `___res'
include/linux/sched.h:1118: warning: data definition has no type or storage class
include/linux/sched.h:1118: error: parse error before '}' token
include/linux/sched.h:1118: warning: type defaults to `int' in declaration of `__res'
include/linux/sched.h:1118: warning: data definition has no type or storage class
include/linux/sched.h:1118: error: parse error before '}' token
include/linux/sched.h:1128: error: parse error before '{' token
include/linux/sched.h:1128: warning: type defaults to `int' in declaration of `___res'
include/linux/sched.h:1128: warning: data definition has no type or storage class
include/linux/sched.h:1128: error: parse error before '}' token
make[1]: *** [arch/m68k/kernel/asm-offsets.s] Error 1
make: *** [arch/m68k/kernel/asm-offsets.s] Error 2
Thu, 21 Apr 2005 09:05:23 +0200

Thanks,

Jan

2005-04-21 09:10:33

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Thu, 21 Apr 2005, Jan Dittmer wrote:
> Linus Torvalds wrote:
> > Geert Uytterhoeven:
> > [PATCH] M68k: Update defconfigs for 2.6.11
> > [PATCH] M68k: Update defconfigs for 2.6.12-rc2
>
> Why do I still get this error when trying to cross-compile for m68k?

Because to build m68k kernels, you (still :-( have to use the Linux/m68k CVS
repository, cfr. http://linux-m68k-cvs.ubb.ca/.

BTW, my patch queue is at
http://linux-m68k-cvs.ubb.ca/~geert/linux-m68k-2.6.x-merging/.
The main offender is POSTPONED/156-thread_info.diff.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2005-04-21 11:27:47

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi!

> And for the crazy people, the git archive on kernel.org is up and running
> under /pub/scm/linux/kernel/git/torvalds/linux-2.6.git. For the
> adventurous of you, the name of the 2.6.12-rc3 release is a very nice and
> readable:
>
> a2755a80f40e5794ddc20e00f781af9d6320fafb
>
> and eventually I'll try to make sure that I actually accompany all
> releases with the SHA1 git name of the release signed with a digital
> signature.

As far as I can see... (working with pasky's version of git....)

You should put this into .git/remotes

linus rsync://http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

Then

RSYNC_FLAGS=-zavP git pull linus

should do the right thing.

[pasky, would it be possible to make some kind of progress indication
default for long pulls?]

> One of the tools I don't have set up yet is the old "shortlog" script, so
> I did this really hacky conversion. You don't want to know, but let's say
> that I'm re-aquainting myself with 'sed' after a long time ;). But if some
> lines look like they got hacked up in the middle, rest assured that that's
> exactly what happened, and the long log should have the rest ...

--
Boycott Kodak -- for their patent abuse against Java.

2005-04-21 12:03:49

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi!

> > And for the crazy people, the git archive on kernel.org is up and running
> > under /pub/scm/linux/kernel/git/torvalds/linux-2.6.git. For the
> > adventurous of you, the name of the 2.6.12-rc3 release is a very nice and
> > readable:
> >
> > a2755a80f40e5794ddc20e00f781af9d6320fafb
> >
> > and eventually I'll try to make sure that I actually accompany all
> > releases with the SHA1 git name of the release signed with a digital
> > signature.
>
> As far as I can see... (working with pasky's version of git....)
>
> You should put this into .git/remotes
>
> linus rsync://http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
>
> Then
>
> RSYNC_FLAGS=-zavP git pull linus
>
> should do the right thing.

Well, not sure.

I did

git track linus
git cancel

but Makefile still contains -rc2. (Is "git cancel" right way to check
out the tree?)

and git diff -r linus: still contains some changes. [I did some
experimental pull of scsi changes long time ago, is it that problem?]

Pavel
--
Boycott Kodak -- for their patent abuse against Java.

2005-04-21 12:15:31

by Martin Schlemmer

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Thu, 2005-04-21 at 13:20 +0200, Pavel Machek wrote:
> Hi!
>
> > And for the crazy people, the git archive on kernel.org is up and running
> > under /pub/scm/linux/kernel/git/torvalds/linux-2.6.git. For the
> > adventurous of you, the name of the 2.6.12-rc3 release is a very nice and
> > readable:
> >
> > a2755a80f40e5794ddc20e00f781af9d6320fafb
> >
> > and eventually I'll try to make sure that I actually accompany all
> > releases with the SHA1 git name of the release signed with a digital
> > signature.
>
> As far as I can see... (working with pasky's version of git....)
>
> You should put this into .git/remotes
>
> linus rsync://http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
>
> Then
>
> RSYNC_FLAGS=-zavP git pull linus
>
> should do the right thing.
>

From 0.5 or 0.6 you just have to do:

git init rsync://http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

> [pasky, would it be possible to make some kind of progress indication
> default for long pulls?]
>

Latest seems to do the rsync verbose.


--
Martin Schlemmer


Attachments:
signature.asc (189.00 B)
This is a digitally signed message part

2005-04-21 12:19:17

by Ralf Hildebrandt

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

> It's available both as a patch (against 2.6.11) and as a tar-ball, and
Where IS the tarball? Not on http://www.kernel.org, that's for sure.

--
Ralf Hildebrandt (i.A. des IT-Zentrum) [email protected]
Charite - Universit?tsmedizin Berlin Tel. +49 (0)30-450 570-155
Gemeinsame Einrichtung von FU- und HU-Berlin Fax. +49 (0)30-450 570-962
IT-Zentrum Standort CBF send no mail to [email protected]

2005-04-21 13:33:44

by Andreas Steinmetz

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Compile error on x86_64:

CC [M] drivers/usb/image/microtek.o
drivers/usb/image/microtek.c: In function `mts_scsi_abort':
drivers/usb/image/microtek.c:338: error: `FAILURE' undeclared (first use
in this function)
drivers/usb/image/microtek.c:338: error: (Each undeclared identifier is
reported only once
drivers/usb/image/microtek.c:338: error: for each function it appears in.)
make[3]: *** [drivers/usb/image/microtek.o] Error 1
make[2]: *** [drivers/usb/image] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2

--
Andreas Steinmetz SPAMmers use [email protected]

2005-04-21 14:25:29

by Andreas Steinmetz

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3: Oops on IDE flash disk eject

Bootdata ok (command line is BOOT_IMAGE=2.6.12rc2 ro root=301 hdb=none hdc=cdrom hdd=none elevator=cfq psmouse.rate=20 report_lost_ticks iommu=off init=/bin/bash)
Linux version 2.6.12-rc3-gringo (root@gringo) (gcc version 3.4.3) #1 Thu Apr 21 15:45:08 CEST 2005
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000d8000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000003ff70000 (usable)
BIOS-e820: 000000003ff70000 - 000000003ff7a000 (ACPI data)
BIOS-e820: 000000003ff7a000 - 000000003ff80000 (ACPI NVS)
BIOS-e820: 000000003ff80000 - 0000000040000000 (reserved)
BIOS-e820: 00000000fffe0000 - 0000000100000000 (reserved)
ACPI: RSDP (v000 PTLTD ) @ 0x00000000000f6a60
ACPI: RSDT (v001 PTLTD RSDT 0x06040000 LTP 0x00000000) @ 0x000000003ff73fde
ACPI: FADT (v002 AMDK8 PTLTW 0x06040000 PTL_ 0x000f4240) @ 0x000000003ff79e56
ACPI: SSDT (v001 PTLTD POWERNOW 0x06040000 LTP 0x00000001) @ 0x000000003ff79eda
ACPI: MADT (v001 PTLTD APIC 0x06040000 LTP 0x00000000) @ 0x000000003ff79fb0
ACPI: DSDT (v001 VIA PTL_ACPI 0x06040000 MSFT 0x0100000e) @ 0x0000000000000000
On node 0 totalpages: 262000
DMA zone: 4096 pages, LIFO batch:1
Normal zone: 257904 pages, LIFO batch:16
HighMem zone: 0 pages, LIFO batch:1
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
Processor #0 15:4 APIC version 16
ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 1, version 3, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 high edge)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Setting APIC routing to flat
Using ACPI (MADT) for SMP configuration information
Allocating PCI resources starting at 40000000 (gap: 40000000:bffe0000)
Built 1 zonelists
Kernel command line: BOOT_IMAGE=2.6.12rc2 ro root=301 hdb=none hdc=cdrom hdd=none elevator=cfq psmouse.rate=20 report_lost_ticks iommu=off init=/bin/bash console=tty0
ide_setup: hdb=none
ide_setup: hdc=cdrom
ide_setup: hdd=none
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 131072 bytes)
time.c: Using 1.193182 MHz PIT timer.
time.c: Detected 1801.076 MHz processor.
time.c: Using PIT/TSC based timekeeping.
Console: colour VGA+ 80x50
time.c: Lost 3 timer tick(s)! rip vfs_caches_init_early+0x0/0xa0)
Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
Memory: 1024468k/1048000k available (2958k kernel code, 22832k reserved, 1639k data, 164k init)
Calibrating delay loop... 3547.13 BogoMIPS (lpj=1773568)
Security Framework v1.0.0 initialized
SELinux: Initializing.
SELinux: Starting in permissive mode
selinux_register_security: Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 256
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 1024K (64 bytes/line)
CPU: AMD Athlon(tm) 64 Processor 3000+ stepping 0a
time.c: Lost 86 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
Using local APIC NMI watchdog using perfctr0
Using local APIC timer interrupts.
Detected 12.507 MHz APIC timer.
time.c: Lost 55 timer tick(s)! rip setup_boot_APIC_clock+0x112/0x120)
NET: Registered protocol family 16
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20050309
ACPI: Interpreter enabled
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI: Probing PCI hardware (bus 00)
PCI: Via IRQ fixup
Boot video device is 0000:01:00.0
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Link [ALKA] (IRQs 16 17 18 19 20 21 22 23) *10, disabled.
ACPI: PCI Interrupt Link [ALKB] (IRQs 16 17 18 19 20 21 22 23) *10, disabled.
ACPI: PCI Interrupt Link [ALKC] (IRQs 22) *11, disabled.
ACPI: PCI Interrupt Link [ALKD] (IRQs 21) *11, disabled.
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 7 9 12 14 15) *10
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 7 *10 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 7 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 7 9 10 *11 12 14 15)
ACPI: Embedded Controller [EC] (gpe 11)
time.c: Lost 8 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
time.c: Lost 8 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
time.c: Lost 8 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
pnp: PnP ACPI: found 10 devices
SCSI subsystem initialized
Linux Kernel Card Services
options: [pci] [cardbus] [pm]
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: Using ACPI for IRQ routing
PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report
NET: Registered protocol family 23
Bluetooth: Core ver 2.7
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
pnp: 00:05: ioport range 0x600-0x60f has been reserved
pnp: 00:05: ioport range 0x1c0-0x1cf has been reserved
pnp: 00:05: ioport range 0x4d0-0x4d1 has been reserved
pnp: 00:05: ioport range 0xfe10-0xfe11 could not be reserved
IA32 emulation $Id: sys_ia32.c,v 1.32 2002/03/24 13:02:28 ak Exp $
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
SELinux: Registering netfilter hooks
Initializing Cryptographic API
time.c: Lost 7 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
ACPI: AC Adapter [AC] (on-line)
time.c: Lost 8 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
ACPI: Battery Slot [BAT0] (battery present)
ACPI: Power Button (FF) [PWRF]
ACPI: Lid Switch [LID]
ACPI: Sleep Button (CM) [SLPB]
ACPI: Video Device [VGA] (multi-head: yes rom: no post: no)
time.c: Lost 17 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
time.c: Lost 17 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
time.c: Lost 17 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
time.c: Lost 18 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
time.c: Lost 17 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
ACPI: Thermal Zone [THRS] (47 C)
time.c: Lost 17 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
time.c: Lost 17 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
time.c: Lost 17 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
time.c: Lost 17 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
time.c: Lost 17 timer tick(s)! rip acpi_os_write_port+0x1a/0x36)
ACPI: Thermal Zone [THRC] (56 C)
Real Time Clock Driver v1.12
Linux agpgart interface v0.101 (c) Dave Jones
agpgart: Detected AGP bridge 0
agpgart: AGP aperture is 256M @ 0xd0000000
PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
i8042.c: Detected active multiplexing controller, rev 1.1.
serio: i8042 AUX0 port at 0x60,0x64 irq 12
serio: i8042 AUX1 port at 0x60,0x64 irq 12
serio: i8042 AUX2 port at 0x60,0x64 irq 12
serio: i8042 AUX3 port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 48 ports, IRQ sharing enabled
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
NET: Registered protocol family 24
SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256).
CSLIP: code copyright 1989 Regents of the University of California.
r8169 Gigabit Ethernet driver 2.2LK loaded
ACPI: PCI Interrupt 0000:00:0c.0[A] -> GSI 22 (level, low) -> IRQ 22
eth0: Identified chip type is 'RTL8169s/8110s'.
eth0: RTL8169 at 0xffffc20000022400, 00:0a:e4:a2:b0:49, IRQ 22
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 0000:00:11.1
ACPI: PCI Interrupt 0000:00:11.1[A]: no GSI - using IRQ 0
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt8235 (rev 00) IDE UDMA133 controller on pci0000:00:11.1
ide0: BM-DMA at 0x1c80-0x1c87, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0x1c88-0x1c8f, BIOS settings: hdc:DMA, hdd:pio
Probing IDE interface ide0...
hda: WDC WD800VE-00HDT0, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: TSSTcorpCD/DVDW TS-L532A, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
Probing IDE interface ide2...
Probing IDE interface ide3...
Probing IDE interface ide4...
Probing IDE interface ide5...
hda: max request size: 128KiB
hda: 156301488 sectors (80026 MB) w/8192KiB Cache, CHS=65535/16/63, UDMA(100)
hda: cache flushes supported
hda: hda1 hda2 hda3 hda4 < hda5 hda6 >
hdc: ATAPI 24X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
ohci1394: $Rev: 1250 $ Ben Collins <[email protected]>
ACPI: PCI Interrupt 0000:00:0b.2[C] -> GSI 19 (level, low) -> IRQ 19
ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[19] MMIO=[c0005800-c0005fff] Max Packet=[2048]
ACPI: PCI Interrupt 0000:00:0b.0[A] -> GSI 17 (level, low) -> IRQ 17
Yenta: CardBus bridge found at 0000:00:0b.0 [1025:006e]
Yenta: ISA IRQ mask 0x0cf8, PCI irq 17
Socket status: 30000811
PCI: Enabling device 0000:00:0b.1 (0000 -> 0002)
ACPI: PCI Interrupt 0000:00:0b.1[B] -> GSI 18 (level, low) -> IRQ 18
Yenta: CardBus bridge found at 0000:00:0b.1 [1025:006e]
Yenta: ISA IRQ mask 0x0cf8, PCI irq 18
Socket status: 30000810
usbmon: debugs is not available
mice: PS/2 mouse device common for all mice
time.c: Lost 1 timer tick(s)! rip release_console_sem+0x13d/0x1c0)
i2c /dev entries driver
device-mapper: 4.4.0-ioctl (2005-01-12) initialised: [email protected]
Bluetooth: HCI UART driver ver 2.1
Bluetooth: HCI H4 protocol initialized
Bluetooth: HCI BCSP protocol initialized
Advanced Linux Sound Architecture Driver Version 1.0.9rc2 (Thu Mar 24 10:33:39 2005 UTC).
ALSA device list:
No soundcards found.
NET: Registered protocol family 2
IP: routing cache hash table of 8192 buckets, 64Kbytes
TCP established hash table entries: 262144 (order: 9, 2097152 bytes)
TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 262144 bind 65536)
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
IrCOMM protocol (Dag Brattli)
Bluetooth: L2CAP ver 2.7
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO (Voice Link) ver 0.4
Bluetooth: SCO socket layer initialized
Bluetooth: RFCOMM ver 1.5
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: BNEP (Ethernet Emulation) ver 1.2
Bluetooth: BNEP filters: protocol multicast
Bluetooth: HIDP (Human Interface Emulation) ver 1.1
powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.00.09e)
powernow-k8: 0 : fid 0xa (1800 MHz), vid 0x2 (1500 mV)
powernow-k8: 1 : fid 0x8 (1600 MHz), vid 0x6 (1400 mV)
powernow-k8: 2 : fid 0x0 (800 MHz), vid 0x12 (1100 mV)
cpu_init done, current fid 0xa, vid 0x2
swsusp: Suspend partition has wrong signature?
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 164k freed
input: AT Translated Set 2 keyboard on isa0060/serio0
ieee1394: Host added: ID:BUS[0-00:1023] GUID[000ae4045210338d]
Synaptics Touchpad, model: 1
Firmware: 5.8
180 degree mounted touchpad
Sensor: 18
new absolute packet format
Touchpad has extended capability bits
-> 4 multi-buttons, i.e. besides standard buttons
-> multifinger detection
-> palm detection
input: SynPS/2 Synaptics TouchPad on isa0060/serio4
EXT3 FS on hda1, internal journal
cs: memory probe 0x0c0000-0x0fffff: excluding 0xc0000-0xd3fff 0xd8000-0xdffff 0xe4000-0xfffff
ttyS16: detected caps 00000700 should be 00000100
ttyS16 at I/O 0x100 (irq = 17) is a 16C950/954
ttyS17 at I/O 0x108 (irq = 17) is a 8250
cs: memory probe 0x0c0000-0x0fffff: excluding 0xc0000-0xd3fff 0xd8000-0xdffff 0xe4000-0xfffff
Probing IDE interface ide2...
hde: 16MB CTS, CFA DISK drive
ide2 at 0x110-0x117,0x11e on irq 18
hde: max request size: 128KiB
hde: 32000 sectors (16 MB) w/4KiB Cache, CHS=500/2/32
hde: cache flushes not supported
hde: hde1
ide-cs: hde: Vcc = 3.3, Vpp = 0.0
Unable to handle kernel NULL pointer dereference at 0000000000000020 RIP:
<ffffffff802dc3a5>{ide_drive_remove+21}
PGD 3f5c1067 PUD 3f63d067 PMD 0
Oops: 0000 [1]
CPU 0
Modules linked in:
Pid: 981, comm: cardctl Not tainted 2.6.12-rc3-gringo
RIP: 0010:[<ffffffff802dc3a5>] <ffffffff802dc3a5>{ide_drive_remove+21}
RSP: 0000:ffff81003f07da28 EFLAGS: 00010296
RAX: ffffffff805d3050 RBX: ffffffff805d31c0 RCX: ffffffff805d3198
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff805d3050
RBP: ffffffff805d3178 R08: 0000000000000117 R09: 0000000000000001
R10: 00000000ffffffff R11: ffffffff80184cd0 R12: ffffffff80510470
R13: 0000000000000001 R14: 0000000000000002 R15: ffffffff8050fd20
FS: 00002aaaaae0aae0(0000) GS:ffffffff805ec340(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000020 CR3: 000000003f647000 CR4: 00000000000006e0
Process cardctl (pid: 981, threadinfo ffff81003f07c000, task ffff81000237ced0)
Stack: 0000000000000001 ffffffff802b57c7 ffffffff805d3178 ffffffff8050fb20
ffff810002335000 ffffffff802b59f4 ffffffff805d3178 ffffffff805d3738
ffff810002335000 ffffffff802b4818
Call Trace:<ffffffff802b57c7>{device_release_driver+119} <ffffffff802b59f4>{bus_remove_device+180}
<ffffffff802b4818>{device_del+88} <ffffffff802b4869>{device_unregister+9}
<ffffffff802da8c2>{ide_unregister+546} <ffffffff80310d70>{send_event_callback+0}
<ffffffff802ed585>{ide_release+37} <ffffffff802ed80e>{ide_event+174}
<ffffffff8021cd28>{avc_alloc_node+56} <ffffffff80310d70>{send_event_callback+0}
<ffffffff802b535d>{__bus_for_each_dev+109} <ffffffff80310d70>{send_event_callback+0}
<ffffffff802b53e8>{bus_for_each_dev+72} <ffffffff80310e0d>{send_event+93}
<ffffffff803112c7>{ds_event+103} <ffffffff8030b6d5>{send_event+69}
<ffffffff8030b83d>{socket_shutdown+13} <ffffffff8030b6d5>{send_event+69}
<ffffffff8030bdc9>{socket_remove+9} <ffffffff8030d90d>{pcmcia_eject_card+93}
<ffffffff80311dde>{ds_ioctl+1278} <ffffffff8021e11a>{inode_has_perm+106}
<ffffffff80220b1a>{selinux_file_ioctl+762} <ffffffff801dc3ed>{__ext3_journal_stop+45}
<ffffffff8021d3af>{avc_has_perm+15} <ffffffff8021e071>{task_has_capability+97}
<ffffffff8017d6ee>{do_ioctl+78} <ffffffff8017d97d>{vfs_ioctl+637}
<ffffffff8017da0a>{sys_ioctl+106} <ffffffff8010d696>{system_call+126}


Code: ff 52 20 31 c0 48 83 c4 08 c3 90 41 54 48 8d 87 38 01 00 00
RIP <ffffffff802dc3a5>{ide_drive_remove+21} RSP <ffff81003f07da28>
CR2: 0000000000000020
<4>time.c: Lost 1 timer tick(s)! rip __down_read+0x75/0x7b)


Attachments:
oops.txt (14.94 kB)
config.gz (8.98 kB)
Download all attachments

2005-04-21 15:27:11

by Andreas Steinmetz

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3: Oops on IDE flash disk eject

The following patch fixes the Oops though I don't know if this is the
correct solution.

--- linux-2.6.12-rc3/drivers/ide/ide.c.ast
+++ linux-2.6.12-rc3/drivers/ide/ide.c
@@ -2082,7 +2082,8 @@
static int ide_drive_remove(struct device * dev)
{
ide_drive_t * drive = container_of(dev,ide_drive_t,gendev);
- DRIVER(drive)->cleanup(drive);
+ if(DRIVER(drive))
+ DRIVER(drive)->cleanup(drive);
return 0;
}


--
Andreas Steinmetz SPAMmers use [email protected]

2005-04-21 15:46:11

by Randy.Dunlap

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Thu, 21 Apr 2005 14:19:10 +0200 Ralf Hildebrandt wrote:

| > It's available both as a patch (against 2.6.11) and as a tar-ball, and
| Where IS the tarball? Not on http://www.kernel.org, that's for sure.

in http://www.kernel.org/pub/linux/kernel/v2.6/testing/

---
~Randy

2005-04-21 16:13:36

by Al Viro

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Thu, Apr 21, 2005 at 11:10:15AM +0200, Geert Uytterhoeven wrote:
> On Thu, 21 Apr 2005, Jan Dittmer wrote:
> > Linus Torvalds wrote:
> > > Geert Uytterhoeven:
> > > [PATCH] M68k: Update defconfigs for 2.6.11
> > > [PATCH] M68k: Update defconfigs for 2.6.12-rc2
> >
> > Why do I still get this error when trying to cross-compile for m68k?
>
> Because to build m68k kernels, you (still :-( have to use the Linux/m68k CVS
> repository, cfr. http://linux-m68k-cvs.ubb.ca/.
>
> BTW, my patch queue is at
> http://linux-m68k-cvs.ubb.ca/~geert/linux-m68k-2.6.x-merging/.
> The main offender is POSTPONED/156-thread_info.diff.

I think I have a sane splitup of that stuff. If you have time to review - yell

2005-04-21 16:23:06

by Petr Baudis

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Dear diary, on Thu, Apr 21, 2005 at 02:03:27PM CEST, I got a letter
where Pavel Machek <[email protected]> told me that...
> > You should put this into .git/remotes
> >
> > linus rsync://http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

(git addremote is preferred for that :-)

> > Then
> >
> > RSYNC_FLAGS=-zavP git pull linus

-v is passed to rsync by default. I'll gladly add other reasonable rsync
flags (I don't call printing each considered file reasonable; fsck or
wget-like progressbar would be ideal).

> Well, not sure.
>
> I did
>
> git track linus
> git cancel
>
> but Makefile still contains -rc2. (Is "git cancel" right way to check
> out the tree?)

No. git cancel does what it says - cancels your local changes to the
working tree. git track will only set that next time you pull from
linus, the changes will be automatically merged. (Note that this will
change with the big UI change.)

Either do

git track linus
git pull

or

git merge linus

to get Linus' changes if you didn't pull yet.

> and git diff -r linus: still contains some changes. [I did some
> experimental pull of scsi changes long time ago, is it that problem?]

If you don't have your HEAD on Linus' branch, it will do a tree merge
instead of fast-forward; that is, it will not just move your HEAD on
to match Linus' HEAD, but it will make a regular merge and then ask you
to do a merge commit.

--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor

2005-04-21 17:01:48

by Andreas Steinmetz

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3: various swsusp problems

Hi Pavel,
there's some problems with swsusp in 2.6.12-rc3 (x86_64):

1. Is it necessary to print the following message during regular boot?
swsusp: Suspend partition has wrong signature?
It is a bit annoying and I believe it will confuse some swsusp
users.

2. PCMCIA related hangs during swsusp.
swsusp hangs after freeing memory when either cardmgr is running
or pcmcia cards are *physically* inserted. It is insufficient
to do a 'cardctl eject' the cards must be removed, too, for
swsusp not to hang. I do suspect some problem with the
'pccardd' kernel threads.

3. Sometimes during the search for the suspend hang reason the system
went during suspend into a lightshow of:
eth0: Too much work at interrupt!
and some line that ends in:
release_console_sem+0x13d/0x1c0)
The start of the line is not readable as it just flickers by in
the eth0 message limbo. NIC is a built in RTL-8169 Gigabit Ethernet
(rev 10). Oh, no chance for a serial console capture as there's no
built in serial device in this laptop.
--
Andreas Steinmetz SPAMmers use [email protected]

2005-04-21 17:39:49

by Al Viro

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

thread_info, part 1:

new helper - task_thread_info(task). On platforms that have thread_info
allocated separately (i.e. in default case) it simply returns task->thread_info.
m68k wants (and for good reasons) to embed its thread_info into task_struct.
So it will (in later patch) have task_thread_info() of its own.

For now we just add a macro for generic case and convert existing users in
core kernel to its user. Obviously safe - all normal architectures get
the same preprocessor output they used to get.

diff -urN RC12-rc3-delta23/include/linux/sched.h RC12-rc3-task_thread_info/include/linux/sched.h
--- RC12-rc3-delta23/include/linux/sched.h Wed Apr 20 21:25:54 2005
+++ RC12-rc3-task_thread_info/include/linux/sched.h Wed Apr 20 22:51:13 2005
@@ -1102,32 +1102,34 @@
spin_unlock(&p->alloc_lock);
}

+#define task_thread_info(task) (task)->thread_info
+
/* set thread flags in other task's structures
* - see asm/thread_info.h for TIF_xxxx flags available
*/
static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag)
{
- set_ti_thread_flag(tsk->thread_info,flag);
+ set_ti_thread_flag(task_thread_info(tsk), flag);
}

static inline void clear_tsk_thread_flag(struct task_struct *tsk, int flag)
{
- clear_ti_thread_flag(tsk->thread_info,flag);
+ clear_ti_thread_flag(task_thread_info(tsk), flag);
}

static inline int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag)
{
- return test_and_set_ti_thread_flag(tsk->thread_info,flag);
+ return test_and_set_ti_thread_flag(task_thread_info(tsk), flag);
}

static inline int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag)
{
- return test_and_clear_ti_thread_flag(tsk->thread_info,flag);
+ return test_and_clear_ti_thread_flag(task_thread_info(tsk), flag);
}

static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag)
{
- return test_ti_thread_flag(tsk->thread_info,flag);
+ return test_ti_thread_flag(task_thread_info(tsk), flag);
}

static inline void set_tsk_need_resched(struct task_struct *tsk)
@@ -1198,12 +1200,12 @@

static inline unsigned int task_cpu(const struct task_struct *p)
{
- return p->thread_info->cpu;
+ return task_thread_info(p)->cpu;
}

static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
{
- p->thread_info->cpu = cpu;
+ task_thread_info(p)->cpu = cpu;
}

#else
diff -urN RC12-rc3-delta23/kernel/exit.c RC12-rc3-task_thread_info/kernel/exit.c
--- RC12-rc3-delta23/kernel/exit.c Wed Apr 20 21:25:54 2005
+++ RC12-rc3-task_thread_info/kernel/exit.c Wed Apr 20 22:51:13 2005
@@ -827,7 +827,7 @@
if (group_dead && tsk->signal->leader)
disassociate_ctty(1);

- module_put(tsk->thread_info->exec_domain->module);
+ module_put(task_thread_info(tsk)->exec_domain->module);
if (tsk->binfmt)
module_put(tsk->binfmt->module);

diff -urN RC12-rc3-delta23/kernel/fork.c RC12-rc3-task_thread_info/kernel/fork.c
--- RC12-rc3-delta23/kernel/fork.c Wed Apr 20 21:25:54 2005
+++ RC12-rc3-task_thread_info/kernel/fork.c Wed Apr 20 22:51:13 2005
@@ -893,7 +893,7 @@
if (nr_threads >= max_threads)
goto bad_fork_cleanup_count;

- if (!try_module_get(p->thread_info->exec_domain->module))
+ if (!try_module_get(task_thread_info(p)->exec_domain->module))
goto bad_fork_cleanup_count;

if (p->binfmt && !try_module_get(p->binfmt->module))
@@ -1138,7 +1138,7 @@
if (p->binfmt)
module_put(p->binfmt->module);
bad_fork_cleanup_put_domain:
- module_put(p->thread_info->exec_domain->module);
+ module_put(task_thread_info(p)->exec_domain->module);
bad_fork_cleanup_count:
put_group_info(p->group_info);
atomic_dec(&p->user->processes);
diff -urN RC12-rc3-delta23/kernel/sched.c RC12-rc3-task_thread_info/kernel/sched.c
--- RC12-rc3-delta23/kernel/sched.c Wed Apr 20 21:25:55 2005
+++ RC12-rc3-task_thread_info/kernel/sched.c Wed Apr 20 22:51:13 2005
@@ -1151,7 +1151,7 @@
* but it also can be p->switch_lock.) So we compensate with a count
* of 1. Also, we want to start with kernel preemption disabled.
*/
- p->thread_info->preempt_count = 1;
+ task_thread_info(p)->preempt_count = 1;
#endif
/*
* Share the timeslice between parent and child, thus the
@@ -4018,9 +4018,9 @@

/* Set the preempt count _outside_ the spinlocks! */
#if defined(CONFIG_PREEMPT) && !defined(CONFIG_PREEMPT_BKL)
- idle->thread_info->preempt_count = (idle->lock_depth >= 0);
+ task_thread_info(idle)->preempt_count = (idle->lock_depth >= 0);
#else
- idle->thread_info->preempt_count = 0;
+ task_thread_info(idle)->preempt_count = 0;
#endif
}

2005-04-21 17:47:05

by Al Viro

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

thread_info part 2:

encapsulates the rest of arch-dependent operations with thread_info access.
Two new helpers - setup_thread_info() and end_of_stack(). For normal
case the former consists of copying thread_info of parent to new thread_info
and the latter returns pointer immediately past the end of thread_info.

Again, normal platforms are obviously safe. Note that end_of_stack() is
need since unlike the default case, m68k has only a single pointer in
stack - not the entire thread_info. So DEBUG_STACK_USAGE needs to be
a bit different there.

diff -urN RC12-rc3-task_thread_info/include/linux/sched.h RC12-rc3-other_helpers/include/linux/sched.h
--- RC12-rc3-task_thread_info/include/linux/sched.h Wed Apr 20 22:51:13 2005
+++ RC12-rc3-other_helpers/include/linux/sched.h Wed Apr 20 22:51:15 2005
@@ -1104,6 +1104,16 @@

#define task_thread_info(task) (task)->thread_info

+static inline void setup_thread_info(struct task_struct *p, struct thread_info *ti)
+{
+ *ti = *p->thread_info;
+}
+
+static inline unsigned long *end_of_stack(struct task_struct *p)
+{
+ return (unsigned long *)(p->thread_info + 1);
+}
+
/* set thread flags in other task's structures
* - see asm/thread_info.h for TIF_xxxx flags available
*/
diff -urN RC12-rc3-task_thread_info/kernel/fork.c RC12-rc3-other_helpers/kernel/fork.c
--- RC12-rc3-task_thread_info/kernel/fork.c Wed Apr 20 22:51:13 2005
+++ RC12-rc3-other_helpers/kernel/fork.c Wed Apr 20 22:51:15 2005
@@ -169,8 +169,8 @@
return NULL;
}

- *ti = *orig->thread_info;
*tsk = *orig;
+ setup_thread_info(tsk, ti);
tsk->thread_info = ti;
ti->task = tsk;

diff -urN RC12-rc3-task_thread_info/kernel/sched.c RC12-rc3-other_helpers/kernel/sched.c
--- RC12-rc3-task_thread_info/kernel/sched.c Wed Apr 20 22:51:13 2005
+++ RC12-rc3-other_helpers/kernel/sched.c Wed Apr 20 22:51:15 2005
@@ -3945,10 +3945,10 @@
#endif
#ifdef CONFIG_DEBUG_STACK_USAGE
{
- unsigned long * n = (unsigned long *) (p->thread_info+1);
+ unsigned long * n = end_of_stack(p);
while (!*n)
n++;
- free = (unsigned long) n - (unsigned long)(p->thread_info+1);
+ free = (unsigned long) n - (unsigned long) end_of_stack(p);
}
#endif
printk("%5lu %5d %6d ", free, p->pid, p->parent->pid);

2005-04-21 17:58:08

by Al Viro

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

thread_info part 3: heads.

a) in smp_lock.h #include of sched.h and spinlock.h moved under
#ifdef CONFIG_LOCK_KERNEL.
b) interrupt.h now explicitly pulls sched.h (not via smp_lock.h from
hardirq.h as it used to)
c) in two more places we need changes to compensate for (a) - one place in
arch/sparc needs string.h now and hardirq.h needs forward declaration of
task_struct.

d) thread_info-related helpers in sched.h and thread_info.h put under
ifndef __HAVE_THREAD_FUNCTIONS. Obviously safe.

That ends changes in generic parts of tree. And now we can get m68k in
there - that will be localized to asm-m68k and arch/m68k.

As far as I can see that's the minimally intrusive header changes needed
to avoid problems - better than variant with splitting sched.h as in m68k CVS.

diff -urN RC12-rc3-other_helpers/arch/sparc/lib/bitext.c RC12-rc3-includes/arch/sparc/lib/bitext.c
--- RC12-rc3-other_helpers/arch/sparc/lib/bitext.c Fri Mar 11 15:54:46 2005
+++ RC12-rc3-includes/arch/sparc/lib/bitext.c Wed Apr 20 22:51:17 2005
@@ -10,6 +10,7 @@
*/

#include <linux/smp_lock.h>
+#include <linux/string.h>
#include <linux/bitops.h>

#include <asm/bitext.h>
diff -urN RC12-rc3-other_helpers/include/linux/hardirq.h RC12-rc3-includes/include/linux/hardirq.h
--- RC12-rc3-other_helpers/include/linux/hardirq.h Fri Mar 11 15:54:57 2005
+++ RC12-rc3-includes/include/linux/hardirq.h Wed Apr 20 22:51:17 2005
@@ -85,6 +85,8 @@
#define nmi_enter() irq_enter()
#define nmi_exit() sub_preempt_count(HARDIRQ_OFFSET)

+struct task_struct;
+
#ifndef CONFIG_VIRT_CPU_ACCOUNTING
static inline void account_user_vtime(struct task_struct *tsk)
{
diff -urN RC12-rc3-other_helpers/include/linux/interrupt.h RC12-rc3-includes/include/linux/interrupt.h
--- RC12-rc3-other_helpers/include/linux/interrupt.h Fri Mar 11 15:54:57 2005
+++ RC12-rc3-includes/include/linux/interrupt.h Wed Apr 20 22:51:17 2005
@@ -12,6 +12,7 @@
#include <asm/atomic.h>
#include <asm/ptrace.h>
#include <asm/system.h>
+#include <linux/sched.h>

/*
* For 2.4.x compatibility, 2.4.x can use
diff -urN RC12-rc3-other_helpers/include/linux/sched.h RC12-rc3-includes/include/linux/sched.h
--- RC12-rc3-other_helpers/include/linux/sched.h Wed Apr 20 22:51:15 2005
+++ RC12-rc3-includes/include/linux/sched.h Wed Apr 20 22:51:17 2005
@@ -1102,6 +1102,8 @@
spin_unlock(&p->alloc_lock);
}

+#ifndef __HAVE_THREAD_FUNCTIONS
+
#define task_thread_info(task) (task)->thread_info

static inline void setup_thread_info(struct task_struct *p, struct thread_info *ti)
@@ -1141,6 +1143,8 @@
{
return test_ti_thread_flag(task_thread_info(tsk), flag);
}
+
+#endif

static inline void set_tsk_need_resched(struct task_struct *tsk)
{
diff -urN RC12-rc3-other_helpers/include/linux/smp_lock.h RC12-rc3-includes/include/linux/smp_lock.h
--- RC12-rc3-other_helpers/include/linux/smp_lock.h Fri Mar 11 15:54:57 2005
+++ RC12-rc3-includes/include/linux/smp_lock.h Wed Apr 20 22:51:17 2005
@@ -2,10 +2,9 @@
#define __LINUX_SMPLOCK_H

#include <linux/config.h>
+#ifdef CONFIG_LOCK_KERNEL
#include <linux/sched.h>
#include <linux/spinlock.h>
-
-#ifdef CONFIG_LOCK_KERNEL

#define kernel_locked() (current->lock_depth >= 0)

diff -urN RC12-rc3-other_helpers/include/linux/thread_info.h RC12-rc3-includes/include/linux/thread_info.h
--- RC12-rc3-other_helpers/include/linux/thread_info.h Wed Feb 4 11:48:57 2004
+++ RC12-rc3-includes/include/linux/thread_info.h Wed Apr 20 22:51:17 2005
@@ -22,6 +22,7 @@

#ifdef __KERNEL__

+#ifndef __HAVE_THREAD_FUNCTIONS
/*
* flag set/clear/test wrappers
* - pass TIF_xxxx constants to these functions
@@ -87,6 +88,7 @@
clear_thread_flag(TIF_NEED_RESCHED);
}

+#endif
#endif

#endif /* _LINUX_THREAD_INFO_H */

2005-04-21 18:05:02

by Al Viro

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

m68k thread_info - part 4

The rest:
a) added embedded thread_info [m68k processor.h]
b) added missing symbols in asm-offsets.c
c) task_thread_info() and freinds in asm-m68k/thread_info.h
d) made m68k thread_info.h included by m68k processor.h, not the
other way round.

At that point thread_info mess is resolved - m68k builds and the rest of
the stuff to merge consists of normal driver patches.

IMO that's the least intrusive way to merge that sucker...

Comments?

diff -urN RC12-rc3-includes/arch/m68k/kernel/asm-offsets.c RC12-rc3-m68k/arch/m68k/kernel/asm-offsets.c
--- RC12-rc3-includes/arch/m68k/kernel/asm-offsets.c Thu Feb 26 02:23:09 2004
+++ RC12-rc3-m68k/arch/m68k/kernel/asm-offsets.c Wed Apr 20 22:51:18 2005
@@ -31,6 +31,7 @@
DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, thread.work.sigpending));
DEFINE(TASK_NOTIFY_RESUME, offsetof(struct task_struct, thread.work.notify_resume));
DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
+ DEFINE(TASK_INFO, offsetof(struct task_struct, thread.info));
DEFINE(TASK_MM, offsetof(struct task_struct, mm));
DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));

@@ -44,6 +45,10 @@
DEFINE(THREAD_FPREG, offsetof(struct thread_struct, fp));
DEFINE(THREAD_FPCNTL, offsetof(struct thread_struct, fpcntl));
DEFINE(THREAD_FPSTATE, offsetof(struct thread_struct, fpstate));
+
+ /* offsets into the thread_info struct */
+ DEFINE(TINFO_PREEMPT, offsetof(struct thread_info, preempt_count));
+ DEFINE(HARDIRQ_SHIFT, HARDIRQ_SHIFT);

/* offsets into the pt_regs */
DEFINE(PT_D0, offsetof(struct pt_regs, d0));
diff -urN RC12-rc3-includes/include/asm-m68k/processor.h RC12-rc3-m68k/include/asm-m68k/processor.h
--- RC12-rc3-includes/include/asm-m68k/processor.h Wed Apr 20 21:25:51 2005
+++ RC12-rc3-m68k/include/asm-m68k/processor.h Wed Apr 20 22:51:19 2005
@@ -14,6 +14,7 @@
#define current_text_addr() ({ __label__ _l; _l: &&_l;})

#include <linux/config.h>
+#include <linux/thread_info.h>
#include <asm/segment.h>
#include <asm/fpu.h>
#include <asm/ptrace.h>
@@ -79,6 +80,7 @@
unsigned long fpcntl[3]; /* fp control regs */
unsigned char fpstate[FPSTATESIZE]; /* floating point state */
struct task_work work;
+ struct thread_info info;
};

#define INIT_THREAD { \
diff -urN RC12-rc3-includes/include/asm-m68k/thread_info.h RC12-rc3-m68k/include/asm-m68k/thread_info.h
--- RC12-rc3-includes/include/asm-m68k/thread_info.h Wed Apr 20 21:25:51 2005
+++ RC12-rc3-m68k/include/asm-m68k/thread_info.h Wed Apr 20 22:51:19 2005
@@ -2,7 +2,6 @@
#define _ASM_M68K_THREAD_INFO_H

#include <asm/types.h>
-#include <asm/processor.h>
#include <asm/page.h>

struct thread_info {
@@ -36,10 +35,11 @@
#endif /* PAGE_SHIFT == 13 */

//#define init_thread_info (init_task.thread.info)
-#define init_stack (init_thread_union.stack)
-
-#define current_thread_info() (current->thread_info)
+#define init_thread_info (init_thread_union.thread_info)
+#define init_stack (init_thread_union.stack)

+#define task_thread_info(tsk) (&(tsk)->thread.info)
+#define current_thread_info() task_thread_info(current)

#define __HAVE_THREAD_FUNCTIONS

@@ -51,6 +51,10 @@
#define TIF_MEMDIE 5

extern int thread_flag_fixme(void);
+
+#define setup_thread_info(p, ti) do (ti)->task = p; while(0)
+
+#define end_of_stack(p) ((unsigned long *)(p)->thread_info + 1)

/*
* flag set/clear/test wrappers

2005-04-21 18:08:13

by Al Viro

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Thu, Apr 21, 2005 at 06:57:23PM +0100, Al Viro wrote:
> thread_info part 3: heads.

headers, even...

2005-04-21 18:58:32

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3: various swsusp problems

Hi!

> there's some problems with swsusp in 2.6.12-rc3 (x86_64):

Are they new or were they in -rc2, too?

> 1. Is it necessary to print the following message during regular boot?
> swsusp: Suspend partition has wrong signature?
> It is a bit annoying and I believe it will confuse some swsusp
> users.

Hmm, feel free to provide a patch. (I need something to try git on :-).

> 2. PCMCIA related hangs during swsusp.
> swsusp hangs after freeing memory when either cardmgr is running
> or pcmcia cards are *physically* inserted. It is insufficient
> to do a 'cardctl eject' the cards must be removed, too, for
> swsusp not to hang. I do suspect some problem with the
> 'pccardd' kernel threads.

Did it work with any older kernel? Which driver is it? yenta?

> 3. Sometimes during the search for the suspend hang reason the system
> went during suspend into a lightshow of:
> eth0: Too much work at interrupt!
> and some line that ends in:
> release_console_sem+0x13d/0x1c0)
> The start of the line is not readable as it just flickers by in
> the eth0 message limbo. NIC is a built in RTL-8169 Gigabit Ethernet
> (rev 10). Oh, no chance for a serial console capture as there's no
> built in serial device in this laptop.

How repeatable is that? Will NIC work okay if you rmmod/insmod its driver?
Pavel
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms

2005-04-21 19:01:33

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi!

> > > You should put this into .git/remotes
> > >
> > > linus rsync://http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
>
> (git addremote is preferred for that :-)

Oops :-).

> > Well, not sure.
> >
> > I did
> >
> > git track linus
> > git cancel
> >
> > but Makefile still contains -rc2. (Is "git cancel" right way to check
> > out the tree?)
>
> No. git cancel does what it says - cancels your local changes to the
> working tree. git track will only set that next time you pull from
> linus, the changes will be automatically merged. (Note that this will
> change with the big UI change.)

Is there way to say "forget those changes in my repository, I want
just plain vanilla" without rm -rf?
I see quite a lot of problems with fsck-tree. Is that normal?
(I ran out of disk space few times during different operations...)


--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms

2005-04-21 19:10:20

by Petr Baudis

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Dear diary, on Thu, Apr 21, 2005 at 09:00:09PM CEST, I got a letter
where Pavel Machek <[email protected]> told me that...
> Hi!

Hi,

> > > Well, not sure.
> > >
> > > I did
> > >
> > > git track linus
> > > git cancel
> > >
> > > but Makefile still contains -rc2. (Is "git cancel" right way to check
> > > out the tree?)
> >
> > No. git cancel does what it says - cancels your local changes to the
> > working tree. git track will only set that next time you pull from
> > linus, the changes will be automatically merged. (Note that this will
> > change with the big UI change.)
>
> Is there way to say "forget those changes in my repository, I want
> just plain vanilla" without rm -rf?

git cancel will give you "plain last commit". If you need plain vanilla,
the "hard way" now is to just do

commit-id >.git/HEAD

but your current HEAD will be lost forever. Or do

git fork vanilla ~/vanilla linus

and you will have the vanilla tree tracking linus in ~/vanilla.

I'm not yet sure if we should have some Cogito interface for doing this
and what its semantics should be.

> I see quite a lot of problems with fsck-tree. Is that normal?
> (I ran out of disk space few times during different operations...)

Actually, in case your tree is older than about two days, I hope you did
the convert-cache magic or fetched a fresh tree?

--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor

2005-04-21 19:10:38

by Benoit Boissinot

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On 4/21/05, Linus Torvalds <[email protected]> wrote:
>
> ----
> Changes since 2.6.12-rc2:
>
> Benjamin Herrenschmidt:
...
> [PATCH] ppc32: Fix cpufreq problems

this depends on two patches in -mm:

add-suspend-method-to-cpufreq-core.patch
Add suspend method to cpufreq core

add-suspend-method-to-cpufreq-core-warning-fix.patch
add-suspend-method-to-cpufreq-core-warning-fix

without those patches defconfig is broken on ppc32

regards,

Benoit

2005-04-21 20:02:36

by Andreas Steinmetz

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3: various swsusp problems

Pavel Machek wrote:
> Hi!
>
>
>>there's some problems with swsusp in 2.6.12-rc3 (x86_64):
>
>
> Are they new or were they in -rc2, too?
>

Fixed the rc2/rc3 IDE Oops myself today that prevented me to test rc2
earlier. It seems the IDE maintainer is currently not very responsive
and I didn't have sufficient spare time to look into this before today :-(

Yes, all problems are already in rc2.

>
>>1. Is it necessary to print the following message during regular boot?
>> swsusp: Suspend partition has wrong signature?
>> It is a bit annoying and I believe it will confuse some swsusp
>> users.
>
>
> Hmm, feel free to provide a patch. (I need something to try git on :-).

I'll have a look over the weekend.

>
>
>>2. PCMCIA related hangs during swsusp.
>> swsusp hangs after freeing memory when either cardmgr is running
>> or pcmcia cards are *physically* inserted. It is insufficient
>> to do a 'cardctl eject' the cards must be removed, too, for
>> swsusp not to hang. I do suspect some problem with the
>> 'pccardd' kernel threads.
>
>
> Did it work with any older kernel? Which driver is it? yenta?

2.6.11.2 works ok and, yes, its yenta. Some excerpt from lspci:

00:0b.0 CardBus bridge: Texas Instruments PCI7420 CardBus Controller
00:0b.1 CardBus bridge: Texas Instruments PCI7420 CardBus Controller

>
>
>>3. Sometimes during the search for the suspend hang reason the system
>> went during suspend into a lightshow of:
>> eth0: Too much work at interrupt!
>> and some line that ends in:
>> release_console_sem+0x13d/0x1c0)
>> The start of the line is not readable as it just flickers by in
>> the eth0 message limbo. NIC is a built in RTL-8169 Gigabit Ethernet
>> (rev 10). Oh, no chance for a serial console capture as there's no
>> built in serial device in this laptop.
>
>
> How repeatable is that? Will NIC work okay if you rmmod/insmod its driver?
> Pavel

Happens with a probability of about 10% to 20%. I did comment out the
'Too much work...' printk in r8169.c which results in the following
effect: no more message from the network driver (expected), no other
printk related to release_console_sem or anything else unusal, but write
to disk in the case the problem seems to happen is suddenly quite slow
and suspend eventually succeeds.
As the nic driver is built into the kernel insmod/rmmod currently won't
do:-) Nevertheless there doesn't seem to be any strange behaviour after
resume though I didn't really try to use the nic then.
There is, however, definitely no such problem with the nic in 2.6.11.2.
--
Andreas Steinmetz SPAMmers use [email protected]

2005-04-21 20:55:34

by Andreas Steinmetz

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3: various swsusp problems

Pavel Machek wrote:
> Hi!
> Are they new or were they in -rc2, too?

Some further backtracking:

The nic problem is already present in 2.6.12-rc1.
The pcmcia hang problem is not present in 2.6.12-rc1.
--
Andreas Steinmetz SPAMmers use [email protected]

2005-04-21 21:38:37

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi!

It seems that someone should write "Kernel hacker's guide to
git"... Documentation/git.txt seems like good place. I guess I'll do
it.

> > just plain vanilla" without rm -rf?
>
> git cancel will give you "plain last commit". If you need plain vanilla,
> the "hard way" now is to just do
>
> commit-id >.git/HEAD
>
> but your current HEAD will be lost forever. Or do
>
> git fork vanilla ~/vanilla linus
>
> and you will have the vanilla tree tracking linus in ~/vanilla.

Ok, thanks.

> I'm not yet sure if we should have some Cogito interface for doing this
> and what its semantics should be.

What is Cogito, BTW?

> > I see quite a lot of problems with fsck-tree. Is that normal?
> > (I ran out of disk space few times during different operations...)
>
> Actually, in case your tree is older than about two days, I hope you did
> the convert-cache magic or fetched a fresh tree?

No, I did not anything like that. I guess it is rm -rf time, then...

Pavel
--
Boycott Kodak -- for their patent abuse against Java.

2005-04-21 21:41:36

by Petr Baudis

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Dear diary, on Thu, Apr 21, 2005 at 11:38:11PM CEST, I got a letter
where Pavel Machek <[email protected]> told me that...
> Hi!
>
> It seems that someone should write "Kernel hacker's guide to
> git"... Documentation/git.txt seems like good place. I guess I'll do
> it.

I've also started writing some tutorial-like guide to Cogito on my
notebook, but I have time for that only during lectures. :^)

> > I'm not yet sure if we should have some Cogito interface for doing this
> > and what its semantics should be.
>
> What is Cogito, BTW?

New name for git-pasky. Everyone will surely rejoice as the usage will
change significantly. But better let's clean it up now.

(For more details, check git@ archives for git-pasky-0.6 announcement.)

> > > I see quite a lot of problems with fsck-tree. Is that normal?
> > > (I ran out of disk space few times during different operations...)
> >
> > Actually, in case your tree is older than about two days, I hope you did
> > the convert-cache magic or fetched a fresh tree?
>
> No, I did not anything like that. I guess it is rm -rf time, then...

That's the root of all your problems then.

--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor

2005-04-21 23:22:24

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi!

> > > You should put this into .git/remotes
> > >
> > > linus rsync://http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
>
> (git addremote is preferred for that :-)

Nice, so I now have my own -git tree, with two changes in it...

Is there way to say "git diff -r origin:" but dump it patch-by-patch
with some usable headers?

[Looking at git export]
Pavel

Index: Documentation/git.txt
===================================================================
--- /dev/null (tree:9120479b4c721855b378db8907e1259f2e583f2b)
+++ 007d34e2ed3d5fc54cbb4c16880145ade93affef/Documentation/git.txt (mode:100644 sha1:939d378ddaac5390c879520c139e66d9649ec4c4)
@@ -0,0 +1,19 @@
+ Kernel hacker's guide to git
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ 2005 Pavel Machek <[email protected]>
+
+You can get git at http://pasky.or.cz/~pasky/dev/git/ . Compile it,
+and place it somewhere in $PATH. Then you can get kernel by running
+
+git init rsync://http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+
+... Run git log to get idea of what happened in tree you are
+tracking. Do git pull linus to pickup latest changes from Linus. You
+can do git diff to see what changes you done in your local tree. git
+cancel will kill any such changes.
+
+You can commit changes by doing git commit... If you want to get diff
+of your changes against mainline, do
+
+git diff -r origin:
+

--
Boycott Kodak -- for their patent abuse against Java.

2005-04-21 23:31:19

by Linus Torvalds

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3



On Fri, 22 Apr 2005, Pavel Machek wrote:
>
> Is there way to say "git diff -r origin:" but dump it patch-by-patch
> with some usable headers?

In my git version there is a command called "git-export" for exactly this.
I don't know if Pasky included that in his trees, but if not, you can just
get my git tree (which should be compatible with Pasky's scripts, but mine
just has the "core" stuff).

Using "git-export" you can export your whole git tree if you want to, but
more commonly you'd say

git-export $(cat .git/HEAD) $(cat .git/BASE)

where you'd have saved the previous head that you exported in the BASE
thing (or, if you pull my tree, and want to export your changes back to
me, you'd initialize BASE to the original HEAD in my tree).

The output format of "git-export" is not the prettiest in the world, but
I've never actually _used_ that command, I just wrote it as a
demonstration thing.

Linus

2005-04-22 00:26:17

by Petr Baudis

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Dear diary, on Fri, Apr 22, 2005 at 01:22:01AM CEST, I got a letter
where Pavel Machek <[email protected]> told me that...
> Hi!

Hi,

> > > > You should put this into .git/remotes
> > > >
> > > > linus rsync://http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> >
> > (git addremote is preferred for that :-)
>
> Nice, so I now have my own -git tree, with two changes in it...
>
> Is there way to say "git diff -r origin:" but dump it patch-by-patch
> with some usable headers?
>
> [Looking at git export]

Either Linus' demo git-export (NOT the same as git export!), or git
patch. In the latest tree, it was extended to accept a range of two
commits to process too.

Note that the range semantics is rather peculiar at the least. ;-)

--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor

2005-04-22 00:51:42

by Greg KH

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Thu, Apr 21, 2005 at 03:33:42PM +0200, Andreas Steinmetz wrote:
> Compile error on x86_64:
>
> CC [M] drivers/usb/image/microtek.o
> drivers/usb/image/microtek.c: In function `mts_scsi_abort':
> drivers/usb/image/microtek.c:338: error: `FAILURE' undeclared (first use
> in this function)

Patch to fix this was posted on lkml and is in my queue to send to Linus
in a bit.

thanks,

greg k-h

2005-04-22 07:56:54

by Borislav Petkov

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Thursday 21 April 2005 02:59, you wrote:
<snip>
Hello,

[build.log]
...
drivers/usb/storage/debug.c: In function `usb_stor_show_sense':
drivers/usb/storage/debug.c:166: warning: implicit declaration of function
`scsi_sense_key_string'
drivers/usb/storage/debug.c:166: warning: assignment makes pointer from
integer without a cast
drivers/usb/storage/debug.c:167: warning: implicit declaration of function
`scsi_extd_sense_format'
drivers/usb/storage/debug.c:167: warning: assignment makes pointer from
integer without a cast
...

Hmm, actually I've already sent the trivial patch below for this to Andrew a
few weeks ago and he included it in mm but somehow it is not there..

--- drivers/usb/storage/debug.c.orig 2005-04-05 14:24:21.000000000 +0200
+++ drivers/usb/storage/debug.c 2005-04-05 14:24:35.000000000 +0200
@@ -47,7 +47,7 @@
#include <linux/cdrom.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
-
+#include <scsi/scsi_dbg.h>
#include "debug.h"
#include "scsi.h"

Regards,
Boris.

2005-04-22 07:56:20

by H. Peter Anvin

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Followup to: <[email protected]>
By author: Pavel Machek <[email protected]>
In newsgroup: linux.dev.kernel
>
> You should put this into .git/remotes
>
> linus rsync://http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
>

Make that
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

Right now they're the same thing, but it's not guaranteed to stay that way.

-hpa

2005-04-22 16:05:12

by Stefan Seyfried

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3: various swsusp problems

--- linux/kernel/power/swsusp.c~ 2005-04-22 17:07:56.000000000 +0200
+++ linux/kernel/power/swsusp.c 2005-04-22 17:09:22.000000000 +0200
@@ -1239,7 +1239,7 @@ static int check_sig(void)
*/
error = bio_write_page(0, &swsusp_header);
} else {
- printk(KERN_ERR "swsusp: Suspend partition has wrong signature?\n");
+ printk(KERN_ERR "swsusp: Suspend partition is no suspend image.\n");
return -EINVAL;
}
if (!error)


Attachments:
delme (432.00 B)

2005-04-22 22:18:25

by Roman Zippel

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Al Viro wrote:

> thread_info, part 1:

Patches look fine. Some of the helper stuff could be moved to
asm-generic, but that can still be done later. The headers really need
some serious cleanup in this area, the dependencies are damned fragile.
I8 still have a completely untested patch to convert the thread flags to
bitmasks, but I hadn't much time for m68k hacking lately...

bye, Roman

2005-04-22 23:19:02

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi!

> > Nice, so I now have my own -git tree, with two changes in it...
> >
> > Is there way to say "git diff -r origin:" but dump it patch-by-patch
> > with some usable headers?
> >
> > [Looking at git export]
>
> Either Linus' demo git-export (NOT the same as git export!), or git
> patch. In the latest tree, it was extended to accept a range of two
> commits to process too.
>
> Note that the range semantics is rather peculiar at the least. ;-)

Nice, it seems to work.

Unfortunately first merge will make it practically unusable :-(.

git diff -r origin:

will only list differences between my tree and Linus'.

git patch origin:

will list my patches, plus any merges I done... Is there any
reasonable way to get only "my" changes? When I do not have to resolve
anything during merge, it should be usable... but that is starting to
look ugly.


Pavel


--
Boycott Kodak -- for their patent abuse against Java.

2005-04-23 00:19:29

by Linus Torvalds

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3



On Sat, 23 Apr 2005, Pavel Machek wrote:
>
> Unfortunately first merge will make it practically unusable :-(.

No, quite the reverse. If I merge from you, and you use my commit ID as
the "base" point, it will work again.

But yes, if you actually send the result as _patches_ to me, then the
commit objects I create will be totally separate from the commit objects
you had in your tree, and "git-export" will continue to export your old
stale entries since they won't show up as already being in my tree.

The point being, that there is a big difference between a proper merge
(with history etc merged) and just sending me the patches in your tree.

Linus

2005-04-23 02:57:06

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3: various swsusp problems

On 4/22/05, Stefan Seyfried <[email protected]> wrote:
> --- linux/kernel/power/swsusp.c~ 2005-04-22 17:07:56.000000000 +0200
> +++ linux/kernel/power/swsusp.c 2005-04-22 17:09:22.000000000 +0200
> @@ -1239,7 +1239,7 @@ static int check_sig(void)
> */
> error = bio_write_page(0, &swsusp_header);
> } else {
> - printk(KERN_ERR "swsusp: Suspend partition has wrong signature?\n");
> + printk(KERN_ERR "swsusp: Suspend partition is no suspend image.\n");

Hrm, I don't think it is a good message... What about "Suspend
partition has no suspend image" or, better yet, "Suspend partition
does not contain valid suspend image"?

--
Dmitry

2005-04-23 08:18:51

by Stefan Seyfried

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3: various swsusp problems

Dmitry Torokhov wrote:
> On 4/22/05, Stefan Seyfried <[email protected]> wrote:

>> - printk(KERN_ERR "swsusp: Suspend partition has wrong signature?\n");
>> + printk(KERN_ERR "swsusp: Suspend partition is no suspend image.\n");
>
> Hrm, I don't think it is a good message... What about "Suspend
> partition has no suspend image" or, better yet, "Suspend partition

fine with me,

> does not contain valid suspend image"?

the shorter, the better IMO but i do not really care to be honest.
It should just express that this usually is no error, so "wrong
signature" and maybe "not valid image" may scare the users. "has no
suspend image" sounds 'mostly harmless', so it may be best.

All IMO, and i am no native english speaker, so some proofreading is
always a good idea :-)
--
Stefan Seyfried, QA / R&D Team Mobile Devices, SUSE LINUX N?rnberg.

"Any ideas, John?"
"Well, surrounding them's out."

2005-04-23 09:15:16

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3: various swsusp problems

Hi!

> On 4/22/05, Stefan Seyfried <[email protected]> wrote:
> > --- linux/kernel/power/swsusp.c~ 2005-04-22 17:07:56.000000000 +0200
> > +++ linux/kernel/power/swsusp.c 2005-04-22 17:09:22.000000000 +0200
> > @@ -1239,7 +1239,7 @@ static int check_sig(void)
> > */
> > error = bio_write_page(0, &swsusp_header);
> > } else {
> > - printk(KERN_ERR "swsusp: Suspend partition has wrong signature?\n");
> > + printk(KERN_ERR "swsusp: Suspend partition is no suspend image.\n");
>
> Hrm, I don't think it is a good message... What about "Suspend
> partition has no suspend image" or, better yet, "Suspend partition
> does not contain valid suspend image"?

I settled with

printk(KERN_INFO "swsusp: Suspend partition does not contain suspend image.\n");


Pavel
--
Boycott Kodak -- for their patent abuse against Java.

2005-04-23 11:22:24

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi!

> On Sat, 23 Apr 2005, Pavel Machek wrote:
> >
> > Unfortunately first merge will make it practically unusable :-(.
>
> No, quite the reverse. If I merge from you, and you use my commit ID as
> the "base" point, it will work again.

I meant "every time I merge from you, new commit with message 'merge from linus' and
big ugly diff is attached.

> But yes, if you actually send the result as _patches_ to me, then the
> commit objects I create will be totally separate from the commit objects
> you had in your tree, and "git-export" will continue to export your old
> stale entries since they won't show up as already being in my tree.
>
> The point being, that there is a big difference between a proper merge
> (with history etc merged) and just sending me the patches in your tree.

Could we add some kind off "This-changeset-obsoletes: <sha1>" header?
That would allow me to send patches by hand and still make the SCM do the
right thing during merge.

Alternatively I should just get public rsync-able space somewhere...
Would kernel.org be willing to add people/pavel?

Pavel
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms

2005-04-23 12:20:51

by Ed Tomlinson

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Friday 22 April 2005 20:21, Linus Torvalds wrote:
>
> On Sat, 23 Apr 2005, Pavel Machek wrote:
> >
> > Unfortunately first merge will make it practically unusable :-(.
>
> No, quite the reverse. If I merge from you, and you use my commit ID as
> the "base" point, it will work again.
>
> But yes, if you actually send the result as _patches_ to me, then the
> commit objects I create will be totally separate from the commit objects
> you had in your tree, and "git-export" will continue to export your old
> stale entries since they won't show up as already being in my tree.
>
> The point being, that there is a big difference between a proper merge
> (with history etc merged) and just sending me the patches in your tree.

Using git patch, the output has the commit id. Could this be used during
a merge of patches to record info that the source git could use to recognize
the changes as ones it originated (after a pull from the remote git which has
the merged patches)?

Ed Tomlinson

2005-04-23 14:14:11

by Linus Torvalds

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3



On Sat, 23 Apr 2005, Pavel Machek wrote:
>
> Could we add some kind off "This-changeset-obsoletes: <sha1>" header?
> That would allow me to send patches by hand and still make the SCM do the
> right thing during merge.

That doesn't really scale, plus I don't want to rely on that kind of hack
since it's simply not reliable (the patch may have gotten edited on the
way, so maybe the stuff I apply is 90% from your patch, but 10%
different).

Also, it doesn't actually handle the generic case, which is that the other
end used something else than git to maintain his patches (which in the end
has the exact same issues).

So I think you'd just need to have some separate logic that says "if this
patch looks like it has been applied to 'base', ignore it". The most
trivial such logic is to just see if the patch even applies cleanly any
more (which is a test you'd have to do _anyway_). That, together with a
list of "known applied" patches, and you should be able to automate it
pretty well.

The fact is, you pretty much end up using something like quilt. That works
really well, as Andrew has proven.

> Alternatively I should just get public rsync-able space somewhere...
> Would kernel.org be willing to add people/pavel?

Now, that's actually something people are working on ("git.kernel.org"),
so I don't think that would be a problem. People _are_ trying to set up
things like a bkbits.net at least for the kernel. I know OSDL and OSL
(http://osuosl.org/) are interested, and I think the current kernel.org
works too.

A word of warning: in many ways it's easier to work with patches. In
particular, if you want to have me merge from your tree, I require a
certain amount of cleanliness in the trees I'm pulling from. All of the
people who used to use BK to sync are already used to that, but for people
who didn't historically use BK this is going to be a learning experience.

The reason patches are easier is that you can start out from a messy tree,
and then whittle down the patch to just the part you want to send me, so
it doesn't actually matter how messy your original tree is, you can always
make the end result look nice.

One of the things a distributed SCM brings with it is that you can't edit
history after the fact, which means that if you use git and you've got a
messy tree, you can't just "clean it up". You either have to keep your
tree clean all the time, or you have to generate a new clean tree (usually
by exporting patches from your messy one) and throw the messy ones away
periodically.

("throw-away" git trees are actually very very useful).

git is actually even _more_ strict than BK in this respect, since the git
model means that everything is based on SHA1 hashes, and you can't edit
_anything_. With BK, some people were used to edit the checkin comments
after the fact, and you could do that kind of limited cleanup before you
asked me to merge. With git, that's all hashed cryptographically and is
part of the "name" of the result, so if you want to change the checkin
comments, you literally have to throw the old one (and every later checkin
that has it as its parents) away, and re-generate the whole chain.

This is very much by design. This is how git (and I) can trust the end
result. It is how git can know that if we have a common parent, all the
history before that common parent is guaranteed to be the same for both
you and me, and git can thus ignore it. But as mentioned, it does mean
that git history is set in stone, and the only way to "fix" things is
literally to re-create it all.

Linus

2005-04-23 16:27:41

by Pierre Ossman

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Linus Torvalds wrote:
>
> A word of warning: in many ways it's easier to work with patches. In
> particular, if you want to have me merge from your tree, I require a
> certain amount of cleanliness in the trees I'm pulling from. All of the
> people who used to use BK to sync are already used to that, but for people
> who didn't historically use BK this is going to be a learning experience.
>

Is there a summary available of the major issues here so that we who are
new to this can get up to speed fairly quickly?

Rgds
Pierre

2005-04-23 21:34:14

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi!

> > > > Well, not sure.
> > > >
> > > > I did
> > > >
> > > > git track linus
> > > > git cancel
> > > >
> > > > but Makefile still contains -rc2. (Is "git cancel" right way to check
> > > > out the tree?)
> > >
> > > No. git cancel does what it says - cancels your local changes to the
> > > working tree. git track will only set that next time you pull from
> > > linus, the changes will be automatically merged. (Note that this will
> > > change with the big UI change.)
> >
> > Is there way to say "forget those changes in my repository, I want
> > just plain vanilla" without rm -rf?
>
> git cancel will give you "plain last commit". If you need plain vanilla,
> the "hard way" now is to just do
>
> commit-id >.git/HEAD
>
> but your current HEAD will be lost forever. Or do
>
> git fork vanilla ~/vanilla linus
>
> and you will have the vanilla tree tracking linus in ~/vanilla.

Yep, symlinked in nice way. Good trap; it cought me ;-). (I of course
deleted the original directory).

> I'm not yet sure if we should have some Cogito interface for doing this
> and what its semantics should be.

Perhaps "git init" is right command for this? Running it in non-empty
directory for faster restart after bad problem....
Pavel
--
Boycott Kodak -- for their patent abuse against Java.

2005-04-23 22:02:53

by Greg KH

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Sat, Apr 23, 2005 at 06:27:33PM +0200, Pierre Ossman wrote:
> Linus Torvalds wrote:
> >
> > A word of warning: in many ways it's easier to work with patches. In
> > particular, if you want to have me merge from your tree, I require a
> > certain amount of cleanliness in the trees I'm pulling from. All of the
> > people who used to use BK to sync are already used to that, but for people
> > who didn't historically use BK this is going to be a learning experience.
> >
>
> Is there a summary available of the major issues here so that we who are
> new to this can get up to speed fairly quickly?

The main issue is if you want to use git for development and accepting
patches from others, you need to be used to not using that git tree to
send patches to Linus. To send patches to him, do something like the
following:
- export the patches from your git tree
- pick and choose what you want to send off, cleaning up the
changelog comments and merging patches that need to be.
- clone the latest copy of Linus's tree.
- apply the patches to that tree.
- make the tree public
- generate an email with the diffs and send that off to lkml and
Linus.

Because of all of this, I've found that it is easier to use quilt for
day-to-day development and acceptance of patches. Then use git to build
up trees for Linus to pull from.

But you might find your workflow is different :)

Hope this helps,

greg k-h

2005-04-23 22:32:04

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi!

> > > A word of warning: in many ways it's easier to work with patches. In
> > > particular, if you want to have me merge from your tree, I require a
> > > certain amount of cleanliness in the trees I'm pulling from. All of the
> > > people who used to use BK to sync are already used to that, but for people
> > > who didn't historically use BK this is going to be a learning experience.
> > >
> >
> > Is there a summary available of the major issues here so that we who are
> > new to this can get up to speed fairly quickly?
>
> The main issue is if you want to use git for development and accepting
> patches from others, you need to be used to not using that git tree to
> send patches to Linus. To send patches to him, do something like the
> following:
> - export the patches from your git tree
> - pick and choose what you want to send off, cleaning up the
> changelog comments and merging patches that need to be.
> - clone the latest copy of Linus's tree.
> - apply the patches to that tree.
> - make the tree public
> - generate an email with the diffs and send that off to lkml and
> Linus.
>
> Because of all of this, I've found that it is easier to use quilt for
> day-to-day development and acceptance of patches. Then use git to build
> up trees for Linus to pull from.
>
> But you might find your workflow is different :)

How does Andrew fit into this picture, btw? I thought all patches ought
to go through him... Is Andrew willing to pull from git trees? Or is
it "create one version for akpm, and when he ACKs it, create another
for Linus"?

Pavel
--
Boycott Kodak -- for their patent abuse against Java.

2005-04-23 23:01:02

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi!

> > Could we add some kind off "This-changeset-obsoletes: <sha1>" header?
> > That would allow me to send patches by hand and still make the SCM do the
> > right thing during merge.
>
> That doesn't really scale, plus I don't want to rely on that kind of hack
> since it's simply not reliable (the patch may have gotten edited on the
> way, so maybe the stuff I apply is 90% from your patch, but 10%
> different).

(Well, at that point I probably want to drop that 10% anyway :-).

> Also, it doesn't actually handle the generic case, which is that the other
> end used something else than git to maintain his patches (which in the end
> has the exact same issues).

Actually this one should not be a problem. "This-changeset-obsoletes:"
would probably be in changelog part, and remote end would just
propagate it.

> > Alternatively I should just get public rsync-able space somewhere...
> > Would kernel.org be willing to add people/pavel?
>
> Now, that's actually something people are working on ("git.kernel.org"),
> so I don't think that would be a problem. People _are_ trying to set up
> things like a bkbits.net at least for the kernel. I know OSDL and OSL
> (http://osuosl.org/) are interested, and I think the current kernel.org
> works too.
>
> A word of warning: in many ways it's easier to work with patches. In
> particular, if you want to have me merge from your tree, I require a
> certain amount of cleanliness in the trees I'm pulling from. All of the
> people who used to use BK to sync are already used to that, but for people
> who didn't historically use BK this is going to be a learning experience.
>
> The reason patches are easier is that you can start out from a messy tree,
> and then whittle down the patch to just the part you want to send me, so
> it doesn't actually matter how messy your original tree is, you can always
> make the end result look nice.

I created three trees here (with git fork): one ("clean-git") to track
your changes, second ("linux-git") to do my development on and third
("linux-good") for good, nice, cleaned-up changes, for you to merge.

...unfortunately pasky's git just symlinked object/ directories...

...that means that if you pull from me using rsync, you'll get all my
"development" files, too. Not accessible in any normal way, but still
there.

That means that git fork can't be used for "good tree for
Linus"... not until we have something better than rsync :-(.

Pavel

--
Boycott Kodak -- for their patent abuse against Java.

2005-04-23 23:06:51

by Petr Baudis

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Dear diary, on Sun, Apr 24, 2005 at 01:00:23AM CEST, I got a letter
where Pavel Machek <[email protected]> told me that...
> I created three trees here (with git fork): one ("clean-git") to track
> your changes, second ("linux-git") to do my development on and third
> ("linux-good") for good, nice, cleaned-up changes, for you to merge.
>
> ...unfortunately pasky's git just symlinked object/ directories...

You can't do any better than that, since you would have to transfer
stuff around by pulling them otherwise; so you would need smart git
pull, but then Linus can use the smart git pull himself anyway. ;-)

--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor

2005-04-23 23:23:09

by Petr Baudis

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Dear diary, on Sat, Apr 23, 2005 at 01:18:39AM CEST, I got a letter
where Pavel Machek <[email protected]> told me that...
> git patch origin:
>
> will list my patches, plus any merges I done... Is there any
> reasonable way to get only "my" changes? When I do not have to resolve
> anything during merge, it should be usable... but that is starting to
> look ugly.

I told you the semantics is peculiar.

We could add a flag to rev-tree to always follow only the first parent;
that would be useful even for a flag for git log to "flatten" the
history, if you aren't interested in what was going on in the trees you
just merged.

Another flag to avoid showing patches for merges might be possible, but
actually a little scary since you don't have consistency assured that
way; your post-merge patches might generate rejects when applied on top
of the pre-merge patches, or your pre-merge patches might not apply
cleanly on the tree you merged with.

So if you want to ignore merges, it sounds that you are probably
actually doing something wrong. We might still let you do it assuming
that you know what are you doing and you will test the patches for
applying to whatever you want to apply them on, but with a big
exclamation mark.

Patches welcome, if anyone wants to do it before I get to it. ;-)

--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor

2005-04-23 23:38:45

by Greg KH

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Sun, Apr 24, 2005 at 12:29:46AM +0200, Pavel Machek wrote:
> Hi!
>
> > > > A word of warning: in many ways it's easier to work with patches. In
> > > > particular, if you want to have me merge from your tree, I require a
> > > > certain amount of cleanliness in the trees I'm pulling from. All of the
> > > > people who used to use BK to sync are already used to that, but for people
> > > > who didn't historically use BK this is going to be a learning experience.
> > > >
> > >
> > > Is there a summary available of the major issues here so that we who are
> > > new to this can get up to speed fairly quickly?
> >
> > The main issue is if you want to use git for development and accepting
> > patches from others, you need to be used to not using that git tree to
> > send patches to Linus. To send patches to him, do something like the
> > following:
> > - export the patches from your git tree
> > - pick and choose what you want to send off, cleaning up the
> > changelog comments and merging patches that need to be.
> > - clone the latest copy of Linus's tree.
> > - apply the patches to that tree.
> > - make the tree public
> > - generate an email with the diffs and send that off to lkml and
> > Linus.
> >
> > Because of all of this, I've found that it is easier to use quilt for
> > day-to-day development and acceptance of patches. Then use git to build
> > up trees for Linus to pull from.
> >
> > But you might find your workflow is different :)
>
> How does Andrew fit into this picture, btw? I thought all patches ought
> to go through him... Is Andrew willing to pull from git trees? Or is
> it "create one version for akpm, and when he ACKs it, create another
> for Linus"?

Yeah, getting Andrew into the picture is a bit different. Previously,
with bk, I could just have him pull from my trees, and generate a patch
from that. And actually, with git that would work just as well, so if
you make your git working trees public, he can pull from them and you're
fine.

But with quilt it's different. That's why I make up a big patch which
is the sum of my individual patches and put them on a public site.
Right now you can see this at:
kernel.org/pub/linux/kernel/people/gregkh-2.6/
The patches in that directory are the "rolled up" ones. The script
there is what I use to build these patches, if you want to do something
like it.

In the patches/ subdir below that one, is a mirror of my quilt patches
directory, series file and all. That way people can still see the
individual patches if they want to.

Does this help some? It's all still under flux as to how this all
works, try something and go from there :)

thanks,

greg k-h

2005-04-24 05:42:55

by Greg KH

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Fri, Apr 22, 2005 at 09:56:43AM +0200, Borislav Petkov wrote:
> On Thursday 21 April 2005 02:59, you wrote:
> <snip>
> Hello,
>
> [build.log]
> ...
> drivers/usb/storage/debug.c: In function `usb_stor_show_sense':
> drivers/usb/storage/debug.c:166: warning: implicit declaration of function
> `scsi_sense_key_string'
> drivers/usb/storage/debug.c:166: warning: assignment makes pointer from
> integer without a cast
> drivers/usb/storage/debug.c:167: warning: implicit declaration of function
> `scsi_extd_sense_format'
> drivers/usb/storage/debug.c:167: warning: assignment makes pointer from
> integer without a cast
> ...
>
> Hmm, actually I've already sent the trivial patch below for this to Andrew a
> few weeks ago and he included it in mm but somehow it is not there..

What is your .config that generates this? What arch?

thanks,

greg k-h

2005-04-24 05:46:21

by Greg KH

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Sun, Apr 24, 2005 at 01:00:23AM +0200, Pavel Machek wrote:
> Hi!
>
> > > Could we add some kind off "This-changeset-obsoletes: <sha1>" header?
> > > That would allow me to send patches by hand and still make the SCM do the
> > > right thing during merge.
> >
> > That doesn't really scale, plus I don't want to rely on that kind of hack
> > since it's simply not reliable (the patch may have gotten edited on the
> > way, so maybe the stuff I apply is 90% from your patch, but 10%
> > different).
>
> (Well, at that point I probably want to drop that 10% anyway :-).
>
> > Also, it doesn't actually handle the generic case, which is that the other
> > end used something else than git to maintain his patches (which in the end
> > has the exact same issues).
>
> Actually this one should not be a problem. "This-changeset-obsoletes:"
> would probably be in changelog part, and remote end would just
> propagate it.
>
> > > Alternatively I should just get public rsync-able space somewhere...
> > > Would kernel.org be willing to add people/pavel?
> >
> > Now, that's actually something people are working on ("git.kernel.org"),
> > so I don't think that would be a problem. People _are_ trying to set up
> > things like a bkbits.net at least for the kernel. I know OSDL and OSL
> > (http://osuosl.org/) are interested, and I think the current kernel.org
> > works too.
> >
> > A word of warning: in many ways it's easier to work with patches. In
> > particular, if you want to have me merge from your tree, I require a
> > certain amount of cleanliness in the trees I'm pulling from. All of the
> > people who used to use BK to sync are already used to that, but for people
> > who didn't historically use BK this is going to be a learning experience.
> >
> > The reason patches are easier is that you can start out from a messy tree,
> > and then whittle down the patch to just the part you want to send me, so
> > it doesn't actually matter how messy your original tree is, you can always
> > make the end result look nice.
>
> I created three trees here (with git fork): one ("clean-git") to track
> your changes, second ("linux-git") to do my development on and third
> ("linux-good") for good, nice, cleaned-up changes, for you to merge.
>
> ...unfortunately pasky's git just symlinked object/ directories...
>
> ...that means that if you pull from me using rsync, you'll get all my
> "development" files, too. Not accessible in any normal way, but still
> there.
>
> That means that git fork can't be used for "good tree for
> Linus"... not until we have something better than rsync :-(.

I'm not really using the git-pasky part of git yet for development
(except for 'git log -c') You can just "clone" the tree yourself with a
stupid little script like I do below. It still uses hard-links so
common git objects are only in one place on the disk.

Feel free to make it better, I have never claimed to be a bash
programmer :)

thanks,

greg k-h

--------------

#!/bin/bash

DIR=$1

mkdir $DIR
cd $DIR
mkdir .git
cp ~/linux/kernel.org/people/torvalds/linux-2.6.git/HEAD .git/
cp -rl ~/linux/kernel.org/people/torvalds/linux-2.6.git/objects/ .git/objects/

HEAD=`cat .git/HEAD`
echo "HEAD=$HEAD"
echo ""

cat-file commit $HEAD
TREE_HEAD=`cat-file commit $HEAD | head -n 1 | cut -f 2 -d " "`
echo "TREE_HEAD=$TREE_HEAD"

echo "read-tree $TREE_HEAD"
read-tree $TREE_HEAD

echo "checkout-cache -a"
checkout-cache -a

echo "update-cache --refresh"
update-cache --refresh

2005-04-24 06:29:43

by Borislav Petkov

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Sunday 24 April 2005 07:42, Greg KH wrote:
> On Fri, Apr 22, 2005 at 09:56:43AM +0200, Borislav Petkov wrote:
> > On Thursday 21 April 2005 02:59, you wrote:
> > <snip>
> > Hello,
> >
> > [build.log]
> > ...
> > drivers/usb/storage/debug.c: In function `usb_stor_show_sense':
> > drivers/usb/storage/debug.c:166: warning: implicit declaration of
> > function `scsi_sense_key_string'
> > drivers/usb/storage/debug.c:166: warning: assignment makes pointer from
> > integer without a cast
> > drivers/usb/storage/debug.c:167: warning: implicit declaration of
> > function `scsi_extd_sense_format'
> > drivers/usb/storage/debug.c:167: warning: assignment makes pointer from
> > integer without a cast
> > ...
> >
> > Hmm, actually I've already sent the trivial patch below for this to
> > Andrew a few weeks ago and he included it in mm but somehow it is not
> > there..
>
Hi Greg,

> What is your .config that generates this? What arch?
i386, .config attached.

Regards,
Boris.


Attachments:
(No filename) (979.00 B)
config-2.6.12-rc3 (28.73 kB)
Download all attachments

2005-04-24 07:22:30

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi!

On Ne 24-04-05 01:06:48, Petr Baudis wrote:
> Dear diary, on Sun, Apr 24, 2005 at 01:00:23AM CEST, I got a letter
> where Pavel Machek <[email protected]> told me that...
> > I created three trees here (with git fork): one ("clean-git") to track
> > your changes, second ("linux-git") to do my development on and third
> > ("linux-good") for good, nice, cleaned-up changes, for you to merge.
> >
> > ...unfortunately pasky's git just symlinked object/ directories...
>
> You can't do any better than that, since you would have to transfer
> stuff around by pulling them otherwise; so you would need smart git
> pull, but then Linus can use the smart git pull himself anyway. ;-)

Actually, no.

Without cherypicking, I just can't pull from linux-git into
linux-good. Ever. linux-git contains some changes that just can not go
anywhere. (Like for example czech-ucw-defkeymap.map)

So it should be okay to just copy object directories instead of
linking them. Or perhaps cp -al is good idea here. (It also removes
trap where I rm -rf-ed tree I did fork from....)

Heh, filesystem with auto-file-hardlinking would be nice there ;-).

Pavel
--
Boycott Kodak -- for their patent abuse against Java.

2005-04-24 07:26:08

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi!

On Ne 24-04-05 01:23:03, Petr Baudis wrote:
> Dear diary, on Sat, Apr 23, 2005 at 01:18:39AM CEST, I got a letter
> where Pavel Machek <[email protected]> told me that...
> > git patch origin:
> >
> > will list my patches, plus any merges I done... Is there any
> > reasonable way to get only "my" changes? When I do not have to resolve
> > anything during merge, it should be usable... but that is starting to
> > look ugly.
>
> I told you the semantics is peculiar.
>
> We could add a flag to rev-tree to always follow only the first parent;
> that would be useful even for a flag for git log to "flatten" the
> history, if you aren't interested in what was going on in the trees you
> just merged.
>
> Another flag to avoid showing patches for merges might be possible, but
> actually a little scary since you don't have consistency assured that
> way; your post-merge patches might generate rejects when applied on top
> of the pre-merge patches, or your pre-merge patches might not apply
> cleanly on the tree you merged with.
>
> So if you want to ignore merges, it sounds that you are probably
> actually doing something wrong. We might still let you do it
> assuming

Right. Actually right thing might be to "only show human-made part of
each merge" or something like that. Ignoring merges altogether is not
quite right. OTOH really only small part of merge is going to
matter...
Pavel
--
Boycott Kodak -- for their patent abuse against Java.

2005-04-24 07:30:31

by Christoph Hellwig

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Sat, Apr 23, 2005 at 10:42:31PM -0700, Greg KH wrote:
> What is your .config that generates this? What arch?

should happen on all architectures with usb-storage debugging enabled.

Someone fucked up usb-stroage again after I cleaned up usage of the
old-style scsi.h header, and this is the result of scsi.h gradually
going away.

The patch posted isthe correct fix.

2005-04-24 07:35:08

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Sunday 24 April 2005 02:21, Pavel Machek wrote:
> Without cherypicking, I just can't pull from linux-git into
> linux-good. Ever. linux-git contains some changes that just can not go
> anywhere. (Like for example czech-ucw-defkeymap.map)

I was using quilt on top of BK and I think it will be good idea to do the
same with git... When I think that my patches are ready for other people
to see I cherry-pick and commit them into $SCM and push into externally-
visible tree.

--
Dmitry

2005-04-24 10:27:28

by Andrew Morton

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Greg KH <[email protected]> wrote:
>
> On Sun, Apr 24, 2005 at 12:29:46AM +0200, Pavel Machek wrote:
> > Hi!
> >
> > > > > A word of warning: in many ways it's easier to work with patches. In
> > > > > particular, if you want to have me merge from your tree, I require a
> > > > > certain amount of cleanliness in the trees I'm pulling from. All of the
> > > > > people who used to use BK to sync are already used to that, but for people
> > > > > who didn't historically use BK this is going to be a learning experience.
> > > > >
> > > >
> > > > Is there a summary available of the major issues here so that we who are
> > > > new to this can get up to speed fairly quickly?
> > >
> > > The main issue is if you want to use git for development and accepting
> > > patches from others, you need to be used to not using that git tree to
> > > send patches to Linus. To send patches to him, do something like the
> > > following:
> > > - export the patches from your git tree
> > > - pick and choose what you want to send off, cleaning up the
> > > changelog comments and merging patches that need to be.
> > > - clone the latest copy of Linus's tree.
> > > - apply the patches to that tree.
> > > - make the tree public
> > > - generate an email with the diffs and send that off to lkml and
> > > Linus.
> > >
> > > Because of all of this, I've found that it is easier to use quilt for
> > > day-to-day development and acceptance of patches. Then use git to build
> > > up trees for Linus to pull from.
> > >
> > > But you might find your workflow is different :)
> >
> > How does Andrew fit into this picture, btw? I thought all patches ought
> > to go through him... Is Andrew willing to pull from git trees? Or is
> > it "create one version for akpm, and when he ACKs it, create another
> > for Linus"?
>
> Yeah, getting Andrew into the picture is a bit different.

Andrew has some work to do before he can regain momentum:

- Which subsystem maintainers will have public git trees?

- Which maintainers will continue to use bk?

- Can Andrew legally use the bk client?

- Can Andrew legally use a bk client which won't go phut at cset 65535?

- How do I do a bk `gcapatch' is there is no Linus bk tree to base it off?

- If none of the above, which maintainers will put up-to-date raw patches
in places where Andrew can get at them?

I don't know how all this will pan out. I guess the next -mm won't have
many subsystem trees and I'll gradually add them as things get sorted out.

> Previously,
> with bk, I could just have him pull from my trees, and generate a patch
> from that. And actually, with git that would work just as well, so if
> you make your git working trees public, he can pull from them and you're
> fine.

yup.

> But with quilt it's different. That's why I make up a big patch which
> is the sum of my individual patches and put them on a public site.
> Right now you can see this at:
> kernel.org/pub/linux/kernel/people/gregkh-2.6/
> The patches in that directory are the "rolled up" ones. The script
> there is what I use to build these patches, if you want to do something
> like it.

I could aggregate a subsystem maintainer's quilt series into -mm of
course. That would be nicer than a huge rollup for both code reviewing and
for the old bsearch-to-find-the-regression process.

Of course, quilt-based patches can be checked into an SCM and publically
exported. Lots of people do that.

> In the patches/ subdir below that one, is a mirror of my quilt patches
> directory, series file and all. That way people can still see the
> individual patches if they want to.
>
> Does this help some? It's all still under flux as to how this all
> works, try something and go from there :)

Yes, it would be nice to have gregkh's patches in -mm as individual patches.

Of course, whatever gets done, I'd selfishly prefer that most (or even all)
subsystem maintainers work the same way and adopt the same work practices.

I guess it's too early to think about that, but if one maintainer (hint)
were to develop and document a good methodology and toolset, others might
quickly follow.


2005-04-24 15:11:28

by Bodo Eggert

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Greg KH <[email protected]> wrote:

> Feel free to make it better, I have never claimed to be a bash
> programmer :)

Just some basic comments:

> #!/bin/bash

set -e

> DIR=$1
>
> mkdir $DIR
> cd $DIR
[...]

General rule: _*Allways*_ use quotes for variable expansion.

Reason:

$ md foo\ bar
$ DIR=Foo\ bar
$ cd $DIR
bash: cd: foo: No such file or directory

--
Top 100 things you don't want the sysadmin to say:
70. Hmm, maybe if I do this...

2005-04-24 17:46:01

by Linus Torvalds

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3



On Sun, 24 Apr 2005, Andrew Morton wrote:
>
> - How do I do a bk `gcapatch' is there is no Linus bk tree to base it off?

"gcapatch" should be trivial if I have understood it correctly, and git
can already do it. I've never used it, though, and in a mixed git/bk
environment you probably want to use bk to do these things and just import
things from git, if only because bk will be better at merging things
automatically.

Also, exporting from git->bk looks like it should be very easy and
automatable efficiently. "SMOP".

Linus

2005-04-24 19:05:51

by Sam Ravnborg

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi Andrew.

> Andrew has some work to do before he can regain momentum:
>
> - Which subsystem maintainers will have public git trees?
Planning to have it - when I feel cogito has stabilized a bit.

> - Which maintainers will continue to use bk?
I always liked bk, but will not upgrade to a commercial license.
So bk-kbuild and bk-kconfig will soon dismiss.

> Of course, whatever gets done, I'd selfishly prefer that most (or even all)
> subsystem maintainers work the same way and adopt the same work practices.

It will to some respect depend on the nature of the patches that one
want to have included. Working with a set a patches that change often
will call for a quilt based solution. Working with a fairly stable set
of patches will most likely call for a cogito/git solution.

I will await and see what Greg KH or others come up with.

Sam

2005-04-24 19:57:27

by Greg KH

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Sun, Apr 24, 2005 at 03:26:22AM -0700, Andrew Morton wrote:
> Greg KH <[email protected]> wrote:
> > In the patches/ subdir below that one, is a mirror of my quilt patches
> > directory, series file and all. That way people can still see the
> > individual patches if they want to.
> >
> > Does this help some? It's all still under flux as to how this all
> > works, try something and go from there :)
>
> Yes, it would be nice to have gregkh's patches in -mm as individual patches.

It would? Ok, that's easy to change.

> Of course, whatever gets done, I'd selfishly prefer that most (or even all)
> subsystem maintainers work the same way and adopt the same work practices.
>
> I guess it's too early to think about that, but if one maintainer (hint)
> were to develop and document a good methodology and toolset, others might
> quickly follow.

Heh, ok, I can take a hint, I'll work on this this week. I already have
the "export a series of patches from a git tree that are not in another
git tree" working, so it shouldn't be tough to get the rest in an
"automated" manner.

thanks,

greg k-h

2005-04-24 20:17:38

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi!
> > Greg KH <[email protected]> wrote:
> > > In the patches/ subdir below that one, is a mirror of my quilt patches
> > > directory, series file and all. That way people can still see the
> > > individual patches if they want to.
> > >
> > > Does this help some? It's all still under flux as to how this all
> > > works, try something and go from there :)
> >
> > Yes, it would be nice to have gregkh's patches in -mm as individual patches.
>
> It would? Ok, that's easy to change.
>
> > Of course, whatever gets done, I'd selfishly prefer that most (or even all)
> > subsystem maintainers work the same way and adopt the same work practices.
> >
> > I guess it's too early to think about that, but if one maintainer (hint)
> > were to develop and document a good methodology and toolset, others might
> > quickly follow.
>
> Heh, ok, I can take a hint, I'll work on this this week. I already have
> the "export a series of patches from a git tree that are not in another
> git tree" working, so it shouldn't be tough to get the rest in an
> "automated" manner.

I started to do something like that, but got to dead end (shared
object directories...). Maybe this is usefull to someone, and maybe
not...

Pavel

Kernel hacker's guide to git
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2005 Pavel Machek <[email protected]>

You can get git at http://pasky.or.cz/~pasky/dev/git/ . Compile it,
and place it somewhere in $PATH. Then you can get kernel by running

mkdir clean-git; cd clean-git
git init rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

... Run git log to get idea of what happened in tree you are
tracking. Do git pull linus to pickup latest changes from Linus. You
can do git diff to see what changes you done in your local tree. git
cancel will kill any such changes.

You can commit changes by doing git commit... If you want to get diff
of your changes against mainline, do

git diff -r origin:

. If you want to get the same diff but separated patch-by-patch, do

git patch origin:

. (Does something unexpected after first merge).

To update your tree against name "foo", do:

git track linus
git pull

or

git merge linus


How to set up your trees so that you can cooperate with linus
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

What I did:

Created clean-git. Initialized straight from Linus (as above). Then I
created my "dirty" working tree:

git fork pavel /data/l/linux-git

and created "nice" tree, good for pulling

git fork good /data/l/linux-good

. I do my work in linux-git. If someone sends me nice patch I should
pass up, I apply it to linux-good with nice message and do

git merge good

in my working tree.


Publishing your trees
~~~~~~~~~~~~~~~~~~~~~

on remote server: (as an optimization...)

cd ~/WWW/git
rsync -zavP rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git .
mv linux-2.6.git good.git

then on localhost:

cd /data/l/linux-good
rsync -zavP -essh --delete .git [email protected]:~/WWW/git/good.git

[Oops, bad. cogito -created forks use symlinks in a way which is quite "interesting".]



--
Boycott Kodak -- for their patent abuse against Java.

2005-04-24 20:30:05

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi!

> > > > The main issue is if you want to use git for development and accepting
> > > > patches from others, you need to be used to not using that git tree to
> > > > send patches to Linus. To send patches to him, do something like the
> > > > following:
> > > > - export the patches from your git tree
> > > > - pick and choose what you want to send off, cleaning up the
> > > > changelog comments and merging patches that need to be.
> > > > - clone the latest copy of Linus's tree.
> > > > - apply the patches to that tree.
> > > > - make the tree public
> > > > - generate an email with the diffs and send that off to lkml and
> > > > Linus.
> > > >
> > > > Because of all of this, I've found that it is easier to use quilt for
> > > > day-to-day development and acceptance of patches. Then use git to build
> > > > up trees for Linus to pull from.
> > > >
> > > > But you might find your workflow is different :)
> > >
> > > How does Andrew fit into this picture, btw? I thought all patches ought
> > > to go through him... Is Andrew willing to pull from git trees? Or is
> > > it "create one version for akpm, and when he ACKs it, create another
> > > for Linus"?
> >
> > Yeah, getting Andrew into the picture is a bit different.
>
> Andrew has some work to do before he can regain momentum:
>
> - Which subsystem maintainers will have public git trees?

I'd like to use git. It sucks for actuall development, but seems to be
very usefull for taking nice and clean patches from people...

> - Which maintainers will continue to use bk?
>
> - Can Andrew legally use the bk client?

I guess you need to Cc Larry on this one....
Pavel
--
Boycott Kodak -- for their patent abuse against Java.

2005-04-24 22:57:08

by David Miller

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Sun, 24 Apr 2005 03:26:22 -0700
Andrew Morton <[email protected]> wrote:

> - Which subsystem maintainers will have public git trees?

I am pretty much exclusively using GIT for networking
and sparc stuff now and I plan to provide my trees
on kernel.org

2005-04-24 23:17:34

by Marcel Holtmann

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi Andrew,

> - Which subsystem maintainers will have public git trees?

if someone gives me an account on kernel.org, I am happy to put the tree
for the Bluetooth subsystem there.

Regards

Marcel


2005-04-25 07:40:51

by Anton Altaparmakov

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Hi Andrew,

On Sun, 2005-04-24 at 03:26 -0700, Andrew Morton wrote:
> - Which subsystem maintainers will have public git trees?

Ntfs is not quite a subsystem, but if it would be possible for me to
have an account on kernel.org, I would be very happy to place .git trees
replacing the ntfs and ntfs-devel bk repositories there. Otherwise I
have nowhere to host such beasts.

Best regards,

Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/

2005-04-25 09:51:42

by Pavel Machek

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3: various swsusp problems

Hi!


> >>1. Is it necessary to print the following message during regular boot?
> >> swsusp: Suspend partition has wrong signature?
> >> It is a bit annoying and I believe it will confuse some swsusp
> >> users.
> >
> >
> > Hmm, feel free to provide a patch. (I need something to try git on :-).
>
> I'll have a look over the weekend.

I already have something from Seife in my queue.

> >>2. PCMCIA related hangs during swsusp.
> >> swsusp hangs after freeing memory when either cardmgr is running
> >> or pcmcia cards are *physically* inserted. It is insufficient
> >> to do a 'cardctl eject' the cards must be removed, too, for
> >> swsusp not to hang. I do suspect some problem with the
> >> 'pccardd' kernel threads.
> >
> >
> > Did it work with any older kernel? Which driver is it? yenta?
>
> 2.6.11.2 works ok and, yes, its yenta. Some excerpt from lspci:
>
> 00:0b.0 CardBus bridge: Texas Instruments PCI7420 CardBus Controller
> 00:0b.1 CardBus bridge: Texas Instruments PCI7420 CardBus Controller

Can you try some more binary search?

> >>3. Sometimes during the search for the suspend hang reason the system
> >> went during suspend into a lightshow of:
> >> eth0: Too much work at interrupt!
> >> and some line that ends in:
> >> release_console_sem+0x13d/0x1c0)
> >> The start of the line is not readable as it just flickers by in
> >> the eth0 message limbo. NIC is a built in RTL-8169 Gigabit Ethernet
> >> (rev 10). Oh, no chance for a serial console capture as there's no
> >> built in serial device in this laptop.
> >
> >
> > How repeatable is that? Will NIC work okay if you rmmod/insmod its driver?
>
> Happens with a probability of about 10% to 20%. I did comment out the
> 'Too much work...' printk in r8169.c which results in the following
> effect: no more message from the network driver (expected), no other
> printk related to release_console_sem or anything else unusal, but write
> to disk in the case the problem seems to happen is suddenly quite slow
> and suspend eventually succeeds.

Well, I guess that's expected. If r8169 is looping somewhere with too
much work, no wonder it slows suspend down.

> As the nic driver is built into the kernel insmod/rmmod currently won't
> do:-) Nevertheless there doesn't seem to be any strange behaviour after
> resume though I didn't really try to use the nic then.
> There is, however, definitely no such problem with the nic in 2.6.11.2.

Well, try putting nic driver from 2.6.11.2 into latest kernel and see
what happens.

I assume your kernel command line and config stayed the same, right?

Pavel
--
Boycott Kodak -- for their patent abuse against Java.

2005-04-25 19:14:31

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Thu, 21 Apr 2005, Al Viro wrote:
> On Thu, Apr 21, 2005 at 11:10:15AM +0200, Geert Uytterhoeven wrote:
> > On Thu, 21 Apr 2005, Jan Dittmer wrote:
> > > Linus Torvalds wrote:
> > > > Geert Uytterhoeven:
> > > > [PATCH] M68k: Update defconfigs for 2.6.11
> > > > [PATCH] M68k: Update defconfigs for 2.6.12-rc2
> > >
> > > Why do I still get this error when trying to cross-compile for m68k?
> >
> > Because to build m68k kernels, you (still :-( have to use the Linux/m68k CVS
> > repository, cfr. http://linux-m68k-cvs.ubb.ca/.
> >
> > BTW, my patch queue is at
> > http://linux-m68k-cvs.ubb.ca/~geert/linux-m68k-2.6.x-merging/.
> > The main offender is POSTPONED/156-thread_info.diff.
>
> I think I have a sane splitup of that stuff. If you have time to review - yell

Thanks a lot! Very well done!!

I did some (eyeball) review and the compiler liked it as well, so everything
seems OK.

Unfortunately due to various personal reasons I won't have time to test it on
real hardware anytime soon. But if anyone does, I'll take it for sure.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2005-04-25 19:18:01

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Thu, 21 Apr 2005, Al Viro wrote:
> As far as I can see that's the minimally intrusive header changes needed
> to avoid problems - better than variant with splitting sched.h as in m68k CVS.

We can discuss about that. IIRC, HCH is also in favor of splitting off struct
task_struct from sched.h.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2005-04-26 03:24:19

by Al Viro

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Mon, Apr 25, 2005 at 09:14:01PM +0200, Geert Uytterhoeven wrote:
> On Thu, 21 Apr 2005, Al Viro wrote:
> > As far as I can see that's the minimally intrusive header changes needed
> > to avoid problems - better than variant with splitting sched.h as in m68k CVS.
>
> We can discuss about that. IIRC, HCH is also in favor of splitting off struct
> task_struct from sched.h.

Sure, but splitting sched.h is a separate story. Mixing it with m68k
merge will only make both harder. It requires more include reordering
and I'd rather keep that headache separate from m68k issues. I agree
that eventual splitup of sched.h makes sense. However, I think that
going for minimally intrusive variant of merge and then dealing with
sched.h would be easier for everyone.

2005-04-26 05:26:29

by Brown, Len

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Sun, 2005-04-24 at 06:26, Andrew Morton wrote:

> Andrew has some work to do before he can regain momentum:
>
> - Which subsystem maintainers will have public git trees?
>
> - Which maintainers will continue to use bk?

I will continue to use bk
until an alternative emerges that makes my role
as a sub-system maintainer easier -- rather than harder.

My employer pays for a commercial bk license.

> - Can Andrew legally use the bk client?
>
> - Can Andrew legally use a bk client which won't go phut at cset 65535?

I don't see why not. Given your central role to the Linux development
process, I would think it would be trivial to justify OSDL arming you
with any and all tools you desire if they make you even slightly more effective.

Also, I would think Bitmover would be interested in having you enabled
to keep people like me as happy paying customers.

The question for bk use is what do we do for a reference "Linus tree"
history. It would be most effective if we could have a single bk history
rather than everybody rolling their own.

> - How do I do a bk `gcapatch' is there is no Linus bk tree to base it off?
>
> - If none of the above, which maintainers will put up-to-date raw patches
> in places where Andrew can get at them?

I can do this if you require it. The current "acpi patch" includes
68 patches: 200 files changed, 7780 insertions(+), 5455 deletions(-)

Everything in it is intended to go to Linus on day-one of 2.6.13.
Some of it should really go into 2.6.12 - but frankly, I hesitate
to touch 2.6.12 while the tools are in such flux.

> I don't know how all this will pan out. I guess the next -mm won't have
> many subsystem trees and I'll gradually add them as things get sorted out.

Please do not roll -mm without including the ACPI sub-system.
-mm provides the broadest pre-integration test coverage we've ever had.
It has allowed us to significantly reduce regressions in Linus' tree
as we encounter the inevitable setbacks associated with making
the ACPI sub-system in Linux the best in the industry.

thanks,
-Len


2005-04-26 05:51:26

by Andrew Morton

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

Len Brown <[email protected]> wrote:
>
> ...
> Also, I would think Bitmover would be interested in having you enabled
> to keep people like me as happy paying customers.

hm. I guess I can continue to use bk until the end of July or until we hit
the 65535th cset. After that things become murky.

> The question for bk use is what do we do for a reference "Linus tree"
> history. It would be most effective if we could have a single bk history
> rather than everybody rolling their own.

yes, someone needs to set up a bk tree which is fed diffs from Linus's git
tree. Let's call this the linus-git-bk-tree. You then pull this into the
acpi tree.

> > - How do I do a bk `gcapatch' is there is no Linus bk tree to base it off?
> >
> > - If none of the above, which maintainers will put up-to-date raw patches
> > in places where Andrew can get at them?
>
> I can do this if you require it.

Once you have the linus-git-bk-tree, then yes, it would be very nice if you
(or someone else) were to set up another machine which every six hours or
so does

cd bk-acpi/
bk pull bk://linux-acpi.bkbits.net/to-akpm
gcapatch > /ftp-dir/bk-acpi.patch

and makes /ftp-dir available. The same machine could also publish all the
other bk trees, such as Tony's
http://lia64.bkbits.net/linux-ia64-test-2.6.12. I have all the bk url's.

The fact that some developers change the bk URL between major kernel
releases will be a bit of a pain.

> The current "acpi patch" includes
> 68 patches: 200 files changed, 7780 insertions(+), 5455 deletions(-)
>
> Everything in it is intended to go to Linus on day-one of 2.6.13.
> Some of it should really go into 2.6.12 - but frankly, I hesitate
> to touch 2.6.12 while the tools are in such flux.

"flux". I've never seen it spelled that way before ;)

> > I don't know how all this will pan out. I guess the next -mm won't have
> > many subsystem trees and I'll gradually add them as things get sorted out.
>
> Please do not roll -mm without including the ACPI sub-system.
> -mm provides the broadest pre-integration test coverage we've ever had.
> It has allowed us to significantly reduce regressions in Linus' tree
> as we encounter the inevitable setbacks associated with making
> the ACPI sub-system in Linux the best in the industry.

OK, well once we have linus-git-bk-tree I can continue to do bk pulls until
either the bk license explodes or we hit the 65536-csets problem.

After that, the automated-patch-exports thing above would be needed.

In the very short-term, please email me the patch. Some automated daily
thing would suit.

2005-04-26 08:22:06

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: Linux 2.6.12-rc3

On Tue, 26 Apr 2005, Al Viro wrote:
> On Mon, Apr 25, 2005 at 09:14:01PM +0200, Geert Uytterhoeven wrote:
> > On Thu, 21 Apr 2005, Al Viro wrote:
> > > As far as I can see that's the minimally intrusive header changes needed
> > > to avoid problems - better than variant with splitting sched.h as in m68k CVS.
> >
> > We can discuss about that. IIRC, HCH is also in favor of splitting off struct
> > task_struct from sched.h.
>
> Sure, but splitting sched.h is a separate story. Mixing it with m68k
> merge will only make both harder. It requires more include reordering
> and I'd rather keep that headache separate from m68k issues. I agree
> that eventual splitup of sched.h makes sense. However, I think that
> going for minimally intrusive variant of merge and then dealing with
> sched.h would be easier for everyone.

I agree, it's a separate story.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2005-05-30 23:48:45

by Roman Zippel

[permalink] [raw]
Subject: more thread_info patches

Hi,

On Thu, 21 Apr 2005, Al Viro wrote:

> thread_info, part 1:

Here are some possible followup patches. Since it's already some time ago
here are the original posts for everyone else:
http://marc.theaimsgroup.com/?l=linux-kernel&m=111410539627881&w=2

This introduces an additional stack variable in task_struct. It's
basically redundant with the thread_info pointer, but in the long term I'd
like to get of the latter (with the following patches).

bye, Roman

---

include/linux/init_task.h | 1 +
include/linux/sched.h | 1 +
kernel/fork.c | 1 +
3 files changed, 3 insertions(+)

Index: linux-2.6-mm/include/linux/sched.h
===================================================================
--- linux-2.6-mm.orig/include/linux/sched.h 2005-05-31 01:19:01.636591190 +0200
+++ linux-2.6-mm/include/linux/sched.h 2005-05-31 01:19:05.913856451 +0200
@@ -617,6 +617,7 @@ struct mempolicy;
struct task_struct {
volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
struct thread_info *thread_info;
+ void *stack;
atomic_t usage;
unsigned long flags; /* per process flags, defined below */
unsigned long ptrace;
Index: linux-2.6-mm/include/linux/init_task.h
===================================================================
--- linux-2.6-mm.orig/include/linux/init_task.h 2005-05-31 01:19:01.636591190 +0200
+++ linux-2.6-mm/include/linux/init_task.h 2005-05-31 01:19:05.913856451 +0200
@@ -71,6 +71,7 @@ extern struct group_info init_groups;
{ \
.state = 0, \
.thread_info = &init_thread_info, \
+ .stack = &init_stack, \
.usage = ATOMIC_INIT(2), \
.flags = 0, \
.lock_depth = -1, \
Index: linux-2.6-mm/kernel/fork.c
===================================================================
--- linux-2.6-mm.orig/kernel/fork.c 2005-05-31 01:19:01.636591190 +0200
+++ linux-2.6-mm/kernel/fork.c 2005-05-31 01:19:29.954726757 +0200
@@ -173,6 +173,7 @@ static struct task_struct *dup_task_stru
*tsk = *orig;
setup_thread_info(tsk, ti);
tsk->thread_info = ti;
+ tsk->stack = ti;
ti->task = tsk;

/* One for us, one for whoever does the "release_task()" (usually parent) */

2005-05-30 23:54:28

by Roman Zippel

[permalink] [raw]
Subject: Re: more thread_info patches

Hi,

This does a global rename of alloc_thread_info/free_thread_info to
alloc_thread_stack/free_thread_stack. This reflects what these functions
really do, the thread_info part is only a small part of the stack (and
possibly it's even somewhere else).
Al, I renamed your setup_thread_info to setup_thread_task and changed the
arguments a bit. I didn't like how it relies on how finds the original
thread_info data, now it gets it explicitely from the original task.

bye, Roman

---

arch/arm/kernel/process.c | 8 ++++----
arch/arm26/kernel/process.c | 8 ++++----
arch/sparc/mm/srmmu.c | 6 +++---
arch/sparc/mm/sun4c.c | 10 +++++-----
include/asm-alpha/thread_info.h | 6 +++---
include/asm-arm/thread_info.h | 4 ++--
include/asm-arm26/thread_info.h | 4 ++--
include/asm-cris/thread_info.h | 4 ++--
include/asm-frv/thread_info.h | 8 ++++----
include/asm-h8300/thread_info.h | 4 ++--
include/asm-i386/thread_info.h | 8 ++++----
include/asm-ia64/thread_info.h | 4 ++--
include/asm-m32r/thread_info.h | 8 ++++----
include/asm-m68k/thread_info.h | 8 ++++----
include/asm-m68knommu/thread_info.h | 4 ++--
include/asm-mips/thread_info.h | 8 ++++----
include/asm-parisc/thread_info.h | 4 ++--
include/asm-ppc/thread_info.h | 4 ++--
include/asm-ppc64/thread_info.h | 8 ++++----
include/asm-s390/thread_info.h | 4 ++--
include/asm-sh/thread_info.h | 4 ++--
include/asm-sh64/thread_info.h | 7 ++-----
include/asm-sparc/thread_info.h | 10 +++++-----
include/asm-sparc64/thread_info.h | 12 ++++++------
include/asm-um/thread_info.h | 6 +++---
include/asm-v850/thread_info.h | 4 ++--
include/asm-x86_64/thread_info.h | 6 +++---
include/linux/sched.h | 5 +++--
kernel/fork.c | 15 +++++++--------
29 files changed, 94 insertions(+), 97 deletions(-)

Index: linux-2.6-mm/include/asm-v850/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-v850/thread_info.h 2005-05-31 01:19:00.719748683 +0200
+++ linux-2.6-mm/include/asm-v850/thread_info.h 2005-05-31 01:19:43.457407286 +0200
@@ -55,9 +55,9 @@ struct thread_info {
*/

/* thread information allocation */
-#define alloc_thread_info(tsk) ((struct thread_info *) \
+#define alloc_thread_stack(tsk) ((void *) \
__get_free_pages(GFP_KERNEL, 1))
-#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
+#define free_thread_stack(stk) free_pages((unsigned long)(stk), 1)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)

Index: linux-2.6-mm/include/asm-cris/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-cris/thread_info.h 2005-05-31 01:19:00.719748683 +0200
+++ linux-2.6-mm/include/asm-cris/thread_info.h 2005-05-31 01:19:43.457407286 +0200
@@ -67,8 +67,8 @@ struct thread_info {
#define init_thread_info (init_thread_union.thread_info)

/* thread information allocation */
-#define alloc_thread_info(tsk) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1))
-#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
+#define alloc_thread_stack(tsk) ((void *) __get_free_pages(GFP_KERNEL,1))
+#define free_thread_stack(stack) free_pages((unsigned long)(stack), 1)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)

Index: linux-2.6-mm/include/asm-m68knommu/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-m68knommu/thread_info.h 2005-05-31 01:19:00.719748683 +0200
+++ linux-2.6-mm/include/asm-m68knommu/thread_info.h 2005-05-31 01:19:43.458407115 +0200
@@ -72,9 +72,9 @@ static inline struct thread_info *curren
}

/* thread information allocation */
-#define alloc_thread_info(tsk) ((struct thread_info *) \
+#define alloc_thread_stack(tsk) ((void *) \
__get_free_pages(GFP_KERNEL, THREAD_SIZE_ORDER))
-#define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_SIZE_ORDER)
+#define free_thread_stack(stk) free_pages((unsigned long)(stk), THREAD_SIZE_ORDER)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)
#endif /* __ASSEMBLY__ */
Index: linux-2.6-mm/include/asm-um/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-um/thread_info.h 2005-05-31 01:19:00.719748683 +0200
+++ linux-2.6-mm/include/asm-um/thread_info.h 2005-05-31 01:19:43.458407115 +0200
@@ -52,9 +52,9 @@ static inline struct thread_info *curren
}

/* thread information allocation */
-#define alloc_thread_info(tsk) \
- ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL))
-#define free_thread_info(ti) kfree(ti)
+#define alloc_thread_stack(tsk) \
+ ((void *) kmalloc(THREAD_SIZE, GFP_KERNEL))
+#define free_thread_stack(stk) kfree(stk)

#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)
Index: linux-2.6-mm/include/asm-sh64/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-sh64/thread_info.h 2005-05-31 01:19:00.719748683 +0200
+++ linux-2.6-mm/include/asm-sh64/thread_info.h 2005-05-31 01:19:43.458407115 +0200
@@ -61,11 +61,8 @@ static inline struct thread_info *curren
}

/* thread information allocation */
-
-
-
-#define alloc_thread_info(ti) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1))
-#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
+#define alloc_thread_stack(ti) ((void *) __get_free_pages(GFP_KERNEL,1))
+#define free_thread_stack(stk) free_pages((unsigned long)(stk), 1)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)

Index: linux-2.6-mm/include/asm-sh/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-sh/thread_info.h 2005-05-31 01:19:00.719748683 +0200
+++ linux-2.6-mm/include/asm-sh/thread_info.h 2005-05-31 01:19:43.458407115 +0200
@@ -58,8 +58,8 @@ static inline struct thread_info *curren

/* thread information allocation */
#define THREAD_SIZE (2*PAGE_SIZE)
-#define alloc_thread_info(ti) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1))
-#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
+#define alloc_thread_stack(ti) ((void *) __get_free_pages(GFP_KERNEL,1))
+#define free_thread_stack(stk) free_pages((unsigned long)(stk), 1)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)

Index: linux-2.6-mm/include/asm-frv/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-frv/thread_info.h 2005-05-31 01:19:00.720748512 +0200
+++ linux-2.6-mm/include/asm-frv/thread_info.h 2005-05-31 01:19:43.459406943 +0200
@@ -96,9 +96,9 @@ register struct thread_info *__current_t

/* thread information allocation */
#ifdef CONFIG_DEBUG_STACK_USAGE
-#define alloc_thread_info(tsk) \
+#define alloc_thread_stack(tsk) \
({ \
- struct thread_info *ret; \
+ void *ret; \
\
ret = kmalloc(THREAD_SIZE, GFP_KERNEL); \
if (ret) \
@@ -106,10 +106,10 @@ register struct thread_info *__current_t
ret; \
})
#else
-#define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
+#define alloc_thread_stack(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
#endif

-#define free_thread_info(info) kfree(info)
+#define free_thread_stack(stk) kfree(stk)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)

Index: linux-2.6-mm/include/asm-sparc64/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-sparc64/thread_info.h 2005-05-31 01:19:00.720748512 +0200
+++ linux-2.6-mm/include/asm-sparc64/thread_info.h 2005-05-31 01:19:43.459406943 +0200
@@ -151,9 +151,9 @@ register struct thread_info *current_thr
#endif /* PAGE_SHIFT == 13 */

#ifdef CONFIG_DEBUG_STACK_USAGE
-#define alloc_thread_info(tsk) \
+#define alloc_thread_stack(tsk) \
({ \
- struct thread_info *ret; \
+ void *ret; \
\
ret = (struct thread_info *) \
__get_free_pages(GFP_KERNEL, __THREAD_INFO_ORDER); \
@@ -162,12 +162,12 @@ register struct thread_info *current_thr
ret; \
})
#else
-#define alloc_thread_info(tsk) \
- ((struct thread_info *)__get_free_pages(GFP_KERNEL, __THREAD_INFO_ORDER))
+#define alloc_thread_stack(tsk) \
+ ((void *)__get_free_pages(GFP_KERNEL, __THREAD_INFO_ORDER))
#endif

-#define free_thread_info(ti) \
- free_pages((unsigned long)(ti),__THREAD_INFO_ORDER)
+#define free_thread_stack(stk) \
+ free_pages((unsigned long)(stk),__THREAD_INFO_ORDER)

#define __thread_flag_byte_ptr(ti) \
((unsigned char *)(&((ti)->flags)))
Index: linux-2.6-mm/include/asm-s390/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-s390/thread_info.h 2005-05-31 01:19:00.720748512 +0200
+++ linux-2.6-mm/include/asm-s390/thread_info.h 2005-05-31 01:19:43.459406943 +0200
@@ -78,9 +78,9 @@ static inline struct thread_info *curren
}

/* thread information allocation */
-#define alloc_thread_info(tsk) ((struct thread_info *) \
+#define alloc_thread_stack(tsk) ((void *) \
__get_free_pages(GFP_KERNEL,THREAD_ORDER))
-#define free_thread_info(ti) free_pages((unsigned long) (ti),THREAD_ORDER)
+#define free_thread_stack(stk) free_pages((unsigned long)(stk),THREAD_ORDER)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)

Index: linux-2.6-mm/include/asm-m32r/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-m32r/thread_info.h 2005-05-31 01:19:00.720748512 +0200
+++ linux-2.6-mm/include/asm-m32r/thread_info.h 2005-05-31 01:19:43.460406771 +0200
@@ -96,9 +96,9 @@ static inline struct thread_info *curren

/* thread information allocation */
#if CONFIG_DEBUG_STACK_USAGE
-#define alloc_thread_info(tsk) \
+#define alloc_thread_stack(tsk) \
({ \
- struct thread_info *ret; \
+ void *ret; \
\
ret = kmalloc(THREAD_SIZE, GFP_KERNEL); \
if (ret) \
@@ -106,10 +106,10 @@ static inline struct thread_info *curren
ret; \
})
#else
-#define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
+#define alloc_thread_stack(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
#endif

-#define free_thread_info(info) kfree(info)
+#define free_thread_stack(stk) kfree(stk)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)

Index: linux-2.6-mm/include/asm-ia64/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-ia64/thread_info.h 2005-05-31 01:19:00.720748512 +0200
+++ linux-2.6-mm/include/asm-ia64/thread_info.h 2005-05-31 01:19:43.460406771 +0200
@@ -53,8 +53,8 @@ struct thread_info {

/* how to get the thread information struct from C */
#define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE))
-#define alloc_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE))
-#define free_thread_info(ti) /* nothing */
+#define alloc_thread_stack(tsk) ((void *) ((char *) (tsk) + IA64_TASK_SIZE))
+#define free_thread_stack(stk) /* nothing */

#define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
#define alloc_task_struct() ((task_t *)__get_free_pages(GFP_KERNEL, KERNEL_STACK_SIZE_ORDER))
Index: linux-2.6-mm/include/asm-h8300/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-h8300/thread_info.h 2005-05-31 01:19:00.720748512 +0200
+++ linux-2.6-mm/include/asm-h8300/thread_info.h 2005-05-31 01:19:43.460406771 +0200
@@ -66,9 +66,9 @@ static inline struct thread_info *curren
}

/* thread information allocation */
-#define alloc_thread_info(tsk) ((struct thread_info *) \
+#define alloc_thread_stack(tsk) ((void *) \
__get_free_pages(GFP_KERNEL, 1))
-#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
+#define free_thread_stack(stk) free_pages((unsigned long)(stk), 1)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)
#endif /* __ASSEMBLY__ */
Index: linux-2.6-mm/include/asm-ppc/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-ppc/thread_info.h 2005-05-31 01:19:00.720748512 +0200
+++ linux-2.6-mm/include/asm-ppc/thread_info.h 2005-05-31 01:19:43.460406771 +0200
@@ -54,9 +54,9 @@ static inline struct thread_info *curren
}

/* thread information allocation */
-#define alloc_thread_info(tsk) ((struct thread_info *) \
+#define alloc_thread_stack(tsk) ((void *) \
__get_free_pages(GFP_KERNEL, 1))
-#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
+#define free_thread_stack(stk) free_pages((unsigned long)(stk), 1)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)
#endif /* __ASSEMBLY__ */
Index: linux-2.6-mm/include/asm-parisc/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-parisc/thread_info.h 2005-05-31 01:19:00.721748340 +0200
+++ linux-2.6-mm/include/asm-parisc/thread_info.h 2005-05-31 01:19:43.460406771 +0200
@@ -40,9 +40,9 @@ struct thread_info {
#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER)
#define THREAD_SHIFT (PAGE_SHIFT + THREAD_ORDER)

-#define alloc_thread_info(tsk) ((struct thread_info *) \
+#define alloc_thread_stack(tsk) ((void *) \
__get_free_pages(GFP_KERNEL, THREAD_ORDER))
-#define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER)
+#define free_thread_stack(stk) free_pages((unsigned long)(stk), THREAD_ORDER)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)

Index: linux-2.6-mm/include/asm-mips/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-mips/thread_info.h 2005-05-31 01:19:00.721748340 +0200
+++ linux-2.6-mm/include/asm-mips/thread_info.h 2005-05-31 01:19:43.461406599 +0200
@@ -82,9 +82,9 @@ register struct thread_info *__current_t
#define THREAD_MASK (THREAD_SIZE - 1UL)

#ifdef CONFIG_DEBUG_STACK_USAGE
-#define alloc_thread_info(tsk) \
+#define alloc_thread_stack(tsk) \
({ \
- struct thread_info *ret; \
+ void *ret; \
\
ret = kmalloc(THREAD_SIZE, GFP_KERNEL); \
if (ret) \
@@ -92,10 +92,10 @@ register struct thread_info *__current_t
ret; \
})
#else
-#define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
+#define alloc_thread_stack(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
#endif

-#define free_thread_info(info) kfree(info)
+#define free_thread_stack(stk) kfree(stk)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)

Index: linux-2.6-mm/include/asm-m68k/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-m68k/thread_info.h 2005-05-31 01:19:00.721748340 +0200
+++ linux-2.6-mm/include/asm-m68k/thread_info.h 2005-05-31 01:19:43.461406599 +0200
@@ -27,11 +27,11 @@ struct thread_info {

/* THREAD_SIZE should be 8k, so handle differently for 4k and 8k machines */
#if PAGE_SHIFT == 13 /* 8k machines */
-#define alloc_thread_info(tsk) ((struct thread_info *)__get_free_pages(GFP_KERNEL,0))
-#define free_thread_info(ti) free_pages((unsigned long)(ti),0)
+#define alloc_thread_stack(tsk) ((void *)__get_free_pages(GFP_KERNEL,0))
+#define free_thread_stack(stk) free_pages((unsigned long)(stk),0)
#else /* otherwise assume 4k pages */
-#define alloc_thread_info(tsk) ((struct thread_info *)__get_free_pages(GFP_KERNEL,1))
-#define free_thread_info(ti) free_pages((unsigned long)(ti),1)
+#define alloc_thread_stack(tsk) ((void *)__get_free_pages(GFP_KERNEL,1))
+#define free_thread_stack(stk) free_pages((unsigned long)(stk),1)
#endif /* PAGE_SHIFT == 13 */

//#define init_thread_info (init_task.thread.info)
Index: linux-2.6-mm/include/asm-arm/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-arm/thread_info.h 2005-05-31 01:19:00.721748340 +0200
+++ linux-2.6-mm/include/asm-arm/thread_info.h 2005-05-31 01:19:43.461406599 +0200
@@ -92,8 +92,8 @@ static inline struct thread_info *curren
return (struct thread_info *)(sp & ~(THREAD_SIZE - 1));
}

-extern struct thread_info *alloc_thread_info(struct task_struct *task);
-extern void free_thread_info(struct thread_info *);
+extern void *alloc_thread_stack(struct task_struct *task);
+extern void free_thread_stack(void *);

#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)
Index: linux-2.6-mm/include/asm-x86_64/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-x86_64/thread_info.h 2005-05-31 01:19:00.721748340 +0200
+++ linux-2.6-mm/include/asm-x86_64/thread_info.h 2005-05-31 01:19:43.462406428 +0200
@@ -73,9 +73,9 @@ static inline struct thread_info *stack_
}

/* thread information allocation */
-#define alloc_thread_info(tsk) \
- ((struct thread_info *) __get_free_pages(GFP_KERNEL,THREAD_ORDER))
-#define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER)
+#define alloc_thread_stack(tsk) \
+ ((void *) __get_free_pages(GFP_KERNEL,THREAD_ORDER))
+#define free_thread_stack(stk) free_pages((unsigned long)(stk), THREAD_ORDER)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)

Index: linux-2.6-mm/include/asm-sparc/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-sparc/thread_info.h 2005-05-31 01:19:00.721748340 +0200
+++ linux-2.6-mm/include/asm-sparc/thread_info.h 2005-05-31 01:19:43.462406428 +0200
@@ -86,11 +86,11 @@ register struct thread_info *current_thr
#define THREAD_INFO_ORDER 1
#endif

-BTFIXUPDEF_CALL(struct thread_info *, alloc_thread_info, void)
-#define alloc_thread_info(tsk) BTFIXUP_CALL(alloc_thread_info)()
+BTFIXUPDEF_CALL(void *, alloc_thread_stack, void)
+#define alloc_thread_stack(tsk) BTFIXUP_CALL(alloc_thread_stack)()

-BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *)
-#define free_thread_info(ti) BTFIXUP_CALL(free_thread_info)(ti)
+BTFIXUPDEF_CALL(void, free_thread_stack, void *)
+#define free_thread_stack(stk) BTFIXUP_CALL(free_thread_stack)(stk)

#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)
@@ -99,7 +99,7 @@ BTFIXUPDEF_CALL(void, free_thread_info,

/*
* Size of kernel stack for each process.
- * Observe the order of get_free_pages() in alloc_thread_info().
+ * Observe the order of get_free_pages() in alloc_thread_stack().
* The sun4 has 8K stack too, because it's short on memory, and 16K is a waste.
*/
#define THREAD_SIZE 8192
Index: linux-2.6-mm/include/asm-arm26/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-arm26/thread_info.h 2005-05-31 01:19:00.721748340 +0200
+++ linux-2.6-mm/include/asm-arm26/thread_info.h 2005-05-31 01:19:43.462406428 +0200
@@ -84,8 +84,8 @@ static inline struct thread_info *curren
#define THREAD_SIZE (8*32768) // FIXME - this needs attention (see kernel/fork.c which gets a nice div by zero if this is lower than 8*32768
#define __get_user_regs(x) (((struct pt_regs *)((unsigned long)(x) + THREAD_SIZE - 8)) - 1)

-extern struct thread_info *alloc_thread_info(struct task_struct *task);
-extern void free_thread_info(struct thread_info *);
+extern void *alloc_thread_stack(struct task_struct *task);
+extern void free_thread_stack(void *);

#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)
Index: linux-2.6-mm/include/asm-alpha/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-alpha/thread_info.h 2005-05-31 01:19:00.721748340 +0200
+++ linux-2.6-mm/include/asm-alpha/thread_info.h 2005-05-31 01:19:43.462406428 +0200
@@ -51,9 +51,9 @@ register struct thread_info *__current_t

/* Thread information allocation. */
#define THREAD_SIZE (2*PAGE_SIZE)
-#define alloc_thread_info(tsk) \
- ((struct thread_info *) __get_free_pages(GFP_KERNEL,1))
-#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
+#define alloc_thread_stack(tsk) \
+ ((void *) __get_free_pages(GFP_KERNEL,1))
+#define free_thread_stack(stack) free_pages((unsigned long)(stack), 1)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)

Index: linux-2.6-mm/arch/arm/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/arm/kernel/process.c 2005-05-31 01:19:00.722748168 +0200
+++ linux-2.6-mm/arch/arm/kernel/process.c 2005-05-31 01:19:43.463406256 +0200
@@ -257,7 +257,7 @@ static unsigned int nr_thread_info;

#define EXTRA_TASK_STRUCT 4

-struct thread_info *alloc_thread_info(struct task_struct *task)
+void *alloc_thread_stack(struct task_struct *task)
{
struct thread_info *thread = NULL;

@@ -286,15 +286,15 @@ struct thread_info *alloc_thread_info(st
return thread;
}

-void free_thread_info(struct thread_info *thread)
+void free_thread_stack(void *stack)
{
if (EXTRA_TASK_STRUCT && nr_thread_info < EXTRA_TASK_STRUCT) {
- unsigned long *p = (unsigned long *)thread;
+ unsigned long *p = (unsigned long *)stack;
p[0] = (unsigned long)thread_info_head;
thread_info_head = p;
nr_thread_info += 1;
} else
- free_pages((unsigned long)thread, THREAD_SIZE_ORDER);
+ free_pages((unsigned long)stack, THREAD_SIZE_ORDER);
}

/*
Index: linux-2.6-mm/kernel/fork.c
===================================================================
--- linux-2.6-mm.orig/kernel/fork.c 2005-05-31 01:19:29.954726757 +0200
+++ linux-2.6-mm/kernel/fork.c 2005-05-31 01:20:29.560487745 +0200
@@ -101,7 +101,7 @@ static kmem_cache_t *mm_cachep;

void free_task(struct task_struct *tsk)
{
- free_thread_info(tsk->thread_info);
+ free_thread_stack(tsk->stack);
free_task_struct(tsk);
}
EXPORT_SYMBOL(free_task);
@@ -156,7 +156,7 @@ void __init fork_init(unsigned long memp
static struct task_struct *dup_task_struct(struct task_struct *orig)
{
struct task_struct *tsk;
- struct thread_info *ti;
+ void *stack;

prepare_to_copy(orig);

@@ -164,17 +164,16 @@ static struct task_struct *dup_task_stru
if (!tsk)
return NULL;

- ti = alloc_thread_info(tsk);
- if (!ti) {
+ stack = alloc_thread_stack(tsk);
+ if (!stack) {
free_task_struct(tsk);
return NULL;
}

*tsk = *orig;
- setup_thread_info(tsk, ti);
- tsk->thread_info = ti;
- tsk->stack = ti;
- ti->task = tsk;
+ tsk->stack = stack;
+ tsk->thread_info = stack;
+ setup_thread_stack(tsk, orig);

/* One for us, one for whoever does the "release_task()" (usually parent) */
atomic_set(&tsk->usage,2);
Index: linux-2.6-mm/include/asm-ppc64/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-ppc64/thread_info.h 2005-05-31 01:19:00.722748168 +0200
+++ linux-2.6-mm/include/asm-ppc64/thread_info.h 2005-05-31 01:19:43.464406084 +0200
@@ -58,9 +58,9 @@ struct thread_info {
#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER)
#define THREAD_SHIFT (PAGE_SHIFT + THREAD_ORDER)
#ifdef CONFIG_DEBUG_STACK_USAGE
-#define alloc_thread_info(tsk) \
+#define alloc_thread_stack(tsk) \
({ \
- struct thread_info *ret; \
+ void *ret; \
\
ret = kmalloc(THREAD_SIZE, GFP_KERNEL); \
if (ret) \
@@ -68,9 +68,9 @@ struct thread_info {
ret; \
})
#else
-#define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
+#define alloc_thread_stack(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
#endif
-#define free_thread_info(ti) kfree(ti)
+#define free_thread_stack(stk) kfree(stk)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)

Index: linux-2.6-mm/include/asm-i386/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-i386/thread_info.h 2005-05-31 01:19:00.722748168 +0200
+++ linux-2.6-mm/include/asm-i386/thread_info.h 2005-05-31 01:19:43.464406084 +0200
@@ -97,9 +97,9 @@ register unsigned long current_stack_poi

/* thread information allocation */
#ifdef CONFIG_DEBUG_STACK_USAGE
-#define alloc_thread_info(tsk) \
+#define alloc_thread_stack(tsk) \
({ \
- struct thread_info *ret; \
+ void *ret; \
\
ret = kmalloc(THREAD_SIZE, GFP_KERNEL); \
if (ret) \
@@ -107,10 +107,10 @@ register unsigned long current_stack_poi
ret; \
})
#else
-#define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
+#define alloc_thread_stack(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL)
#endif

-#define free_thread_info(info) kfree(info)
+#define free_thread_stack(stk) kfree(stk)
#define get_thread_info(ti) get_task_struct((ti)->task)
#define put_thread_info(ti) put_task_struct((ti)->task)

Index: linux-2.6-mm/arch/sparc/mm/srmmu.c
===================================================================
--- linux-2.6-mm.orig/arch/sparc/mm/srmmu.c 2005-05-31 01:19:00.722748168 +0200
+++ linux-2.6-mm/arch/sparc/mm/srmmu.c 2005-05-31 01:19:43.465405912 +0200
@@ -646,7 +646,7 @@ static void srmmu_unmapiorange(unsigned
* mappings on the kernel stack without any special code as we did
* need on the sun4c.
*/
-struct thread_info *srmmu_alloc_thread_info(void)
+void *srmmu_alloc_thread_stack(void)
{
struct thread_info *ret;

@@ -660,9 +660,9 @@ struct thread_info *srmmu_alloc_thread_i
return ret;
}

-static void srmmu_free_thread_info(struct thread_info *ti)
+static void srmmu_free_thread_stack(void *stack)
{
- free_pages((unsigned long)ti, THREAD_INFO_ORDER);
+ free_pages((unsigned long)stack, THREAD_INFO_ORDER);
}

/* tsunami.S */
Index: linux-2.6-mm/arch/arm26/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/arm26/kernel/process.c 2005-05-31 01:19:00.722748168 +0200
+++ linux-2.6-mm/arch/arm26/kernel/process.c 2005-05-31 01:19:43.466405741 +0200
@@ -215,7 +215,7 @@ extern void free_page_8k(unsigned long p

//FIXME - do we use *task param below looks like we dont, which is ok?
//FIXME - if EXTRA_TASK_STRUCT is zero we can optimise the below away permanently. *IF* its supposed to be zero.
-struct thread_info *alloc_thread_info(struct task_struct *task)
+void *alloc_thread_stack(struct task_struct *task)
{
struct thread_info *thread = NULL;

@@ -245,15 +245,15 @@ struct thread_info *alloc_thread_info(st
return thread;
}

-void free_thread_info(struct thread_info *thread)
+void free_thread_stack(void *stack)
{
if (EXTRA_TASK_STRUCT && nr_thread_info < EXTRA_TASK_STRUCT) {
- unsigned long *p = (unsigned long *)thread;
+ unsigned long *p = (unsigned long *)stack;
p[0] = (unsigned long)thread_info_head;
thread_info_head = p;
nr_thread_info += 1;
} else
- ll_free_task_struct(thread);
+ ll_free_task_struct(stack);
}

/*
Index: linux-2.6-mm/arch/sparc/mm/sun4c.c
===================================================================
--- linux-2.6-mm.orig/arch/sparc/mm/sun4c.c 2005-05-31 01:19:00.722748168 +0200
+++ linux-2.6-mm/arch/sparc/mm/sun4c.c 2005-05-31 01:19:43.467405569 +0200
@@ -1023,7 +1023,7 @@ static inline void garbage_collect(int e
free_locked_segment(BUCKET_ADDR(entry));
}

-static struct thread_info *sun4c_alloc_thread_info(void)
+static void *sun4c_alloc_thread_stack(void)
{
unsigned long addr, pages;
int entry;
@@ -1067,9 +1067,9 @@ static struct thread_info *sun4c_alloc_t
return (struct thread_info *) addr;
}

-static void sun4c_free_thread_info(struct thread_info *ti)
+static void sun4c_free_thread_stack(void *stack)
{
- unsigned long tiaddr = (unsigned long) ti;
+ unsigned long tiaddr = (unsigned long)stack;
unsigned long pages = BUCKET_PTE_PAGE(sun4c_get_pte(tiaddr));
int entry = BUCKET_NUM(tiaddr);

@@ -2265,8 +2265,8 @@ void __init ld_mmu_sun4c(void)
BTFIXUPSET_CALL(__swp_offset, sun4c_swp_offset, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(__swp_entry, sun4c_swp_entry, BTFIXUPCALL_NORM);

- BTFIXUPSET_CALL(alloc_thread_info, sun4c_alloc_thread_info, BTFIXUPCALL_NORM);
- BTFIXUPSET_CALL(free_thread_info, sun4c_free_thread_info, BTFIXUPCALL_NORM);
+ BTFIXUPSET_CALL(alloc_thread_stack, sun4c_alloc_thread_stack, BTFIXUPCALL_NORM);
+ BTFIXUPSET_CALL(free_thread_stack, sun4c_free_thread_stack, BTFIXUPCALL_NORM);

BTFIXUPSET_CALL(mmu_info, sun4c_mmu_info, BTFIXUPCALL_NORM);

Index: linux-2.6-mm/include/linux/sched.h
===================================================================
--- linux-2.6-mm.orig/include/linux/sched.h 2005-05-31 01:19:05.913856451 +0200
+++ linux-2.6-mm/include/linux/sched.h 2005-05-31 01:19:43.467405569 +0200
@@ -1162,9 +1162,10 @@ static inline void task_unlock(struct ta

#define task_thread_info(task) (task)->thread_info

-static inline void setup_thread_info(struct task_struct *p, struct thread_info *ti)
+static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org)
{
- *ti = *p->thread_info;
+ *task_thread_info(p) = *task_thread_info(org);
+ task_thread_info(p)->task = p;
}

static inline unsigned long *end_of_stack(struct task_struct *p)

2005-05-31 00:03:27

by Roman Zippel

[permalink] [raw]
Subject: Re: more thread_info patches

Hi,

This is the final patch to remove the thread_info field.
It probably shouldn't be applied until the previous one is dealt with and
is mostly merged.

bye, Roman

---

include/linux/init_task.h | 1 -
include/linux/sched.h | 1 -
kernel/fork.c | 1 -
3 files changed, 3 deletions(-)

Index: linux-2.6-mm/include/linux/sched.h
===================================================================
--- linux-2.6-mm.orig/include/linux/sched.h 2005-05-31 01:20:37.374145520 +0200
+++ linux-2.6-mm/include/linux/sched.h 2005-05-31 01:20:41.599419704 +0200
@@ -616,7 +616,6 @@ struct mempolicy;

struct task_struct {
volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
- struct thread_info *thread_info;
void *stack;
atomic_t usage;
unsigned long flags; /* per process flags, defined below */
Index: linux-2.6-mm/include/linux/init_task.h
===================================================================
--- linux-2.6-mm.orig/include/linux/init_task.h 2005-05-31 01:19:05.913856451 +0200
+++ linux-2.6-mm/include/linux/init_task.h 2005-05-31 01:20:41.599419704 +0200
@@ -70,7 +70,6 @@ extern struct group_info init_groups;
#define INIT_TASK(tsk) \
{ \
.state = 0, \
- .thread_info = &init_thread_info, \
.stack = &init_stack, \
.usage = ATOMIC_INIT(2), \
.flags = 0, \
Index: linux-2.6-mm/kernel/fork.c
===================================================================
--- linux-2.6-mm.orig/kernel/fork.c 2005-05-31 01:20:29.560487745 +0200
+++ linux-2.6-mm/kernel/fork.c 2005-05-31 01:20:41.600419532 +0200
@@ -172,7 +172,6 @@ static struct task_struct *dup_task_stru

*tsk = *orig;
tsk->stack = stack;
- tsk->thread_info = stack;
setup_thread_stack(tsk, orig);

/* One for us, one for whoever does the "release_task()" (usually parent) */

2005-05-31 00:03:15

by Roman Zippel

[permalink] [raw]
Subject: Re: more thread_info patches

Hi,

This globally replaces the access to the thread_info field in task_struct
with either:
- direct access of the stack field, where it's obvious it wants the stack
- the same for end_of_stack()
- everything else with task_thread_info()

To simplify merging anything anything that creates conflicts can simply be
dropped and can be dealt with latter.

bye, Roman

---

arch/alpha/kernel/process.c | 12 ++++-----
arch/alpha/kernel/ptrace.c | 40 +++++++++++++++----------------
arch/alpha/kernel/smp.c | 2 -
arch/arm/kernel/process.c | 10 +++----
arch/arm/kernel/ptrace.c | 12 ++++-----
arch/arm/kernel/traps.c | 6 ++--
arch/arm26/kernel/process.c | 2 -
arch/arm26/kernel/ptrace.c | 6 ++--
arch/arm26/kernel/traps.c | 8 +++---
arch/cris/arch-v10/kernel/process.c | 4 +--
arch/cris/arch-v10/kernel/ptrace.c | 4 +--
arch/cris/kernel/ptrace.c | 4 +--
arch/frv/kernel/process.c | 4 +--
arch/h8300/kernel/process.c | 2 -
arch/i386/kernel/kgdb_stub.c | 2 -
arch/i386/kernel/process.c | 8 +++---
arch/i386/kernel/smpboot.c | 2 -
arch/i386/kernel/vm86.c | 2 -
arch/ia64/kernel/signal.c | 10 +++----
arch/m32r/kernel/process.c | 2 -
arch/m32r/kernel/ptrace.c | 2 -
arch/m32r/kernel/smpboot.c | 2 -
arch/m68k/kernel/process.c | 4 +--
arch/m68knommu/kernel/process.c | 2 -
arch/mips/kernel/process.c | 2 -
arch/mips/kernel/ptrace.c | 4 +--
arch/mips/kernel/ptrace32.c | 4 +--
arch/mips/pmc-sierra/yosemite/smp.c | 2 -
arch/mips/sgi-ip27/ip27-smp.c | 2 -
arch/mips/sibyte/cfe/smp.c | 2 -
arch/parisc/kernel/process.c | 2 -
arch/parisc/kernel/smp.c | 2 -
arch/ppc/kernel/process.c | 10 +++----
arch/ppc/kernel/smp.c | 4 +--
arch/ppc64/kernel/pSeries_smp.c | 2 -
arch/ppc64/kernel/process.c | 12 ++++-----
arch/ppc64/kernel/smp.c | 4 +--
arch/ppc64/kernel/sys_ppc32.c | 2 -
arch/s390/kernel/process.c | 10 +++----
arch/s390/kernel/smp.c | 2 -
arch/s390/kernel/traps.c | 4 +--
arch/sh/kernel/process.c | 16 ++++++------
arch/sh/kernel/ptrace.c | 4 +--
arch/sh/kernel/smp.c | 2 -
arch/sh64/kernel/process.c | 4 +--
arch/sh64/lib/dbg.c | 2 -
arch/sparc/kernel/process.c | 10 +++----
arch/sparc/kernel/ptrace.c | 4 +--
arch/sparc/kernel/sun4d_smp.c | 2 -
arch/sparc/kernel/sun4m_smp.c | 2 -
arch/sparc/kernel/traps.c | 4 +--
arch/sparc64/kernel/process.c | 8 +++---
arch/sparc64/kernel/ptrace.c | 46 ++++++++++++++++++------------------
arch/sparc64/kernel/setup.c | 2 -
arch/sparc64/kernel/smp.c | 2 -
arch/sparc64/kernel/traps.c | 4 +--
arch/um/kernel/process_kern.c | 4 +--
arch/um/kernel/skas/process_kern.c | 4 +--
arch/um/kernel/tt/exec_kern.c | 2 -
arch/um/kernel/tt/process_kern.c | 8 +++---
arch/v850/kernel/process.c | 2 -
arch/x86_64/kernel/i387.c | 2 -
arch/x86_64/kernel/i8259.c | 2 -
arch/x86_64/kernel/kgdb_stub.c | 2 -
arch/x86_64/kernel/process.c | 10 +++----
arch/x86_64/kernel/smpboot.c | 2 -
arch/x86_64/kernel/traps.c | 4 +--
arch/x86_64/mm/fault.c | 2 -
arch/xtensa/kernel/process.c | 4 +--
include/asm-alpha/mmu_context.h | 6 ++--
include/asm-alpha/processor.h | 4 +--
include/asm-alpha/ptrace.h | 2 -
include/asm-alpha/system.h | 2 -
include/asm-arm/processor.h | 2 -
include/asm-arm/system.h | 2 -
include/asm-arm/thread_info.h | 4 +--
include/asm-arm26/system.h | 2 -
include/asm-arm26/thread_info.h | 4 +--
include/asm-cris/processor.h | 2 -
include/asm-i386/i387.h | 8 +++---
include/asm-i386/processor.h | 2 -
include/asm-m68k/thread_info.h | 2 -
include/asm-mips/processor.h | 2 -
include/asm-mips/system.h | 2 -
include/asm-ppc64/ptrace-common.h | 4 +--
include/asm-s390/processor.h | 2 -
include/asm-sparc/system.h | 2 -
include/asm-sparc64/elf.h | 2 -
include/asm-sparc64/mmu_context.h | 2 -
include/asm-sparc64/processor.h | 4 +--
include/asm-sparc64/system.h | 4 +--
include/asm-v850/processor.h | 2 -
include/asm-x86_64/i387.h | 8 +++---
include/asm-xtensa/ptrace.h | 2 -
include/linux/sched.h | 6 ++--
95 files changed, 233 insertions(+), 233 deletions(-)

Index: linux-2.6-mm/arch/alpha/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/alpha/kernel/process.c 2005-05-31 01:18:59.124022794 +0200
+++ linux-2.6-mm/arch/alpha/kernel/process.c 2005-05-31 01:20:37.338151703 +0200
@@ -274,7 +274,7 @@ copy_thread(int nr, unsigned long clone_
{
extern void ret_from_fork(void);

- struct thread_info *childti = p->thread_info;
+ struct thread_info *childti = task_thread_info(p);
struct pt_regs * childregs;
struct switch_stack * childstack, *stack;
unsigned long stack_offset, settls;
@@ -429,7 +429,7 @@ dump_elf_task(elf_greg_t *dest, struct t
struct thread_info *ti;
struct pt_regs *pt;

- ti = task->thread_info;
+ ti = task_thread_info(task);
pt = (struct pt_regs *)((unsigned long)ti + 2*PAGE_SIZE) - 1;

dump_elf_thread(dest, pt, ti);
@@ -444,7 +444,7 @@ dump_elf_task_fp(elf_fpreg_t *dest, stru
struct pt_regs *pt;
struct switch_stack *sw;

- ti = task->thread_info;
+ ti = task_thread_info(task);
pt = (struct pt_regs *)((unsigned long)ti + 2*PAGE_SIZE) - 1;
sw = (struct switch_stack *)pt - 1;

@@ -490,8 +490,8 @@ out:
unsigned long
thread_saved_pc(task_t *t)
{
- unsigned long base = (unsigned long)t->thread_info;
- unsigned long fp, sp = t->thread_info->pcb.ksp;
+ unsigned long base = (unsigned long)t->stack;
+ unsigned long fp, sp = task_thread_info(t)->pcb.ksp;

if (sp > base && sp+6*8 < base + 16*1024) {
fp = ((unsigned long*)sp)[6];
@@ -521,7 +521,7 @@ get_wchan(struct task_struct *p)

pc = thread_saved_pc(p);
if (in_sched_functions(pc)) {
- schedule_frame = ((unsigned long *)p->thread_info->pcb.ksp)[6];
+ schedule_frame = ((unsigned long *)task_thread_info(p)->pcb.ksp)[6];
return ((unsigned long *)schedule_frame)[12];
}
return pc;
Index: linux-2.6-mm/arch/alpha/kernel/ptrace.c
===================================================================
--- linux-2.6-mm.orig/arch/alpha/kernel/ptrace.c 2005-05-31 01:18:59.124022794 +0200
+++ linux-2.6-mm/arch/alpha/kernel/ptrace.c 2005-05-31 01:20:37.338151703 +0200
@@ -103,14 +103,14 @@ get_reg_addr(struct task_struct * task,
unsigned long *addr;

if (regno == 30) {
- addr = &task->thread_info->pcb.usp;
+ addr = &task_thread_info(task)->pcb.usp;
} else if (regno == 65) {
- addr = &task->thread_info->pcb.unique;
+ addr = &task_thread_infotask)->pcb.unique;
} else if (regno == 31 || regno > 65) {
zero = 0;
addr = &zero;
} else {
- addr = (void *)task->thread_info + regoff[regno];
+ addr = (void *)task_thread_info(task) + regoff[regno];
}
return addr;
}
@@ -125,7 +125,7 @@ get_reg(struct task_struct * task, unsig
if (regno == 63) {
unsigned long fpcr = *get_reg_addr(task, regno);
unsigned long swcr
- = task->thread_info->ieee_state & IEEE_SW_MASK;
+ = task_thread_info(task)->ieee_state & IEEE_SW_MASK;
swcr = swcr_update_status(swcr, fpcr);
return fpcr | swcr;
}
@@ -139,8 +139,8 @@ static int
put_reg(struct task_struct *task, unsigned long regno, unsigned long data)
{
if (regno == 63) {
- task->thread_info->ieee_state
- = ((task->thread_info->ieee_state & ~IEEE_SW_MASK)
+ task_thread_info(task)->ieee_state
+ = ((task_thread_info(task)->ieee_state & ~IEEE_SW_MASK)
| (data & IEEE_SW_MASK));
data = (data & FPCR_DYN_MASK) | ieee_swcr_to_fpcr(data);
}
@@ -188,35 +188,35 @@ ptrace_set_bpt(struct task_struct * chil
* branch (emulation can be tricky for fp branches).
*/
displ = ((s32)(insn << 11)) >> 9;
- child->thread_info->bpt_addr[nsaved++] = pc + 4;
+ task_thread_info(child)->bpt_addr[nsaved++] = pc + 4;
if (displ) /* guard against unoptimized code */
- child->thread_info->bpt_addr[nsaved++]
+ task_thread_info(child)->bpt_addr[nsaved++]
= pc + 4 + displ;
DBG(DBG_BPT, ("execing branch\n"));
} else if (op_code == 0x1a) {
reg_b = (insn >> 16) & 0x1f;
- child->thread_info->bpt_addr[nsaved++] = get_reg(child, reg_b);
+ task_thread_info(child)->bpt_addr[nsaved++] = get_reg(child, reg_b);
DBG(DBG_BPT, ("execing jump\n"));
} else {
- child->thread_info->bpt_addr[nsaved++] = pc + 4;
+ task_thread_info(child)->bpt_addr[nsaved++] = pc + 4;
DBG(DBG_BPT, ("execing normal insn\n"));
}

/* install breakpoints: */
for (i = 0; i < nsaved; ++i) {
- res = read_int(child, child->thread_info->bpt_addr[i],
+ res = read_int(child, task_thread_info(child)->bpt_addr[i],
(int *) &insn);
if (res < 0)
return res;
- child->thread_info->bpt_insn[i] = insn;
+ task_thread_info(child)->bpt_insn[i] = insn;
DBG(DBG_BPT, (" -> next_pc=%lx\n",
- child->thread_info->bpt_addr[i]));
- res = write_int(child, child->thread_info->bpt_addr[i],
+ task_thread_info(child)->bpt_addr[i]));
+ res = write_int(child, task_thread_info(child)->bpt_addr[i],
BREAKINST);
if (res < 0)
return res;
}
- child->thread_info->bpt_nsaved = nsaved;
+ task_thread_info(child)->bpt_nsaved = nsaved;
return 0;
}

@@ -227,9 +227,9 @@ ptrace_set_bpt(struct task_struct * chil
int
ptrace_cancel_bpt(struct task_struct * child)
{
- int i, nsaved = child->thread_info->bpt_nsaved;
+ int i, nsaved = task_thread_info(child)->bpt_nsaved;

- child->thread_info->bpt_nsaved = 0;
+ task_thread_info(child)->bpt_nsaved = 0;

if (nsaved > 2) {
printk("ptrace_cancel_bpt: bogus nsaved: %d!\n", nsaved);
@@ -237,8 +237,8 @@ ptrace_cancel_bpt(struct task_struct * c
}

for (i = 0; i < nsaved; ++i) {
- write_int(child, child->thread_info->bpt_addr[i],
- child->thread_info->bpt_insn[i]);
+ write_int(child, task_thread_info(child)->bpt_addr[i],
+ task_thread_info(child)->bpt_insn[i]);
}
return (nsaved != 0);
}
@@ -369,7 +369,7 @@ do_sys_ptrace(long request, long pid, lo
if (!valid_signal(data))
break;
/* Mark single stepping. */
- child->thread_info->bpt_nsaved = -1;
+ task_thread_info(child)->bpt_nsaved = -1;
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
child->exit_code = data;
wake_up_process(child);
Index: linux-2.6-mm/arch/alpha/kernel/smp.c
===================================================================
--- linux-2.6-mm.orig/arch/alpha/kernel/smp.c 2005-05-31 01:18:59.124022794 +0200
+++ linux-2.6-mm/arch/alpha/kernel/smp.c 2005-05-31 01:20:37.342151016 +0200
@@ -302,7 +302,7 @@ secondary_cpu_start(int cpuid, struct ta
+ hwrpb->processor_offset
+ cpuid * hwrpb->processor_size);
hwpcb = (struct pcb_struct *) cpu->hwpcb;
- ipcb = &idle->thread_info->pcb;
+ ipcb = &task_thread_info(idle)->pcb;

/* Initialize the CPU's HWPCB to something just good enough for
us to get started. Immediately after starting, we'll swpctx
Index: linux-2.6-mm/arch/arm/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/arm/kernel/process.c 2005-05-31 01:19:43.463406256 +0200
+++ linux-2.6-mm/arch/arm/kernel/process.c 2005-05-31 01:20:37.342151016 +0200
@@ -331,10 +331,10 @@ void flush_thread(void)
void release_thread(struct task_struct *dead_task)
{
#if defined(CONFIG_VFP)
- vfp_release_thread(&dead_task->thread_info->vfpstate);
+ vfp_release_thread(&task_thread_info(dead_task)->vfpstate);
#endif
#if defined(CONFIG_IWMMXT)
- iwmmxt_task_release(dead_task->thread_info);
+ iwmmxt_task_release(task_thread_info(dead_task));
#endif
}

@@ -344,7 +344,7 @@ int
copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start,
unsigned long stk_sz, struct task_struct *p, struct pt_regs *regs)
{
- struct thread_info *thread = p->thread_info;
+ struct thread_info *thread = task_thread_info(p);
struct pt_regs *childregs;

childregs = ((struct pt_regs *)((unsigned long)thread + THREAD_START_SP)) - 1;
@@ -449,8 +449,8 @@ unsigned long get_wchan(struct task_stru
if (!p || p == current || p->state == TASK_RUNNING)
return 0;

- stack_start = (unsigned long)(p->thread_info + 1);
- stack_end = ((unsigned long)p->thread_info) + THREAD_SIZE;
+ stack_start = (unsigned long)end_of_stack(p);
+ stack_end = (unsigned long)p->stack + THREAD_SIZE;

fp = thread_saved_fp(p);
do {
Index: linux-2.6-mm/arch/arm/kernel/ptrace.c
===================================================================
--- linux-2.6-mm.orig/arch/arm/kernel/ptrace.c 2005-05-31 01:18:59.125022622 +0200
+++ linux-2.6-mm/arch/arm/kernel/ptrace.c 2005-05-31 01:20:37.343150844 +0200
@@ -67,7 +67,7 @@ static inline struct pt_regs *
get_user_regs(struct task_struct *task)
{
return (struct pt_regs *)
- ((unsigned long)task->thread_info + THREAD_SIZE -
+ ((unsigned long)task->stack + THREAD_SIZE -
8 - sizeof(struct pt_regs));
}

@@ -595,7 +595,7 @@ static int ptrace_setregs(struct task_st
*/
static int ptrace_getfpregs(struct task_struct *tsk, void __user *ufp)
{
- return copy_to_user(ufp, &tsk->thread_info->fpstate,
+ return copy_to_user(ufp, &task_thread_info(tsk)->fpstate,
sizeof(struct user_fp)) ? -EFAULT : 0;
}

@@ -604,7 +604,7 @@ static int ptrace_getfpregs(struct task_
*/
static int ptrace_setfpregs(struct task_struct *tsk, void __user *ufp)
{
- struct thread_info *thread = tsk->thread_info;
+ struct thread_info *thread = task_thread_info(tsk);
thread->used_cp[1] = thread->used_cp[2] = 1;
return copy_from_user(&thread->fpstate, ufp,
sizeof(struct user_fp)) ? -EFAULT : 0;
@@ -617,7 +617,7 @@ static int ptrace_setfpregs(struct task_
*/
static int ptrace_getwmmxregs(struct task_struct *tsk, void __user *ufp)
{
- struct thread_info *thread = tsk->thread_info;
+ struct thread_info *thread = task_thread_info(tsk);
void *ptr = &thread->fpstate;

if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT))
@@ -634,7 +634,7 @@ static int ptrace_getwmmxregs(struct tas
*/
static int ptrace_setwmmxregs(struct task_struct *tsk, void __user *ufp)
{
- struct thread_info *thread = tsk->thread_info;
+ struct thread_info *thread = task_thread_info(tsk);
void *ptr = &thread->fpstate;

if (!test_ti_thread_flag(thread, TIF_USING_IWMMXT))
@@ -770,7 +770,7 @@ static int do_ptrace(int request, struct
#endif

case PTRACE_GET_THREAD_AREA:
- ret = put_user(child->thread_info->tp_value,
+ ret = put_user(task_thread_info(child)->tp_value,
(unsigned long __user *) data);
break;

Index: linux-2.6-mm/arch/arm/kernel/traps.c
===================================================================
--- linux-2.6-mm.orig/arch/arm/kernel/traps.c 2005-05-31 01:18:59.125022622 +0200
+++ linux-2.6-mm/arch/arm/kernel/traps.c 2005-05-31 01:20:37.343150844 +0200
@@ -164,7 +164,7 @@ static void dump_backtrace(struct pt_reg
} else if (verify_stack(fp)) {
printk("invalid frame pointer 0x%08x", fp);
ok = 0;
- } else if (fp < (unsigned long)(tsk->thread_info + 1))
+ } else if (fp < (unsigned long)end_of_stack(tsk))
printk("frame pointer underflow");
printk("\n");

@@ -215,11 +215,11 @@ NORET_TYPE void die(const char *str, str
print_modules();
__show_regs(regs);
printk("Process %s (pid: %d, stack limit = 0x%p)\n",
- tsk->comm, tsk->pid, tsk->thread_info + 1);
+ tsk->comm, tsk->pid, end_of_stack(tsk));

if (!user_mode(regs) || in_interrupt()) {
dump_mem("Stack: ", regs->ARM_sp,
- THREAD_SIZE + (unsigned long)tsk->thread_info);
+ THREAD_SIZE + (unsigned long)tsk->stack);
dump_backtrace(regs, tsk);
dump_instr(regs);
}
Index: linux-2.6-mm/arch/arm26/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/arm26/kernel/process.c 2005-05-31 01:19:43.466405741 +0200
+++ linux-2.6-mm/arch/arm26/kernel/process.c 2005-05-31 01:20:37.343150844 +0200
@@ -284,7 +284,7 @@ int
copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start,
unsigned long unused, struct task_struct *p, struct pt_regs *regs)
{
- struct thread_info *thread = p->thread_info;
+ struct thread_info *thread = task_thread_info(p);
struct pt_regs *childregs;

childregs = __get_user_regs(thread);
Index: linux-2.6-mm/arch/arm26/kernel/ptrace.c
===================================================================
--- linux-2.6-mm.orig/arch/arm26/kernel/ptrace.c 2005-05-31 01:18:59.125022622 +0200
+++ linux-2.6-mm/arch/arm26/kernel/ptrace.c 2005-05-31 01:20:37.344150672 +0200
@@ -51,7 +51,7 @@
static inline struct pt_regs *
get_user_regs(struct task_struct *task)
{
- return __get_user_regs(task->thread_info);
+ return __get_user_regs(task_thread_info(task));
}

/*
@@ -532,7 +532,7 @@ static int ptrace_setregs(struct task_st
*/
static int ptrace_getfpregs(struct task_struct *tsk, void *ufp)
{
- return copy_to_user(ufp, &tsk->thread_info->fpstate,
+ return copy_to_user(ufp, &task_thread_info(tsk)->fpstate,
sizeof(struct user_fp)) ? -EFAULT : 0;
}

@@ -542,7 +542,7 @@ static int ptrace_getfpregs(struct task_
static int ptrace_setfpregs(struct task_struct *tsk, void *ufp)
{
set_stopped_child_used_math(tsk);
- return copy_from_user(&tsk->thread_info->fpstate, ufp,
+ return copy_from_user(&task_thread_info(tsk)->fpstate, ufp,
sizeof(struct user_fp)) ? -EFAULT : 0;
}

Index: linux-2.6-mm/arch/arm26/kernel/traps.c
===================================================================
--- linux-2.6-mm.orig/arch/arm26/kernel/traps.c 2005-05-31 01:18:59.125022622 +0200
+++ linux-2.6-mm/arch/arm26/kernel/traps.c 2005-05-31 01:20:37.345150500 +0200
@@ -132,7 +132,7 @@ static void dump_instr(struct pt_regs *r

/*static*/ void __dump_stack(struct task_struct *tsk, unsigned long sp)
{
- dump_mem("Stack: ", sp, 8192+(unsigned long)tsk->thread_info);
+ dump_mem("Stack: ", sp, 8192+(unsigned long)tsk->stack);
}

void dump_stack(void)
@@ -158,7 +158,7 @@ void dump_backtrace(struct pt_regs *regs
} else if (verify_stack(fp)) {
printk("invalid frame pointer 0x%08x", fp);
ok = 0;
- } else if (fp < (unsigned long)(tsk->thread_info + 1))
+ } else if (fp < (unsigned long)end_of_stack(tsk))
printk("frame pointer underflow");
printk("\n");

@@ -168,7 +168,7 @@ void dump_backtrace(struct pt_regs *regs

/* FIXME - this is probably wrong.. */
void show_stack(struct task_struct *task, unsigned long *sp) {
- dump_mem("Stack: ", (unsigned long)sp, 8192+(unsigned long)task->thread_info);
+ dump_mem("Stack: ", (unsigned long)sp, 8192+(unsigned long)task->stack);
}

DEFINE_SPINLOCK(die_lock);
@@ -187,7 +187,7 @@ NORET_TYPE void die(const char *str, str
printk("CPU: %d\n", smp_processor_id());
show_regs(regs);
printk("Process %s (pid: %d, stack limit = 0x%p)\n",
- current->comm, current->pid, tsk->thread_info + 1);
+ current->comm, current->pid, end_of_stack(tsk));

if (!user_mode(regs) || in_interrupt()) {
__dump_stack(tsk, (unsigned long)(regs + 1));
Index: linux-2.6-mm/arch/cris/arch-v10/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/cris/arch-v10/kernel/process.c 2005-05-31 01:18:59.125022622 +0200
+++ linux-2.6-mm/arch/cris/arch-v10/kernel/process.c 2005-05-31 01:20:37.345150500 +0200
@@ -79,7 +79,7 @@ void hard_reset_now (void)
*/
unsigned long thread_saved_pc(struct task_struct *t)
{
- return (unsigned long)user_regs(t->thread_info)->irp;
+ return (unsigned long)user_regs(task_thread_info(t))->irp;
}

static void kernel_thread_helper(void* dummy, int (*fn)(void *), void * arg)
@@ -127,7 +127,7 @@ int copy_thread(int nr, unsigned long cl
* remember that the task_struct doubles as the kernel stack for the task
*/

- childregs = user_regs(p->thread_info);
+ childregs = user_regs(task_thread_info(p));

*childregs = *regs; /* struct copy of pt_regs */

Index: linux-2.6-mm/arch/cris/arch-v10/kernel/ptrace.c
===================================================================
--- linux-2.6-mm.orig/arch/cris/arch-v10/kernel/ptrace.c 2005-05-31 01:18:59.125022622 +0200
+++ linux-2.6-mm/arch/cris/arch-v10/kernel/ptrace.c 2005-05-31 01:20:37.345150500 +0200
@@ -36,7 +36,7 @@ inline long get_reg(struct task_struct *
if (regno == PT_USP)
return task->thread.usp;
else if (regno < PT_MAX)
- return ((unsigned long *)user_regs(task->thread_info))[regno];
+ return ((unsigned long *)user_regs(task_thread_info(task)))[regno];
else
return 0;
}
@@ -50,7 +50,7 @@ inline int put_reg(struct task_struct *t
if (regno == PT_USP)
task->thread.usp = data;
else if (regno < PT_MAX)
- ((unsigned long *)user_regs(task->thread_info))[regno] = data;
+ ((unsigned long *)user_regs(task_thread_info(task)))[regno] = data;
else
return -1;
return 0;
Index: linux-2.6-mm/arch/cris/kernel/ptrace.c
===================================================================
--- linux-2.6-mm.orig/arch/cris/kernel/ptrace.c 2005-05-31 01:18:59.125022622 +0200
+++ linux-2.6-mm/arch/cris/kernel/ptrace.c 2005-05-31 01:20:37.345150500 +0200
@@ -84,7 +84,7 @@ inline long get_reg(struct task_struct *
if (regno == PT_USP)
return task->thread.usp;
else if (regno < PT_MAX)
- return ((unsigned long *)user_regs(task->thread_info))[regno];
+ return ((unsigned long *)user_regs(task_thread_info(task)))[regno];
else
return 0;
}
@@ -98,7 +98,7 @@ inline int put_reg(struct task_struct *t
if (regno == PT_USP)
task->thread.usp = data;
else if (regno < PT_MAX)
- ((unsigned long *)user_regs(task->thread_info))[regno] = data;
+ ((unsigned long *)user_regs(task_thread_info(task)))[regno] = data;
else
return -1;
return 0;
Index: linux-2.6-mm/arch/frv/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/frv/kernel/process.c 2005-05-31 01:18:59.125022622 +0200
+++ linux-2.6-mm/arch/frv/kernel/process.c 2005-05-31 01:20:37.346150329 +0200
@@ -200,7 +200,7 @@ int copy_thread(int nr, unsigned long cl

regs0 = __kernel_frame0_ptr;
childregs0 = (struct pt_regs *)
- ((unsigned long) p->thread_info + THREAD_SIZE - USER_CONTEXT_SIZE);
+ ((unsigned long)p->stack + THREAD_SIZE - USER_CONTEXT_SIZE);
childregs = childregs0;

/* set up the userspace frame (the only place that the USP is stored) */
@@ -216,7 +216,7 @@ int copy_thread(int nr, unsigned long cl
*childregs = *regs;
childregs->sp = (unsigned long) childregs0;
childregs->next_frame = childregs0;
- childregs->gr15 = (unsigned long) p->thread_info;
+ childregs->gr15 = (unsigned long) task_thread_info(p);
childregs->gr29 = (unsigned long) p;
}

Index: linux-2.6-mm/arch/h8300/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/h8300/kernel/process.c 2005-05-31 01:18:59.125022622 +0200
+++ linux-2.6-mm/arch/h8300/kernel/process.c 2005-05-31 01:20:37.346150329 +0200
@@ -199,7 +199,7 @@ int copy_thread(int nr, unsigned long cl
{
struct pt_regs * childregs;

- childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p->thread_info)) - 1;
+ childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long)p->stack)) - 1;

*childregs = *regs;
childregs->retpc = (unsigned long) ret_from_fork;
Index: linux-2.6-mm/arch/i386/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/i386/kernel/process.c 2005-05-31 01:18:59.126022450 +0200
+++ linux-2.6-mm/arch/i386/kernel/process.c 2005-05-31 01:20:37.347150157 +0200
@@ -457,7 +457,7 @@ int copy_thread(int nr, unsigned long cl
struct task_struct *tsk;
int err;

- childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p->thread_info)) - 1;
+ childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long)p->stack)) - 1;
/*
* The below -8 is to reserve 8 bytes on top of the ring0 stack.
* This is necessary to guarantee that the entire "struct pt_regs"
@@ -578,7 +578,7 @@ int dump_task_regs(struct task_struct *t
struct pt_regs ptregs;

ptregs = *(struct pt_regs *)
- ((unsigned long)tsk->thread_info+THREAD_SIZE - sizeof(ptregs));
+ ((unsigned long)tsk->stack+THREAD_SIZE - sizeof(ptregs));
ptregs.xcs &= 0xffff;
ptregs.xds &= 0xffff;
ptregs.xes &= 0xffff;
@@ -719,7 +719,7 @@ struct task_struct fastcall * __switch_t
if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr))
handle_io_bitmap(next, tss);

- disable_tsc(prev_p->thread_info, next_p->thread_info);
+ disable_tsc(task_thread_info(prev_p), task_thread_info(next_p));

perfctr_resume_thread(next);
return prev_p;
@@ -798,7 +798,7 @@ unsigned long get_wchan(struct task_stru
int count = 0;
if (!p || p == current || p->state == TASK_RUNNING)
return 0;
- stack_page = (unsigned long)p->thread_info;
+ stack_page = (unsigned long)p->stack;
esp = p->thread.esp;
if (!stack_page || esp < stack_page || esp > top_esp+stack_page)
return 0;
Index: linux-2.6-mm/arch/i386/kernel/vm86.c
===================================================================
--- linux-2.6-mm.orig/arch/i386/kernel/vm86.c 2005-05-31 01:18:59.126022450 +0200
+++ linux-2.6-mm/arch/i386/kernel/vm86.c 2005-05-31 01:20:37.347150157 +0200
@@ -313,7 +313,7 @@ static void do_sys_vm86(struct kernel_vm
"movl %1,%%ebp\n\t"
"jmp resume_userspace"
: /* no outputs */
- :"r" (&info->regs), "r" (tsk->thread_info) : "ax");
+ :"r" (&info->regs), "r" (task_thread_info(tsk)) : "ax");
/* we never return here */
}

Index: linux-2.6-mm/arch/ia64/kernel/signal.c
===================================================================
--- linux-2.6-mm.orig/arch/ia64/kernel/signal.c 2005-05-31 01:18:59.126022450 +0200
+++ linux-2.6-mm/arch/ia64/kernel/signal.c 2005-05-31 01:20:37.347150157 +0200
@@ -656,11 +656,11 @@ set_sigdelayed(pid_t pid, int signo, int

if (!t)
return;
- t->thread_info->sigdelayed.signo = signo;
- t->thread_info->sigdelayed.code = code;
- t->thread_info->sigdelayed.addr = addr;
- t->thread_info->sigdelayed.start_time = start_time;
- t->thread_info->sigdelayed.pid = pid;
+ task_thread_info(t)->sigdelayed.signo = signo;
+ task_thread_info(t)->sigdelayed.code = code;
+ task_thread_info(t)->sigdelayed.addr = addr;
+ task_thread_info(t)->sigdelayed.start_time = start_time;
+ task_thread_info(t)->sigdelayed.pid = pid;
wmb();
set_tsk_thread_flag(t, TIF_SIGDELAYED);
}
Index: linux-2.6-mm/arch/m32r/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/m32r/kernel/process.c 2005-05-31 01:18:59.126022450 +0200
+++ linux-2.6-mm/arch/m32r/kernel/process.c 2005-05-31 01:20:37.348149985 +0200
@@ -243,7 +243,7 @@ int copy_thread(int nr, unsigned long cl
unsigned long unused, struct task_struct *tsk, struct pt_regs *regs)
{
struct pt_regs *childregs;
- unsigned long sp = (unsigned long)tsk->thread_info + THREAD_SIZE;
+ unsigned long sp = (unsigned long)tsk->stack + THREAD_SIZE;
extern void ret_from_fork(void);

/* Copy registers */
Index: linux-2.6-mm/arch/m32r/kernel/ptrace.c
===================================================================
--- linux-2.6-mm.orig/arch/m32r/kernel/ptrace.c 2005-05-31 01:18:59.126022450 +0200
+++ linux-2.6-mm/arch/m32r/kernel/ptrace.c 2005-05-31 01:20:37.348149985 +0200
@@ -47,7 +47,7 @@ static inline struct pt_regs *
get_user_regs(struct task_struct *task)
{
return (struct pt_regs *)
- ((unsigned long)task->thread_info + THREAD_SIZE
+ ((unsigned long)task->stack + THREAD_SIZE
- sizeof(struct pt_regs));
}

Index: linux-2.6-mm/arch/m32r/kernel/smpboot.c
===================================================================
--- linux-2.6-mm.orig/arch/m32r/kernel/smpboot.c 2005-05-31 01:18:59.126022450 +0200
+++ linux-2.6-mm/arch/m32r/kernel/smpboot.c 2005-05-31 01:20:37.349149813 +0200
@@ -285,7 +285,7 @@ static void __init do_boot_cpu(int phys_
/* So we see what's up */
printk("Booting processor %d/%d\n", phys_id, cpu_id);
stack_start.spi = (void *)idle->thread.sp;
- idle->thread_info->cpu = cpu_id;
+ task_thread_info(idle)->cpu = cpu_id;

/*
* Send Startup IPI
Index: linux-2.6-mm/arch/m68k/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/m68k/kernel/process.c 2005-05-31 01:18:59.126022450 +0200
+++ linux-2.6-mm/arch/m68k/kernel/process.c 2005-05-31 01:20:37.349149813 +0200
@@ -245,7 +245,7 @@ int copy_thread(int nr, unsigned long cl
unsigned long stack_offset, *retp;

stack_offset = THREAD_SIZE - sizeof(struct pt_regs);
- childregs = (struct pt_regs *) ((unsigned long) (p->thread_info) + stack_offset);
+ childregs = (struct pt_regs *) ((unsigned long)p->stack + stack_offset);

*childregs = *regs;
childregs->d0 = 0;
@@ -390,7 +390,7 @@ unsigned long get_wchan(struct task_stru
if (!p || p == current || p->state == TASK_RUNNING)
return 0;

- stack_page = (unsigned long)(p->thread_info);
+ stack_page = (unsigned long)p->stack;
fp = ((struct switch_stack *)p->thread.ksp)->a6;
do {
if (fp < stack_page+sizeof(struct thread_info) ||
Index: linux-2.6-mm/arch/m68knommu/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/m68knommu/kernel/process.c 2005-05-31 01:18:59.126022450 +0200
+++ linux-2.6-mm/arch/m68knommu/kernel/process.c 2005-05-31 01:20:37.349149813 +0200
@@ -200,7 +200,7 @@ int copy_thread(int nr, unsigned long cl
unsigned long stack_offset, *retp;

stack_offset = THREAD_SIZE - sizeof(struct pt_regs);
- childregs = (struct pt_regs *) ((unsigned long) p->thread_info + stack_offset);
+ childregs = (struct pt_regs *) ((unsigned long)p->stack + stack_offset);

*childregs = *regs;
childregs->d0 = 0;
Index: linux-2.6-mm/arch/mips/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/mips/kernel/process.c 2005-05-31 01:18:59.126022450 +0200
+++ linux-2.6-mm/arch/mips/kernel/process.c 2005-05-31 01:20:37.350149642 +0200
@@ -94,7 +94,7 @@ void flush_thread(void)
int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
unsigned long unused, struct task_struct *p, struct pt_regs *regs)
{
- struct thread_info *ti = p->thread_info;
+ struct thread_info *ti = task_thread_info(p);
struct pt_regs *childregs;
long childksp;

Index: linux-2.6-mm/arch/mips/kernel/ptrace.c
===================================================================
--- linux-2.6-mm.orig/arch/mips/kernel/ptrace.c 2005-05-31 01:18:59.127022278 +0200
+++ linux-2.6-mm/arch/mips/kernel/ptrace.c 2005-05-31 01:20:37.350149642 +0200
@@ -112,7 +112,7 @@ asmlinkage int sys_ptrace(long request,
struct pt_regs *regs;
unsigned long tmp = 0;

- regs = (struct pt_regs *) ((unsigned long) child->thread_info +
+ regs = (struct pt_regs *) ((unsigned long)child->stack +
THREAD_SIZE - 32 - sizeof(struct pt_regs));
ret = 0; /* Default return value. */

@@ -197,7 +197,7 @@ asmlinkage int sys_ptrace(long request,
case PTRACE_POKEUSR: {
struct pt_regs *regs;
ret = 0;
- regs = (struct pt_regs *) ((unsigned long) child->thread_info +
+ regs = (struct pt_regs *) ((unsigned long)child->stack +
THREAD_SIZE - 32 - sizeof(struct pt_regs));

switch (addr) {
Index: linux-2.6-mm/arch/mips/kernel/ptrace32.c
===================================================================
--- linux-2.6-mm.orig/arch/mips/kernel/ptrace32.c 2005-05-31 01:18:59.127022278 +0200
+++ linux-2.6-mm/arch/mips/kernel/ptrace32.c 2005-05-31 01:20:37.350149642 +0200
@@ -104,7 +104,7 @@ asmlinkage int sys32_ptrace(int request,
struct pt_regs *regs;
unsigned int tmp;

- regs = (struct pt_regs *) ((unsigned long) child->thread_info +
+ regs = (struct pt_regs *) ((unsigned long)child->stack +
THREAD_SIZE - 32 - sizeof(struct pt_regs));
ret = 0; /* Default return value. */

@@ -184,7 +184,7 @@ asmlinkage int sys32_ptrace(int request,
case PTRACE_POKEUSR: {
struct pt_regs *regs;
ret = 0;
- regs = (struct pt_regs *) ((unsigned long) child->thread_info +
+ regs = (struct pt_regs *) ((unsigned long)child->stack +
THREAD_SIZE - 32 - sizeof(struct pt_regs));

switch (addr) {
Index: linux-2.6-mm/arch/mips/pmc-sierra/yosemite/smp.c
===================================================================
--- linux-2.6-mm.orig/arch/mips/pmc-sierra/yosemite/smp.c 2005-05-31 01:18:59.127022278 +0200
+++ linux-2.6-mm/arch/mips/pmc-sierra/yosemite/smp.c 2005-05-31 01:20:37.350149642 +0200
@@ -93,7 +93,7 @@ void __init prom_prepare_cpus(unsigned i
*/
void prom_boot_secondary(int cpu, struct task_struct *idle)
{
- unsigned long gp = (unsigned long) idle->thread_info;
+ unsigned long gp = (unsigned long)idle->stack;
unsigned long sp = gp + THREAD_SIZE - 32;

secondary_sp = sp;
Index: linux-2.6-mm/arch/mips/sgi-ip27/ip27-smp.c
===================================================================
--- linux-2.6-mm.orig/arch/mips/sgi-ip27/ip27-smp.c 2005-05-31 01:18:59.127022278 +0200
+++ linux-2.6-mm/arch/mips/sgi-ip27/ip27-smp.c 2005-05-31 01:20:37.351149470 +0200
@@ -177,7 +177,7 @@ void __init prom_prepare_cpus(unsigned i
*/
void __init prom_boot_secondary(int cpu, struct task_struct *idle)
{
- unsigned long gp = (unsigned long) idle->thread_info;
+ unsigned long gp = (unsigned long)idle->stack;
unsigned long sp = gp + THREAD_SIZE - 32;

LAUNCH_SLAVE(cputonasid(cpu),cputoslice(cpu),
Index: linux-2.6-mm/arch/mips/sibyte/cfe/smp.c
===================================================================
--- linux-2.6-mm.orig/arch/mips/sibyte/cfe/smp.c 2005-05-31 01:18:59.127022278 +0200
+++ linux-2.6-mm/arch/mips/sibyte/cfe/smp.c 2005-05-31 01:20:37.351149470 +0200
@@ -60,7 +60,7 @@ void prom_boot_secondary(int cpu, struct

retval = cfe_cpu_start(cpu_logical_map(cpu), &smp_bootstrap,
__KSTK_TOS(idle),
- (unsigned long)idle->thread_info, 0);
+ (unsigned long)task_thread_info(idle), 0);
if (retval != 0)
printk("cfe_start_cpu(%i) returned %i\n" , cpu, retval);
}
Index: linux-2.6-mm/arch/parisc/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/parisc/kernel/process.c 2005-05-31 01:18:59.127022278 +0200
+++ linux-2.6-mm/arch/parisc/kernel/process.c 2005-05-31 01:20:37.351149470 +0200
@@ -277,7 +277,7 @@ copy_thread(int nr, unsigned long clone_
struct task_struct * p, struct pt_regs * pregs)
{
struct pt_regs * cregs = &(p->thread.regs);
- struct thread_info *ti = p->thread_info;
+ struct thread_info *ti = task_thread_info(p);

/* We have to use void * instead of a function pointer, because
* function pointers aren't a pointer to the function on 64-bit.
Index: linux-2.6-mm/arch/parisc/kernel/smp.c
===================================================================
--- linux-2.6-mm.orig/arch/parisc/kernel/smp.c 2005-05-31 01:18:59.127022278 +0200
+++ linux-2.6-mm/arch/parisc/kernel/smp.c 2005-05-31 01:20:37.352149298 +0200
@@ -506,7 +506,7 @@ int __init smp_boot_one_cpu(int cpuid)
if (IS_ERR(idle))
panic("SMP: fork failed for CPU:%d", cpuid);

- idle->thread_info->cpu = cpuid;
+ task_thread_info(idle)->cpu = cpuid;

/* Let _start know what logical CPU we're booting
** (offset into init_tasks[],cpu_data[])
Index: linux-2.6-mm/arch/ppc/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/ppc/kernel/process.c 2005-05-31 01:18:59.127022278 +0200
+++ linux-2.6-mm/arch/ppc/kernel/process.c 2005-05-31 01:20:37.352149298 +0200
@@ -325,7 +325,7 @@ void show_regs(struct pt_regs * regs)
if (trap == 0x300 || trap == 0x600)
printk("DAR: %08lX, DSISR: %08lX\n", regs->dar, regs->dsisr);
printk("TASK = %p[%d] '%s' THREAD: %p\n",
- current, current->pid, current->comm, current->thread_info);
+ current, current->pid, current->comm, task_thread_info(current));
printk("Last syscall: %ld ", current->thread.last_syscall);

#ifdef CONFIG_SMP
@@ -420,7 +420,7 @@ copy_thread(int nr, unsigned long clone_
{
struct pt_regs *childregs, *kregs;
extern void ret_from_fork(void);
- unsigned long sp = (unsigned long)p->thread_info + THREAD_SIZE;
+ unsigned long sp = (unsigned long)p->stack + THREAD_SIZE;
unsigned long childframe;

CHECK_FULL_REGS(regs);
@@ -638,8 +638,8 @@ void show_stack(struct task_struct *tsk,
sp = tsk->thread.ksp;
}

- prev_sp = (unsigned long) (tsk->thread_info + 1);
- stack_top = (unsigned long) tsk->thread_info + THREAD_SIZE;
+ prev_sp = (unsigned long)end_of_stack(tsk);
+ stack_top = (unsigned long)tsk->stack + THREAD_SIZE;
while (count < 16 && sp > prev_sp && sp < stack_top && (sp & 3) == 0) {
if (count == 0) {
printk("Call trace:");
@@ -768,7 +768,7 @@ void __init ll_puts(const char *s)
unsigned long get_wchan(struct task_struct *p)
{
unsigned long ip, sp;
- unsigned long stack_page = (unsigned long) p->thread_info;
+ unsigned long stack_page = (unsigned long)p->stack;
int count = 0;
if (!p || p == current || p->state == TASK_RUNNING)
return 0;
Index: linux-2.6-mm/arch/ppc/kernel/smp.c
===================================================================
--- linux-2.6-mm.orig/arch/ppc/kernel/smp.c 2005-05-31 01:18:59.127022278 +0200
+++ linux-2.6-mm/arch/ppc/kernel/smp.c 2005-05-31 01:20:37.352149298 +0200
@@ -356,8 +356,8 @@ int __cpu_up(unsigned int cpu)
p = fork_idle(cpu);
if (IS_ERR(p))
panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p));
- secondary_ti = p->thread_info;
- p->thread_info->cpu = cpu;
+ secondary_ti = task_thread_info(p);
+ task_thread_info(p)->cpu = cpu;

/*
* There was a cache flush loop here to flush the cache
Index: linux-2.6-mm/arch/ppc64/kernel/pSeries_smp.c
===================================================================
--- linux-2.6-mm.orig/arch/ppc64/kernel/pSeries_smp.c 2005-05-31 01:18:59.127022278 +0200
+++ linux-2.6-mm/arch/ppc64/kernel/pSeries_smp.c 2005-05-31 01:20:37.353149126 +0200
@@ -278,7 +278,7 @@ static inline int __devinit smp_startup_
pcpu = get_hard_smp_processor_id(lcpu);

/* Fixup atomic count: it exited inside IRQ handler. */
- paca[lcpu].__current->thread_info->preempt_count = 0;
+ task_thread_info(paca[lcpu].__current)->preempt_count = 0;

status = rtas_call(rtas_token("start-cpu"), 3, 1, NULL,
pcpu, start_here, lcpu);
Index: linux-2.6-mm/arch/ppc64/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/ppc64/kernel/process.c 2005-05-31 01:18:59.127022278 +0200
+++ linux-2.6-mm/arch/ppc64/kernel/process.c 2005-05-31 01:20:37.353149126 +0200
@@ -279,7 +279,7 @@ void show_regs(struct pt_regs * regs)
trap = TRAP(regs);
printk("DAR: %016lx DSISR: %016lx\n", regs->dar, regs->dsisr);
printk("TASK: %p[%d] '%s' THREAD: %p",
- current, current->pid, current->comm, current->thread_info);
+ current, current->pid, current->comm, task_thread_info(current));

#ifdef CONFIG_SMP
printk(" CPU: %d", smp_processor_id());
@@ -363,7 +363,7 @@ copy_thread(int nr, unsigned long clone_
{
struct pt_regs *childregs, *kregs;
extern void ret_from_fork(void);
- unsigned long sp = (unsigned long)p->thread_info + THREAD_SIZE;
+ unsigned long sp = (unsigned long)p->stack + THREAD_SIZE;

/* Copy registers */
sp -= sizeof(struct pt_regs);
@@ -373,9 +373,9 @@ copy_thread(int nr, unsigned long clone_
/* for kernel thread, set stackptr in new task */
childregs->gpr[1] = sp + sizeof(struct pt_regs);
p->thread.regs = NULL; /* no user register state */
- clear_ti_thread_flag(p->thread_info, TIF_32BIT);
+ clear_ti_thread_flag(task_thread_info(p), TIF_32BIT);
#ifdef CONFIG_PPC_ISERIES
- set_ti_thread_flag(p->thread_info, TIF_RUN_LIGHT);
+ set_ti_thread_flag(task_thread_info(p), TIF_RUN_LIGHT);
#endif
} else {
childregs->gpr[1] = usp;
@@ -455,7 +455,7 @@ void start_thread(struct pt_regs *regs,
* set. Do it now.
*/
if (!current->thread.regs) {
- unsigned long childregs = (unsigned long)current->thread_info +
+ unsigned long childregs = (unsigned long)current->stack +
THREAD_SIZE;
childregs -= sizeof(struct pt_regs);
current->thread.regs = (struct pt_regs *)childregs;
@@ -579,7 +579,7 @@ static int kstack_depth_to_print = 64;
static int validate_sp(unsigned long sp, struct task_struct *p,
unsigned long nbytes)
{
- unsigned long stack_page = (unsigned long)p->thread_info;
+ unsigned long stack_page = (unsigned long)p->stack;

if (sp >= stack_page + sizeof(struct thread_struct)
&& sp <= stack_page + THREAD_SIZE - nbytes)
Index: linux-2.6-mm/arch/ppc64/kernel/smp.c
===================================================================
--- linux-2.6-mm.orig/arch/ppc64/kernel/smp.c 2005-05-31 01:18:59.127022278 +0200
+++ linux-2.6-mm/arch/ppc64/kernel/smp.c 2005-05-31 01:20:37.354148955 +0200
@@ -355,7 +355,7 @@ static void __init smp_create_idle(unsig
if (IS_ERR(p))
panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p));
paca[cpu].__current = p;
- current_set[cpu] = p->thread_info;
+ current_set[cpu] = task_thread_info(p);
}

void __init smp_prepare_cpus(unsigned int max_cpus)
@@ -402,7 +402,7 @@ void __devinit smp_prepare_boot_cpu(void
cpu_set(boot_cpuid, cpu_online_map);

paca[boot_cpuid].__current = current;
- current_set[boot_cpuid] = current->thread_info;
+ current_set[boot_cpuid] = task_thread_info(current);
}

#ifdef CONFIG_HOTPLUG_CPU
Index: linux-2.6-mm/arch/ppc64/kernel/sys_ppc32.c
===================================================================
--- linux-2.6-mm.orig/arch/ppc64/kernel/sys_ppc32.c 2005-05-31 01:18:59.128022107 +0200
+++ linux-2.6-mm/arch/ppc64/kernel/sys_ppc32.c 2005-05-31 01:20:37.354148955 +0200
@@ -645,7 +645,7 @@ void start_thread32(struct pt_regs* regs
* set. Do it now.
*/
if (!current->thread.regs) {
- unsigned long childregs = (unsigned long)current->thread_info +
+ unsigned long childregs = (unsigned long)current->stack +
THREAD_SIZE;
childregs -= sizeof(struct pt_regs);
current->thread.regs = (struct pt_regs *)childregs;
Index: linux-2.6-mm/arch/s390/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/s390/kernel/process.c 2005-05-31 01:18:59.128022107 +0200
+++ linux-2.6-mm/arch/s390/kernel/process.c 2005-05-31 01:20:37.355148783 +0200
@@ -169,7 +169,7 @@ void show_regs(struct pt_regs *regs)
{
struct task_struct *tsk = current;

- printk("CPU: %d %s\n", tsk->thread_info->cpu, print_tainted());
+ printk("CPU: %d %s\n", task_thread_info(tsk)->cpu, print_tainted());
printk("Process %s (pid: %d, task: %p, ksp: %p)\n",
current->comm, current->pid, (void *) tsk,
(void *) tsk->thread.ksp);
@@ -234,7 +234,7 @@ int copy_thread(int nr, unsigned long cl
} *frame;

frame = ((struct fake_frame *)
- (THREAD_SIZE + (unsigned long) p->thread_info)) - 1;
+ (THREAD_SIZE + (unsigned long)p->stack)) - 1;
p->thread.ksp = (unsigned long) frame;
/* Store access registers to kernel stack of new process. */
frame->childregs = *regs;
@@ -395,11 +395,11 @@ unsigned long get_wchan(struct task_stru
unsigned long return_address;
int count;

- if (!p || p == current || p->state == TASK_RUNNING || !p->thread_info)
+ if (!p || p == current || p->state == TASK_RUNNING || !task_thread_info(p))
return 0;
- low = (struct stack_frame *) p->thread_info;
+ low = (struct stack_frame *)p->stack;
high = (struct stack_frame *)
- ((unsigned long) p->thread_info + THREAD_SIZE) - 1;
+ ((unsigned long)p->stack + THREAD_SIZE) - 1;
sf = (struct stack_frame *) (p->thread.ksp & PSW_ADDR_INSN);
if (sf <= low || sf > high)
return 0;
Index: linux-2.6-mm/arch/s390/kernel/smp.c
===================================================================
--- linux-2.6-mm.orig/arch/s390/kernel/smp.c 2005-05-31 01:18:59.128022107 +0200
+++ linux-2.6-mm/arch/s390/kernel/smp.c 2005-05-31 01:20:37.355148783 +0200
@@ -652,7 +652,7 @@ __cpu_up(unsigned int cpu)
idle = current_set[cpu];
cpu_lowcore = lowcore_ptr[cpu];
cpu_lowcore->kernel_stack = (unsigned long)
- idle->thread_info + (THREAD_SIZE);
+ idle->stack + THREAD_SIZE;
sf = (struct stack_frame *) (cpu_lowcore->kernel_stack
- sizeof(struct pt_regs)
- sizeof(struct stack_frame));
Index: linux-2.6-mm/arch/s390/kernel/traps.c
===================================================================
--- linux-2.6-mm.orig/arch/s390/kernel/traps.c 2005-05-31 01:18:59.128022107 +0200
+++ linux-2.6-mm/arch/s390/kernel/traps.c 2005-05-31 01:20:37.356148611 +0200
@@ -136,8 +136,8 @@ void show_trace(struct task_struct *task
sp = __show_trace(sp, S390_lowcore.async_stack - ASYNC_SIZE,
S390_lowcore.async_stack);
if (task)
- __show_trace(sp, (unsigned long) task->thread_info,
- (unsigned long) task->thread_info + THREAD_SIZE);
+ __show_trace(sp, (unsigned long)task->stack,
+ (unsigned long)task->stack + THREAD_SIZE);
else
__show_trace(sp, S390_lowcore.thread_info,
S390_lowcore.thread_info + THREAD_SIZE);
Index: linux-2.6-mm/arch/sh/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/sh/kernel/process.c 2005-05-31 01:18:59.128022107 +0200
+++ linux-2.6-mm/arch/sh/kernel/process.c 2005-05-31 01:20:37.356148611 +0200
@@ -202,7 +202,7 @@ void flush_thread(void)
#if defined(CONFIG_SH_FPU)
struct task_struct *tsk = current;
struct pt_regs *regs = (struct pt_regs *)
- ((unsigned long)tsk->thread_info
+ ((unsigned long)tsk->stack
+ THREAD_SIZE - sizeof(struct pt_regs)
- sizeof(unsigned long));

@@ -243,7 +243,7 @@ int dump_task_regs(struct task_struct *t
struct pt_regs ptregs;

ptregs = *(struct pt_regs *)
- ((unsigned long)tsk->thread_info + THREAD_SIZE
+ ((unsigned long)tsk->stack + THREAD_SIZE
- sizeof(struct pt_regs)
#ifdef CONFIG_SH_DSP
- sizeof(struct pt_dspregs)
@@ -263,7 +263,7 @@ dump_task_fpu (struct task_struct *tsk,
fpvalid = !!tsk_used_math(tsk);
if (fpvalid) {
struct pt_regs *regs = (struct pt_regs *)
- ((unsigned long)tsk->thread_info
+ ((unsigned long)tsk->stack
+ THREAD_SIZE - sizeof(struct pt_regs)
- sizeof(unsigned long));
unlazy_fpu(tsk, regs);
@@ -290,7 +290,7 @@ int copy_thread(int nr, unsigned long cl
#endif

childregs = ((struct pt_regs *)
- (THREAD_SIZE + (unsigned long) p->thread_info)
+ (THREAD_SIZE + (unsigned long)p->stack)
#ifdef CONFIG_SH_DSP
- sizeof(struct pt_dspregs)
#endif
@@ -300,7 +300,7 @@ int copy_thread(int nr, unsigned long cl
if (user_mode(regs)) {
childregs->regs[15] = usp;
} else {
- childregs->regs[15] = (unsigned long)p->thread_info + THREAD_SIZE;
+ childregs->regs[15] = (unsigned long)p->stack + THREAD_SIZE;
}
if (clone_flags & CLONE_SETTLS) {
childregs->gbr = childregs->regs[0];
@@ -364,7 +364,7 @@ struct task_struct *__switch_to(struct t
{
#if defined(CONFIG_SH_FPU)
struct pt_regs *regs = (struct pt_regs *)
- ((unsigned long)prev->thread_info
+ ((unsigned long)prev->stack
+ THREAD_SIZE - sizeof(struct pt_regs)
- sizeof(unsigned long));
unlazy_fpu(prev, regs);
@@ -377,7 +377,7 @@ struct task_struct *__switch_to(struct t

local_irq_save(flags);
regs = (struct pt_regs *)
- ((unsigned long)prev->thread_info
+ ((unsigned long)prev->stack
+ THREAD_SIZE - sizeof(struct pt_regs)
#ifdef CONFIG_SH_DSP
- sizeof(struct pt_dspregs)
@@ -402,7 +402,7 @@ struct task_struct *__switch_to(struct t
*/
asm volatile("ldc %0, r7_bank"
: /* no output */
- : "r" (next->thread_info));
+ : "r" (task_thread_info(next)));

#ifdef CONFIG_MMU
/* If no tasks are using the UBC, we're done */
Index: linux-2.6-mm/arch/sh/kernel/ptrace.c
===================================================================
--- linux-2.6-mm.orig/arch/sh/kernel/ptrace.c 2005-05-31 01:18:59.128022107 +0200
+++ linux-2.6-mm/arch/sh/kernel/ptrace.c 2005-05-31 01:20:37.356148611 +0200
@@ -42,7 +42,7 @@ static inline int get_stack_long(struct
unsigned char *stack;

stack = (unsigned char *)
- task->thread_info + THREAD_SIZE - sizeof(struct pt_regs)
+ task->stack + THREAD_SIZE - sizeof(struct pt_regs)
#ifdef CONFIG_SH_DSP
- sizeof(struct pt_dspregs)
#endif
@@ -60,7 +60,7 @@ static inline int put_stack_long(struct
unsigned char *stack;

stack = (unsigned char *)
- task->thread_info + THREAD_SIZE - sizeof(struct pt_regs)
+ task->stack + THREAD_SIZE - sizeof(struct pt_regs)
#ifdef CONFIG_SH_DSP
- sizeof(struct pt_dspregs)
#endif
Index: linux-2.6-mm/arch/sh/kernel/smp.c
===================================================================
--- linux-2.6-mm.orig/arch/sh/kernel/smp.c 2005-05-31 01:18:59.128022107 +0200
+++ linux-2.6-mm/arch/sh/kernel/smp.c 2005-05-31 01:20:37.357148439 +0200
@@ -100,7 +100,7 @@ int __cpu_up(unsigned int cpu)
if (IS_ERR(tsk))
panic("Failed forking idle task for cpu %d\n", cpu);

- tsk->thread_info->cpu = cpu;
+ task_thread_info(tsk)->cpu = cpu;

cpu_set(cpu, cpu_online_map);

Index: linux-2.6-mm/arch/sh64/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/sh64/kernel/process.c 2005-05-31 01:18:59.128022107 +0200
+++ linux-2.6-mm/arch/sh64/kernel/process.c 2005-05-31 01:20:37.357148439 +0200
@@ -750,7 +750,7 @@ int copy_thread(int nr, unsigned long cl
}
#endif
/* Copy from sh version */
- childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long) p->thread_info )) - 1;
+ childregs = ((struct pt_regs *)(THREAD_SIZE + (unsigned long)p->stack)) - 1;

*childregs = *regs;

@@ -758,7 +758,7 @@ int copy_thread(int nr, unsigned long cl
childregs->regs[15] = usp;
p->thread.uregs = childregs;
} else {
- childregs->regs[15] = (unsigned long)p->thread_info + THREAD_SIZE;
+ childregs->regs[15] = (unsigned long)p->stack + THREAD_SIZE;
}

childregs->regs[9] = 0; /* Set return value for child */
Index: linux-2.6-mm/arch/sh64/lib/dbg.c
===================================================================
--- linux-2.6-mm.orig/arch/sh64/lib/dbg.c 2005-05-31 01:18:59.128022107 +0200
+++ linux-2.6-mm/arch/sh64/lib/dbg.c 2005-05-31 01:20:37.357148439 +0200
@@ -174,7 +174,7 @@ void evt_debug(int evt, int ret_addr, in
struct ring_node *rr;

pid = current->pid;
- stack_bottom = (unsigned long) current->thread_info;
+ stack_bottom = (unsigned long)current->stack;
asm volatile("ori r15, 0, %0" : "=r" (sp));
rr = event_ring + event_ptr;
rr->evt = evt;
Index: linux-2.6-mm/arch/sparc/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/sparc/kernel/process.c 2005-05-31 01:18:59.128022107 +0200
+++ linux-2.6-mm/arch/sparc/kernel/process.c 2005-05-31 01:20:37.358148268 +0200
@@ -309,7 +309,7 @@ void show_stack(struct task_struct *tsk,
int count = 0;

if (tsk != NULL)
- task_base = (unsigned long) tsk->thread_info;
+ task_base = (unsigned long)tsk->stack;
else
task_base = (unsigned long) current_thread_info();

@@ -344,7 +344,7 @@ EXPORT_SYMBOL(dump_stack);
*/
unsigned long thread_saved_pc(struct task_struct *tsk)
{
- return tsk->thread_info->kpc;
+ return task_thread_info(tsk)->kpc;
}

/*
@@ -399,7 +399,7 @@ void flush_thread(void)
/* We must fixup kregs as well. */
/* XXX This was not fixed for ti for a while, worked. Unused? */
current->thread.kregs = (struct pt_regs *)
- ((char *)current->thread_info + (THREAD_SIZE - TRACEREG_SZ));
+ ((char *)current->stack + (THREAD_SIZE - TRACEREG_SZ));
}
}

@@ -466,7 +466,7 @@ int copy_thread(int nr, unsigned long cl
unsigned long unused,
struct task_struct *p, struct pt_regs *regs)
{
- struct thread_info *ti = p->thread_info;
+ struct thread_info *ti = task_thread_info(p);
struct pt_regs *childregs;
char *new_stack;

@@ -731,7 +731,7 @@ unsigned long get_wchan(struct task_stru
task->state == TASK_RUNNING)
goto out;

- fp = task->thread_info->ksp + bias;
+ fp = task_thread_info(task)->ksp + bias;
do {
/* Bogus frame pointer? */
if (fp < (task_base + sizeof(struct thread_info)) ||
Index: linux-2.6-mm/arch/sparc/kernel/ptrace.c
===================================================================
--- linux-2.6-mm.orig/arch/sparc/kernel/ptrace.c 2005-05-31 01:18:59.128022107 +0200
+++ linux-2.6-mm/arch/sparc/kernel/ptrace.c 2005-05-31 01:20:37.358148268 +0200
@@ -75,7 +75,7 @@ static inline void read_sunos_user(struc
struct task_struct *tsk, long __user *addr)
{
struct pt_regs *cregs = tsk->thread.kregs;
- struct thread_info *t = tsk->thread_info;
+ struct thread_info *t = task_thread_info(tsk);
int v;

if(offset >= 1024)
@@ -170,7 +170,7 @@ static inline void write_sunos_user(stru
struct task_struct *tsk)
{
struct pt_regs *cregs = tsk->thread.kregs;
- struct thread_info *t = tsk->thread_info;
+ struct thread_info *t = task_thread_info(tsk);
unsigned long value = regs->u_regs[UREG_I3];

if(offset >= 1024)
Index: linux-2.6-mm/arch/sparc/kernel/sun4d_smp.c
===================================================================
--- linux-2.6-mm.orig/arch/sparc/kernel/sun4d_smp.c 2005-05-31 01:18:59.128022107 +0200
+++ linux-2.6-mm/arch/sparc/kernel/sun4d_smp.c 2005-05-31 01:20:37.359148096 +0200
@@ -200,7 +200,7 @@ void __init smp4d_boot_cpus(void)
/* Cook up an idler for this guy. */
p = fork_idle(i);
cpucount++;
- current_set[i] = p->thread_info;
+ current_set[i] = task_thread_info(p);
for (no = 0; !cpu_find_by_instance(no, NULL, &mid)
&& mid != i; no++) ;

Index: linux-2.6-mm/arch/sparc/kernel/sun4m_smp.c
===================================================================
--- linux-2.6-mm.orig/arch/sparc/kernel/sun4m_smp.c 2005-05-31 01:18:59.129021935 +0200
+++ linux-2.6-mm/arch/sparc/kernel/sun4m_smp.c 2005-05-31 01:20:37.359148096 +0200
@@ -173,7 +173,7 @@ void __init smp4m_boot_cpus(void)
/* Cook up an idler for this guy. */
p = fork_idle(i);
cpucount++;
- current_set[i] = p->thread_info;
+ current_set[i] = task_thread_info(p);
/* See trampoline.S for details... */
entry += ((i-1) * 3);

Index: linux-2.6-mm/arch/sparc/kernel/traps.c
===================================================================
--- linux-2.6-mm.orig/arch/sparc/kernel/traps.c 2005-05-31 01:18:59.129021935 +0200
+++ linux-2.6-mm/arch/sparc/kernel/traps.c 2005-05-31 01:20:37.359148096 +0200
@@ -291,7 +291,7 @@ void do_fpe_trap(struct pt_regs *regs, u
#ifndef CONFIG_SMP
if(!fpt) {
#else
- if(!(fpt->thread_info->flags & _TIF_USEDFPU)) {
+ if(!(task_thread_info(fpt)->flags & _TIF_USEDFPU)) {
#endif
fpsave(&fake_regs[0], &fake_fsr, &fake_queue[0], &fake_depth);
regs->psr &= ~PSR_EF;
@@ -334,7 +334,7 @@ void do_fpe_trap(struct pt_regs *regs, u
/* nope, better SIGFPE the offending process... */

#ifdef CONFIG_SMP
- fpt->thread_info->flags &= ~_TIF_USEDFPU;
+ task_thread_info(fpt)->flags &= ~_TIF_USEDFPU;
#endif
if(psr & PSR_PS) {
/* The first fsr store/load we tried trapped,
Index: linux-2.6-mm/arch/sparc64/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/sparc64/kernel/process.c 2005-05-31 01:18:59.129021935 +0200
+++ linux-2.6-mm/arch/sparc64/kernel/process.c 2005-05-31 01:20:37.360147924 +0200
@@ -382,7 +382,7 @@ void show_regs32(struct pt_regs32 *regs)

unsigned long thread_saved_pc(struct task_struct *tsk)
{
- struct thread_info *ti = tsk->thread_info;
+ struct thread_info *ti = task_thread_info(tsk);
unsigned long ret = 0xdeadbeefUL;

if (ti && ti->ksp) {
@@ -608,7 +608,7 @@ int copy_thread(int nr, unsigned long cl
unsigned long unused,
struct task_struct *p, struct pt_regs *regs)
{
- struct thread_info *t = p->thread_info;
+ struct thread_info *t = task_thread_info(p);
char *child_trap_frame;

#ifdef CONFIG_DEBUG_SPINLOCK
@@ -842,9 +842,9 @@ unsigned long get_wchan(struct task_stru
task->state == TASK_RUNNING)
goto out;

- thread_info_base = (unsigned long) task->thread_info;
+ thread_info_base = (unsigned long)task->stack;
bias = STACK_BIAS;
- fp = task->thread_info->ksp + bias;
+ fp = task_thread_info(task)->ksp + bias;

do {
/* Bogus frame pointer? */
Index: linux-2.6-mm/arch/sparc64/kernel/ptrace.c
===================================================================
--- linux-2.6-mm.orig/arch/sparc64/kernel/ptrace.c 2005-05-31 01:18:59.129021935 +0200
+++ linux-2.6-mm/arch/sparc64/kernel/ptrace.c 2005-05-31 01:20:37.361147752 +0200
@@ -309,7 +309,7 @@ asmlinkage void do_ptrace(struct pt_regs
case PTRACE_GETREGS: {
struct pt_regs32 __user *pregs =
(struct pt_regs32 __user *) addr;
- struct pt_regs *cregs = child->thread_info->kregs;
+ struct pt_regs *cregs = task_thread_info(child)->kregs;
int rval;

if (__put_user(tstate_to_psr(cregs->tstate), (&pregs->psr)) ||
@@ -333,11 +333,11 @@ asmlinkage void do_ptrace(struct pt_regs

case PTRACE_GETREGS64: {
struct pt_regs __user *pregs = (struct pt_regs __user *) addr;
- struct pt_regs *cregs = child->thread_info->kregs;
+ struct pt_regs *cregs = task_thread_info(child)->kregs;
unsigned long tpc = cregs->tpc;
int rval;

- if ((child->thread_info->flags & _TIF_32BIT) != 0)
+ if ((task_thread_info(child)->flags & _TIF_32BIT) != 0)
tpc &= 0xffffffff;
if (__put_user(cregs->tstate, (&pregs->tstate)) ||
__put_user(tpc, (&pregs->tpc)) ||
@@ -361,7 +361,7 @@ asmlinkage void do_ptrace(struct pt_regs
case PTRACE_SETREGS: {
struct pt_regs32 __user *pregs =
(struct pt_regs32 __user *) addr;
- struct pt_regs *cregs = child->thread_info->kregs;
+ struct pt_regs *cregs = task_thread_info(child)->kregs;
unsigned int psr, pc, npc, y;
int i;

@@ -394,7 +394,7 @@ asmlinkage void do_ptrace(struct pt_regs

case PTRACE_SETREGS64: {
struct pt_regs __user *pregs = (struct pt_regs __user *) addr;
- struct pt_regs *cregs = child->thread_info->kregs;
+ struct pt_regs *cregs = task_thread_info(child)->kregs;
unsigned long tstate, tpc, tnpc, y;
int i;

@@ -408,7 +408,7 @@ asmlinkage void do_ptrace(struct pt_regs
pt_error_return(regs, EFAULT);
goto out_tsk;
}
- if ((child->thread_info->flags & _TIF_32BIT) != 0) {
+ if ((task_thread_info(child)->flags & _TIF_32BIT) != 0) {
tpc &= 0xffffffff;
tnpc &= 0xffffffff;
}
@@ -443,11 +443,11 @@ asmlinkage void do_ptrace(struct pt_regs
} fpq[16];
};
struct fps __user *fps = (struct fps __user *) addr;
- unsigned long *fpregs = child->thread_info->fpregs;
+ unsigned long *fpregs = task_thread_info(child)->fpregs;

if (copy_to_user(&fps->regs[0], fpregs,
(32 * sizeof(unsigned int))) ||
- __put_user(child->thread_info->xfsr[0], (&fps->fsr)) ||
+ __put_user(task_thread_info(child)->xfsr[0], (&fps->fsr)) ||
__put_user(0, (&fps->fpqd)) ||
__put_user(0, (&fps->flags)) ||
__put_user(0, (&fps->extra)) ||
@@ -465,11 +465,11 @@ asmlinkage void do_ptrace(struct pt_regs
unsigned long fsr;
};
struct fps __user *fps = (struct fps __user *) addr;
- unsigned long *fpregs = child->thread_info->fpregs;
+ unsigned long *fpregs = task_thread_info(child)->fpregs;

if (copy_to_user(&fps->regs[0], fpregs,
(64 * sizeof(unsigned int))) ||
- __put_user(child->thread_info->xfsr[0], (&fps->fsr))) {
+ __put_user(task_thread_info(child)->xfsr[0], (&fps->fsr))) {
pt_error_return(regs, EFAULT);
goto out_tsk;
}
@@ -490,7 +490,7 @@ asmlinkage void do_ptrace(struct pt_regs
} fpq[16];
};
struct fps __user *fps = (struct fps __user *) addr;
- unsigned long *fpregs = child->thread_info->fpregs;
+ unsigned long *fpregs = task_thread_info(child)->fpregs;
unsigned fsr;

if (copy_from_user(fpregs, &fps->regs[0],
@@ -499,11 +499,11 @@ asmlinkage void do_ptrace(struct pt_regs
pt_error_return(regs, EFAULT);
goto out_tsk;
}
- child->thread_info->xfsr[0] &= 0xffffffff00000000UL;
- child->thread_info->xfsr[0] |= fsr;
- if (!(child->thread_info->fpsaved[0] & FPRS_FEF))
- child->thread_info->gsr[0] = 0;
- child->thread_info->fpsaved[0] |= (FPRS_FEF | FPRS_DL);
+ task_thread_info(child)->xfsr[0] &= 0xffffffff00000000UL;
+ task_thread_info(child)->xfsr[0] |= fsr;
+ if (!(task_thread_info(child)->fpsaved[0] & FPRS_FEF))
+ task_thread_info(child)->gsr[0] = 0;
+ task_thread_info(child)->fpsaved[0] |= (FPRS_FEF | FPRS_DL);
pt_succ_return(regs, 0);
goto out_tsk;
}
@@ -514,17 +514,17 @@ asmlinkage void do_ptrace(struct pt_regs
unsigned long fsr;
};
struct fps __user *fps = (struct fps __user *) addr;
- unsigned long *fpregs = child->thread_info->fpregs;
+ unsigned long *fpregs = task_thread_info(child)->fpregs;

if (copy_from_user(fpregs, &fps->regs[0],
(64 * sizeof(unsigned int))) ||
- __get_user(child->thread_info->xfsr[0], (&fps->fsr))) {
+ __get_user(task_thread_info(child)->xfsr[0], (&fps->fsr))) {
pt_error_return(regs, EFAULT);
goto out_tsk;
}
- if (!(child->thread_info->fpsaved[0] & FPRS_FEF))
- child->thread_info->gsr[0] = 0;
- child->thread_info->fpsaved[0] |= (FPRS_FEF | FPRS_DL | FPRS_DU);
+ if (!(task_thread_info(child)->fpsaved[0] & FPRS_FEF))
+ task_thread_info(child)->gsr[0] = 0;
+ task_thread_info(child)->fpsaved[0] |= (FPRS_FEF | FPRS_DL | FPRS_DU);
pt_succ_return(regs, 0);
goto out_tsk;
}
@@ -575,8 +575,8 @@ asmlinkage void do_ptrace(struct pt_regs
#ifdef DEBUG_PTRACE
printk("CONT: %s [%d]: set exit_code = %x %lx %lx\n", child->comm,
child->pid, child->exit_code,
- child->thread_info->kregs->tpc,
- child->thread_info->kregs->tnpc);
+ task_thread_info(child)->kregs->tpc,
+ task_thread_info(child)->kregs->tnpc);

#endif
wake_up_process(child);
Index: linux-2.6-mm/arch/sparc64/kernel/setup.c
===================================================================
--- linux-2.6-mm.orig/arch/sparc64/kernel/setup.c 2005-05-31 01:18:59.129021935 +0200
+++ linux-2.6-mm/arch/sparc64/kernel/setup.c 2005-05-31 01:20:37.361147752 +0200
@@ -563,7 +563,7 @@ void __init setup_arch(char **cmdline_p)
rd_doload = ((ram_flags & RAMDISK_LOAD_FLAG) != 0);
#endif

- init_task.thread_info->kregs = &fake_swapper_regs;
+ task_thread_info(&init_task)->kregs = &fake_swapper_regs;

#ifdef CONFIG_IP_PNP
if (!ic_set_manually) {
Index: linux-2.6-mm/arch/sparc64/kernel/smp.c
===================================================================
--- linux-2.6-mm.orig/arch/sparc64/kernel/smp.c 2005-05-31 01:18:59.129021935 +0200
+++ linux-2.6-mm/arch/sparc64/kernel/smp.c 2005-05-31 01:20:37.361147752 +0200
@@ -309,7 +309,7 @@ static int __devinit smp_boot_one_cpu(un

p = fork_idle(cpu);
callin_flag = 0;
- cpu_new_thread = p->thread_info;
+ cpu_new_thread = task_thread_info(p);
cpu_set(cpu, cpu_callout_map);

cpu_find_by_mid(cpu, &cpu_node);
Index: linux-2.6-mm/arch/sparc64/kernel/traps.c
===================================================================
--- linux-2.6-mm.orig/arch/sparc64/kernel/traps.c 2005-05-31 01:18:59.129021935 +0200
+++ linux-2.6-mm/arch/sparc64/kernel/traps.c 2005-05-31 01:20:37.362147581 +0200
@@ -1758,7 +1758,7 @@ static void user_instruction_dump (unsig
void show_stack(struct task_struct *tsk, unsigned long *_ksp)
{
unsigned long pc, fp, thread_base, ksp;
- struct thread_info *tp = tsk->thread_info;
+ struct thread_info *tp = task_thread_info(tsk);
struct reg_window *rw;
int count = 0;

@@ -1812,7 +1812,7 @@ static inline int is_kernel_stack(struct
return 0;
}

- thread_base = (unsigned long) task->thread_info;
+ thread_base = (unsigned long)task->stack;
thread_end = thread_base + sizeof(union thread_union);
if (rw_addr >= thread_base &&
rw_addr < thread_end &&
Index: linux-2.6-mm/arch/um/kernel/process_kern.c
===================================================================
--- linux-2.6-mm.orig/arch/um/kernel/process_kern.c 2005-05-31 01:18:59.129021935 +0200
+++ linux-2.6-mm/arch/um/kernel/process_kern.c 2005-05-31 01:20:37.363147409 +0200
@@ -120,7 +120,7 @@ void set_current(void *t)
{
struct task_struct *task = t;

- cpu_tasks[task->thread_info->cpu] = ((struct cpu_task)
+ cpu_tasks[task_thread_info(task)->cpu] = ((struct cpu_task)
{ external_pid(task), task });
}

@@ -347,7 +347,7 @@ char *uml_strdup(char *string)

void *get_init_task(void)
{
- return(&init_thread_union.thread_info.task);
+ return(&task_thread_info(&init_thread_union)->task);
}

int copy_to_user_proc(void __user *to, void *from, int size)
Index: linux-2.6-mm/arch/um/kernel/skas/process_kern.c
===================================================================
--- linux-2.6-mm.orig/arch/um/kernel/skas/process_kern.c 2005-05-31 01:18:59.129021935 +0200
+++ linux-2.6-mm/arch/um/kernel/skas/process_kern.c 2005-05-31 01:20:37.363147409 +0200
@@ -120,7 +120,7 @@ int copy_thread_skas(int nr, unsigned lo
handler = new_thread_handler;
}

- new_thread(p->thread_info, &p->thread.mode.skas.switch_buf,
+ new_thread(task_thread_info(p), &p->thread.mode.skas.switch_buf,
&p->thread.mode.skas.fork_buf, handler);
return(0);
}
@@ -180,7 +180,7 @@ int start_uml_skas(void)

init_task.thread.request.u.thread.proc = start_kernel_proc;
init_task.thread.request.u.thread.arg = NULL;
- return(start_idle_thread(init_task.thread_info,
+ return(start_idle_thread(task_thread_info(&init_task),
&init_task.thread.mode.skas.switch_buf,
&init_task.thread.mode.skas.fork_buf));
}
Index: linux-2.6-mm/arch/um/kernel/tt/exec_kern.c
===================================================================
--- linux-2.6-mm.orig/arch/um/kernel/tt/exec_kern.c 2005-05-31 01:18:59.129021935 +0200
+++ linux-2.6-mm/arch/um/kernel/tt/exec_kern.c 2005-05-31 01:20:37.363147409 +0200
@@ -40,7 +40,7 @@ void flush_thread_tt(void)
do_exit(SIGKILL);
}

- new_pid = start_fork_tramp(current->thread_info, stack, 0, exec_tramp);
+ new_pid = start_fork_tramp(task_thread_info(current), stack, 0, exec_tramp);
if(new_pid < 0){
printk(KERN_ERR
"flush_thread : new thread failed, errno = %d\n",
Index: linux-2.6-mm/arch/um/kernel/tt/process_kern.c
===================================================================
--- linux-2.6-mm.orig/arch/um/kernel/tt/process_kern.c 2005-05-31 01:18:59.129021935 +0200
+++ linux-2.6-mm/arch/um/kernel/tt/process_kern.c 2005-05-31 01:20:37.364147237 +0200
@@ -42,7 +42,7 @@ void *switch_to_tt(void *prev, void *nex

to->thread.prev_sched = from;

- cpu = from->thread_info->cpu;
+ cpu = task_thread_info(from)->cpu;
if(cpu == 0)
forward_interrupts(to->thread.mode.tt.extern_pid);
#ifdef CONFIG_SMP
@@ -264,7 +264,7 @@ int copy_thread_tt(int nr, unsigned long

clone_flags &= CLONE_VM;
p->thread.temp_stack = stack;
- new_pid = start_fork_tramp(p->thread_info, stack, clone_flags, tramp);
+ new_pid = start_fork_tramp(task_thread_info(p), stack, clone_flags, tramp);
if(new_pid < 0){
printk(KERN_ERR "copy_thread : clone failed - errno = %d\n",
-new_pid);
@@ -354,7 +354,7 @@ int do_proc_op(void *t, int proc_id)
pid = thread->request.u.exec.pid;
do_exec(thread->mode.tt.extern_pid, pid);
thread->mode.tt.extern_pid = pid;
- cpu_tasks[task->thread_info->cpu].pid = pid;
+ cpu_tasks[task_thread_info(task)->cpu].pid = pid;
break;
case OP_FORK:
attach_process(thread->request.u.fork.pid);
@@ -436,7 +436,7 @@ int start_uml_tt(void)
int pages;

pages = (1 << CONFIG_KERNEL_STACK_ORDER);
- sp = (void *) ((unsigned long) init_task.thread_info) +
+ sp = (void *) ((unsigned long) init_task.stack) +
pages * PAGE_SIZE - sizeof(unsigned long);
return(tracer(start_kernel_proc, sp));
}
Index: linux-2.6-mm/arch/v850/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/v850/kernel/process.c 2005-05-31 01:18:59.129021935 +0200
+++ linux-2.6-mm/arch/v850/kernel/process.c 2005-05-31 01:20:37.364147237 +0200
@@ -110,7 +110,7 @@ int copy_thread (int nr, unsigned long c
struct task_struct *p, struct pt_regs *regs)
{
/* Start pushing stuff from the top of the child's kernel stack. */
- unsigned long orig_ksp = (unsigned long)p->thread_info + THREAD_SIZE;
+ unsigned long orig_ksp = (unsigned long)p->stack + THREAD_SIZE;
unsigned long ksp = orig_ksp;
/* We push two `state save' stack fames (see entry.S) on the new
kernel stack:
Index: linux-2.6-mm/arch/x86_64/kernel/i387.c
===================================================================
--- linux-2.6-mm.orig/arch/x86_64/kernel/i387.c 2005-05-31 01:18:59.130021763 +0200
+++ linux-2.6-mm/arch/x86_64/kernel/i387.c 2005-05-31 01:20:37.364147237 +0200
@@ -95,7 +95,7 @@ int save_i387(struct _fpstate __user *bu
if (!used_math())
return 0;
clear_used_math(); /* trigger finit */
- if (tsk->thread_info->status & TS_USEDFPU) {
+ if (task_thread_info(tsk)->status & TS_USEDFPU) {
err = save_i387_checking((struct i387_fxsave_struct __user *)buf);
if (err) return err;
stts();
Index: linux-2.6-mm/arch/x86_64/kernel/i8259.c
===================================================================
--- linux-2.6-mm.orig/arch/x86_64/kernel/i8259.c 2005-05-31 01:18:59.130021763 +0200
+++ linux-2.6-mm/arch/x86_64/kernel/i8259.c 2005-05-31 01:20:37.365147065 +0200
@@ -137,7 +137,7 @@ static void end_8259A_irq (unsigned int
{
if (irq > 256) {
char var;
- printk("return %p stack %p ti %p\n", __builtin_return_address(0), &var, current->thread_info);
+ printk("return %p stack %p ti %p\n", __builtin_return_address(0), &var, task_thread_info(current));

BUG();
}
Index: linux-2.6-mm/arch/x86_64/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/x86_64/kernel/process.c 2005-05-31 01:18:59.130021763 +0200
+++ linux-2.6-mm/arch/x86_64/kernel/process.c 2005-05-31 01:20:37.365147065 +0200
@@ -387,7 +387,7 @@ int copy_thread(int nr, unsigned long cl
struct pt_regs * childregs;
struct task_struct *me = current;

- childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p->thread_info)) - 1;
+ childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long)p->stack)) - 1;

*childregs = *regs;

@@ -401,7 +401,7 @@ int copy_thread(int nr, unsigned long cl
p->thread.rsp0 = (unsigned long) (childregs+1);
p->thread.userrsp = me->thread.userrsp;

- set_ti_thread_flag(p->thread_info, TIF_FORK);
+ set_ti_thread_flag(task_thread_info(p), TIF_FORK);

p->thread.fs = me->thread.fs;
p->thread.gs = me->thread.gs;
@@ -546,7 +546,7 @@ struct task_struct *__switch_to(struct t
prev->userrsp = read_pda(oldrsp);
write_pda(oldrsp, next->userrsp);
write_pda(pcurrent, next_p);
- write_pda(kernelstack, (unsigned long)next_p->thread_info + THREAD_SIZE - PDA_STACKOFFSET);
+ write_pda(kernelstack, (unsigned long)next_p->stack + THREAD_SIZE - PDA_STACKOFFSET);

/*
* Now maybe reload the debug registers
@@ -581,7 +581,7 @@ struct task_struct *__switch_to(struct t
}
}

- disable_tsc(prev_p->thread_info, next_p->thread_info);
+ disable_tsc(task_thread_info(prev_p), task_thread_info(next_p));

perfctr_resume_thread(next);

@@ -662,7 +662,7 @@ unsigned long get_wchan(struct task_stru

if (!p || p == current || p->state==TASK_RUNNING)
return 0;
- stack = (unsigned long)p->thread_info;
+ stack = (unsigned long)p->stack;
if (p->thread.rsp < stack || p->thread.rsp > stack+THREAD_SIZE)
return 0;
fp = *(u64 *)(p->thread.rsp);
Index: linux-2.6-mm/arch/x86_64/kernel/smpboot.c
===================================================================
--- linux-2.6-mm.orig/arch/x86_64/kernel/smpboot.c 2005-05-31 01:18:59.130021763 +0200
+++ linux-2.6-mm/arch/x86_64/kernel/smpboot.c 2005-05-31 01:20:37.366146894 +0200
@@ -654,7 +654,7 @@ static int __cpuinit do_boot_cpu(int cpu
init_rsp = idle->thread.rsp;
per_cpu(init_tss,cpu).rsp0 = init_rsp;
initial_code = start_secondary;
- clear_ti_thread_flag(idle->thread_info, TIF_FORK);
+ clear_ti_thread_flag(task_thread_info(idle), TIF_FORK);

printk(KERN_INFO "Booting processor %d/%d rip %lx rsp %lx\n", cpu, apicid,
start_rip, init_rsp);
Index: linux-2.6-mm/arch/x86_64/kernel/traps.c
===================================================================
--- linux-2.6-mm.orig/arch/x86_64/kernel/traps.c 2005-05-31 01:18:59.130021763 +0200
+++ linux-2.6-mm/arch/x86_64/kernel/traps.c 2005-05-31 01:20:37.366146894 +0200
@@ -287,7 +287,7 @@ void show_registers(struct pt_regs *regs
printk("CPU %d ", cpu);
__show_regs(regs);
printk("Process %s (pid: %d, threadinfo %p, task %p)\n",
- cur->comm, cur->pid, cur->thread_info, cur);
+ cur->comm, cur->pid, task_thread_info(cur), cur);

/*
* When in-kernel, we also print out the stack and code at the
@@ -894,7 +894,7 @@ asmlinkage void math_state_restore(void)
if (!used_math())
init_fpu(me);
restore_fpu_checking(&me->thread.i387.fxsave);
- me->thread_info->status |= TS_USEDFPU;
+ task_thread_info(me)->status |= TS_USEDFPU;
}

void do_call_debug(struct pt_regs *regs)
Index: linux-2.6-mm/arch/x86_64/mm/fault.c
===================================================================
--- linux-2.6-mm.orig/arch/x86_64/mm/fault.c 2005-05-31 01:18:59.130021763 +0200
+++ linux-2.6-mm/arch/x86_64/mm/fault.c 2005-05-31 01:20:37.367146722 +0200
@@ -213,7 +213,7 @@ int unhandled_signal(struct task_struct
if (tsk->pid == 1)
return 1;
/* Warn for strace, but not for gdb */
- if (!test_ti_thread_flag(tsk->thread_info, TIF_SYSCALL_TRACE) &&
+ if (!test_ti_thread_flag(task_thread_info(tsk), TIF_SYSCALL_TRACE) &&
(tsk->ptrace & PT_PTRACED))
return 0;
return (tsk->sighand->action[sig-1].sa.sa_handler == SIG_IGN) ||
Index: linux-2.6-mm/include/asm-alpha/mmu_context.h
===================================================================
--- linux-2.6-mm.orig/include/asm-alpha/mmu_context.h 2005-05-31 01:18:59.130021763 +0200
+++ linux-2.6-mm/include/asm-alpha/mmu_context.h 2005-05-31 01:20:37.367146722 +0200
@@ -156,7 +156,7 @@ ev5_switch_mm(struct mm_struct *prev_mm,
/* Always update the PCB ASN. Another thread may have allocated
a new mm->context (via flush_tlb_mm) without the ASN serial
number wrapping. We have no way to detect when this is needed. */
- next->thread_info->pcb.asn = mmc & HARDWARE_ASN_MASK;
+ task_thread_info(next)->pcb.asn = mmc & HARDWARE_ASN_MASK;
}

__EXTERN_INLINE void
@@ -235,7 +235,7 @@ init_new_context(struct task_struct *tsk
if (cpu_online(i))
mm->context[i] = 0;
if (tsk != current)
- tsk->thread_info->pcb.ptbr
+ task_thread_info(tsk)->pcb.ptbr
= ((unsigned long)mm->pgd - IDENT_ADDR) >> PAGE_SHIFT;
return 0;
}
@@ -249,7 +249,7 @@ destroy_context(struct mm_struct *mm)
static inline void
enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
{
- tsk->thread_info->pcb.ptbr
+ task_thread_info(tsk)->pcb.ptbr
= ((unsigned long)mm->pgd - IDENT_ADDR) >> PAGE_SHIFT;
}

Index: linux-2.6-mm/include/asm-alpha/processor.h
===================================================================
--- linux-2.6-mm.orig/include/asm-alpha/processor.h 2005-05-31 01:18:59.130021763 +0200
+++ linux-2.6-mm/include/asm-alpha/processor.h 2005-05-31 01:20:37.367146722 +0200
@@ -61,10 +61,10 @@ unsigned long get_wchan(struct task_stru
+ offsetof(struct switch_stack, reg))

#define KSTK_EIP(tsk) \
- (*(unsigned long *)(PT_REG(pc) + (unsigned long) ((tsk)->thread_info)))
+ (*(unsigned long *)(PT_REG(pc) + (unsigned long)((tsk)->stack)))

#define KSTK_ESP(tsk) \
- ((tsk) == current ? rdusp() : (tsk)->thread_info->pcb.usp)
+ ((tsk) == current ? rdusp() : task_thread_info(tsk)->pcb.usp)

#define cpu_relax() barrier()

Index: linux-2.6-mm/include/asm-alpha/ptrace.h
===================================================================
--- linux-2.6-mm.orig/include/asm-alpha/ptrace.h 2005-05-31 01:18:59.130021763 +0200
+++ linux-2.6-mm/include/asm-alpha/ptrace.h 2005-05-31 01:20:37.367146722 +0200
@@ -73,7 +73,7 @@ struct switch_stack {
extern void show_regs(struct pt_regs *);

#define alpha_task_regs(task) \
- ((struct pt_regs *) ((long) (task)->thread_info + 2*PAGE_SIZE) - 1)
+ ((struct pt_regs *) ((long) (task)->stack + 2*PAGE_SIZE) - 1)

#define force_successful_syscall_return() (alpha_task_regs(current)->r0 = 0)

Index: linux-2.6-mm/include/asm-alpha/system.h
===================================================================
--- linux-2.6-mm.orig/include/asm-alpha/system.h 2005-05-31 01:18:59.130021763 +0200
+++ linux-2.6-mm/include/asm-alpha/system.h 2005-05-31 01:20:37.368146550 +0200
@@ -132,7 +132,7 @@ extern void halt(void) __attribute__((no

#define switch_to(P,N,L) \
do { \
- (L) = alpha_switch_to(virt_to_phys(&(N)->thread_info->pcb), (P)); \
+ (L) = alpha_switch_to(virt_to_phys(&task_thread_info(N)->pcb), (P));\
check_mmu_context(); \
} while (0)

Index: linux-2.6-mm/include/asm-arm/processor.h
===================================================================
--- linux-2.6-mm.orig/include/asm-arm/processor.h 2005-05-31 01:18:59.131021591 +0200
+++ linux-2.6-mm/include/asm-arm/processor.h 2005-05-31 01:20:37.368146550 +0200
@@ -85,7 +85,7 @@ unsigned long get_wchan(struct task_stru
*/
extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);

-#define KSTK_REGS(tsk) (((struct pt_regs *)(THREAD_START_SP + (unsigned long)(tsk)->thread_info)) - 1)
+#define KSTK_REGS(tsk) (((struct pt_regs *)(THREAD_START_SP + (unsigned long)(tsk)->stack)) - 1)
#define KSTK_EIP(tsk) KSTK_REGS(tsk)->ARM_pc
#define KSTK_ESP(tsk) KSTK_REGS(tsk)->ARM_sp

Index: linux-2.6-mm/include/asm-arm/system.h
===================================================================
--- linux-2.6-mm.orig/include/asm-arm/system.h 2005-05-31 01:18:59.131021591 +0200
+++ linux-2.6-mm/include/asm-arm/system.h 2005-05-31 01:20:37.368146550 +0200
@@ -160,7 +160,7 @@ extern struct task_struct *__switch_to(s

#define switch_to(prev,next,last) \
do { \
- last = __switch_to(prev,prev->thread_info,next->thread_info); \
+ last = __switch_to(prev,task_thread_info(prev),task_thread_info(next)); \
} while (0)

/*
Index: linux-2.6-mm/include/asm-arm/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-arm/thread_info.h 2005-05-31 01:19:43.461406599 +0200
+++ linux-2.6-mm/include/asm-arm/thread_info.h 2005-05-31 01:20:37.368146550 +0200
@@ -99,9 +99,9 @@ extern void free_thread_stack(void *);
#define put_thread_info(ti) put_task_struct((ti)->task)

#define thread_saved_pc(tsk) \
- ((unsigned long)(pc_pointer((tsk)->thread_info->cpu_context.pc)))
+ ((unsigned long)(pc_pointer(task_thread_info(tsk)->cpu_context.pc)))
#define thread_saved_fp(tsk) \
- ((unsigned long)((tsk)->thread_info->cpu_context.fp))
+ ((unsigned long)(task_thread_info(tsk)->cpu_context.fp))

extern void iwmmxt_task_disable(struct thread_info *);
extern void iwmmxt_task_copy(struct thread_info *, void *);
Index: linux-2.6-mm/include/asm-arm26/system.h
===================================================================
--- linux-2.6-mm.orig/include/asm-arm26/system.h 2005-05-31 01:18:59.131021591 +0200
+++ linux-2.6-mm/include/asm-arm26/system.h 2005-05-31 01:20:37.369146378 +0200
@@ -111,7 +111,7 @@ extern struct task_struct *__switch_to(s

#define switch_to(prev,next,last) \
do { \
- last = __switch_to(prev,prev->thread_info,next->thread_info); \
+ last = __switch_to(prev,task_thread_info(prev),task_thread_info(next)); \
} while (0)

/*
Index: linux-2.6-mm/include/asm-arm26/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-arm26/thread_info.h 2005-05-31 01:19:43.462406428 +0200
+++ linux-2.6-mm/include/asm-arm26/thread_info.h 2005-05-31 01:20:37.369146378 +0200
@@ -91,9 +91,9 @@ extern void free_thread_stack(void *);
#define put_thread_info(ti) put_task_struct((ti)->task)

#define thread_saved_pc(tsk) \
- ((unsigned long)(pc_pointer((tsk)->thread_info->cpu_context.pc)))
+ ((unsigned long)(pc_pointer(task_thread_info(tsk)->cpu_context.pc)))
#define thread_saved_fp(tsk) \
- ((unsigned long)((tsk)->thread_info->cpu_context.fp))
+ ((unsigned long)(task_thread_info(tsk)->cpu_context.fp))

#else /* !__ASSEMBLY__ */

Index: linux-2.6-mm/include/asm-cris/processor.h
===================================================================
--- linux-2.6-mm.orig/include/asm-cris/processor.h 2005-05-31 01:18:59.131021591 +0200
+++ linux-2.6-mm/include/asm-cris/processor.h 2005-05-31 01:20:37.369146378 +0200
@@ -43,7 +43,7 @@
* Dito but for the currently running task
*/

-#define current_regs() user_regs(current->thread_info)
+#define current_regs() user_regs(task_thread_info(current))

extern inline void prepare_to_copy(struct task_struct *tsk)
{
Index: linux-2.6-mm/include/asm-i386/i387.h
===================================================================
--- linux-2.6-mm.orig/include/asm-i386/i387.h 2005-05-31 01:18:59.131021591 +0200
+++ linux-2.6-mm/include/asm-i386/i387.h 2005-05-31 01:20:37.369146378 +0200
@@ -39,19 +39,19 @@ static inline void __save_init_fpu( stru
asm volatile( "fnsave %0 ; fwait"
: "=m" (tsk->thread.i387.fsave) );
}
- tsk->thread_info->status &= ~TS_USEDFPU;
+ task_thread_info(tsk)->status &= ~TS_USEDFPU;
}

#define __unlazy_fpu( tsk ) do { \
- if ((tsk)->thread_info->status & TS_USEDFPU) \
+ if (task_thread_info(tsk)->status & TS_USEDFPU) \
save_init_fpu( tsk ); \
} while (0)

#define __clear_fpu( tsk ) \
do { \
- if ((tsk)->thread_info->status & TS_USEDFPU) { \
+ if (task_thread_info(tsk)->status & TS_USEDFPU) { \
asm volatile("fnclex ; fwait"); \
- (tsk)->thread_info->status &= ~TS_USEDFPU; \
+ task_thread_info(tsk)->status &= ~TS_USEDFPU; \
stts(); \
} \
} while (0)
Index: linux-2.6-mm/include/asm-i386/processor.h
===================================================================
--- linux-2.6-mm.orig/include/asm-i386/processor.h 2005-05-31 01:18:59.131021591 +0200
+++ linux-2.6-mm/include/asm-i386/processor.h 2005-05-31 01:20:37.370146207 +0200
@@ -544,7 +544,7 @@ unsigned long get_wchan(struct task_stru
#define task_pt_regs(task) \
({ \
struct pt_regs *__regs__; \
- __regs__ = (struct pt_regs *)KSTK_TOP((task)->thread_info); \
+ __regs__ = (struct pt_regs *)KSTK_TOP((task)->stack); \
__regs__ - 1; \
})

Index: linux-2.6-mm/include/asm-m68k/thread_info.h
===================================================================
--- linux-2.6-mm.orig/include/asm-m68k/thread_info.h 2005-05-31 01:19:43.461406599 +0200
+++ linux-2.6-mm/include/asm-m68k/thread_info.h 2005-05-31 01:20:37.370146207 +0200
@@ -54,7 +54,7 @@ extern int thread_flag_fixme(void);

#define setup_thread_info(p, ti) do (ti)->task = p; while(0)

-#define end_of_stack(p) ((unsigned long *)(p)->thread_info + 1)
+#define end_of_stack(p) ((unsigned long *)(p)->stack + 1)

/*
* flag set/clear/test wrappers
Index: linux-2.6-mm/include/asm-mips/processor.h
===================================================================
--- linux-2.6-mm.orig/include/asm-mips/processor.h 2005-05-31 01:18:59.131021591 +0200
+++ linux-2.6-mm/include/asm-mips/processor.h 2005-05-31 01:20:37.370146207 +0200
@@ -180,7 +180,7 @@ extern void start_thread(struct pt_regs
unsigned long get_wchan(struct task_struct *p);

#define __PT_REG(reg) ((long)&((struct pt_regs *)0)->reg - sizeof(struct pt_regs))
-#define __KSTK_TOS(tsk) ((unsigned long)(tsk->thread_info) + THREAD_SIZE - 32)
+#define __KSTK_TOS(tsk) ((unsigned long)(tsk)->stack + THREAD_SIZE - 32)
#define KSTK_EIP(tsk) (*(unsigned long *)(__KSTK_TOS(tsk) + __PT_REG(cp0_epc)))
#define KSTK_ESP(tsk) (*(unsigned long *)(__KSTK_TOS(tsk) + __PT_REG(regs[29])))
#define KSTK_STATUS(tsk) (*(unsigned long *)(__KSTK_TOS(tsk) + __PT_REG(cp0_status)))
Index: linux-2.6-mm/include/asm-mips/system.h
===================================================================
--- linux-2.6-mm.orig/include/asm-mips/system.h 2005-05-31 01:18:59.131021591 +0200
+++ linux-2.6-mm/include/asm-mips/system.h 2005-05-31 01:20:37.371146035 +0200
@@ -156,7 +156,7 @@ struct task_struct;

#define switch_to(prev,next,last) \
do { \
- (last) = resume(prev, next, next->thread_info); \
+ (last) = resume(prev, next, task_thread_info(next)); \
} while(0)

#define ROT_IN_PIECES \
Index: linux-2.6-mm/include/asm-ppc64/ptrace-common.h
===================================================================
--- linux-2.6-mm.orig/include/asm-ppc64/ptrace-common.h 2005-05-31 01:18:59.131021591 +0200
+++ linux-2.6-mm/include/asm-ppc64/ptrace-common.h 2005-05-31 01:20:37.371146035 +0200
@@ -58,7 +58,7 @@ static inline void set_single_step(struc
struct pt_regs *regs = task->thread.regs;
if (regs != NULL)
regs->msr |= MSR_SE;
- set_ti_thread_flag(task->thread_info, TIF_SINGLESTEP);
+ set_ti_thread_flag(task_thread_info(task), TIF_SINGLESTEP);
}

static inline void clear_single_step(struct task_struct *task)
@@ -66,7 +66,7 @@ static inline void clear_single_step(str
struct pt_regs *regs = task->thread.regs;
if (regs != NULL)
regs->msr &= ~MSR_SE;
- clear_ti_thread_flag(task->thread_info, TIF_SINGLESTEP);
+ clear_ti_thread_flag(task_thread_info(task), TIF_SINGLESTEP);
}

#endif /* _PPC64_PTRACE_COMMON_H */
Index: linux-2.6-mm/include/asm-s390/processor.h
===================================================================
--- linux-2.6-mm.orig/include/asm-s390/processor.h 2005-05-31 01:18:59.131021591 +0200
+++ linux-2.6-mm/include/asm-s390/processor.h 2005-05-31 01:20:37.371146035 +0200
@@ -192,7 +192,7 @@ extern void show_trace(struct task_struc

unsigned long get_wchan(struct task_struct *p);
#define __KSTK_PTREGS(tsk) ((struct pt_regs *) \
- ((unsigned long) tsk->thread_info + THREAD_SIZE - sizeof(struct pt_regs)))
+ ((unsigned long)(tsk)->stack + THREAD_SIZE - sizeof(struct pt_regs)))
#define KSTK_EIP(tsk) (__KSTK_PTREGS(tsk)->psw.addr)
#define KSTK_ESP(tsk) (__KSTK_PTREGS(tsk)->gprs[15])

Index: linux-2.6-mm/include/asm-sparc/system.h
===================================================================
--- linux-2.6-mm.orig/include/asm-sparc/system.h 2005-05-31 01:18:59.132021420 +0200
+++ linux-2.6-mm/include/asm-sparc/system.h 2005-05-31 01:20:37.371146035 +0200
@@ -156,7 +156,7 @@ extern void fpsave(unsigned long *fpregs
"here:\n" \
: "=&r" (last) \
: "r" (&(current_set[hard_smp_processor_id()])), \
- "r" ((next)->thread_info), \
+ "r" (task_thread_info(next)), \
"i" (TI_KPSR), \
"i" (TI_KSP), \
"i" (TI_TASK) \
Index: linux-2.6-mm/include/asm-sparc64/elf.h
===================================================================
--- linux-2.6-mm.orig/include/asm-sparc64/elf.h 2005-05-31 01:18:59.132021420 +0200
+++ linux-2.6-mm/include/asm-sparc64/elf.h 2005-05-31 01:20:37.372145863 +0200
@@ -119,7 +119,7 @@ typedef struct {
#endif

#define ELF_CORE_COPY_TASK_REGS(__tsk, __elf_regs) \
- ({ ELF_CORE_COPY_REGS((*(__elf_regs)), (__tsk)->thread_info->kregs); 1; })
+ ({ ELF_CORE_COPY_REGS((*(__elf_regs)), task_thread_info(__tsk)->kregs); 1; })

/*
* This is used to ensure we don't load something for the wrong architecture.
Index: linux-2.6-mm/include/asm-sparc64/mmu_context.h
===================================================================
--- linux-2.6-mm.orig/include/asm-sparc64/mmu_context.h 2005-05-31 01:18:59.132021420 +0200
+++ linux-2.6-mm/include/asm-sparc64/mmu_context.h 2005-05-31 01:20:37.372145863 +0200
@@ -60,7 +60,7 @@ do { \
register unsigned long pgd_cache asm("o4"); \
paddr = __pa((__mm)->pgd); \
pgd_cache = 0UL; \
- if ((__tsk)->thread_info->flags & _TIF_32BIT) \
+ if (task_thread_info(__tsk)->flags & _TIF_32BIT) \
pgd_cache = get_pgd_cache((__mm)->pgd); \
__asm__ __volatile__("wrpr %%g0, 0x494, %%pstate\n\t" \
"mov %3, %%g4\n\t" \
Index: linux-2.6-mm/include/asm-sparc64/processor.h
===================================================================
--- linux-2.6-mm.orig/include/asm-sparc64/processor.h 2005-05-31 01:18:59.132021420 +0200
+++ linux-2.6-mm/include/asm-sparc64/processor.h 2005-05-31 01:20:37.372145863 +0200
@@ -187,8 +187,8 @@ extern pid_t kernel_thread(int (*fn)(voi

extern unsigned long get_wchan(struct task_struct *task);

-#define KSTK_EIP(tsk) ((tsk)->thread_info->kregs->tpc)
-#define KSTK_ESP(tsk) ((tsk)->thread_info->kregs->u_regs[UREG_FP])
+#define KSTK_EIP(tsk) (task_thread_info(tsk)->kregs->tpc)
+#define KSTK_ESP(tsk) (task_thread_info(tsk)->kregs->u_regs[UREG_FP])

#define cpu_relax() barrier()

Index: linux-2.6-mm/include/asm-sparc64/system.h
===================================================================
--- linux-2.6-mm.orig/include/asm-sparc64/system.h 2005-05-31 01:18:59.132021420 +0200
+++ linux-2.6-mm/include/asm-sparc64/system.h 2005-05-31 01:20:37.373145691 +0200
@@ -174,7 +174,7 @@ do { if (test_thread_flag(TIF_PERFCTR))
/* If you are tempted to conditionalize the following */ \
/* so that ASI is only written if it changes, think again. */ \
__asm__ __volatile__("wr %%g0, %0, %%asi" \
- : : "r" (__thread_flag_byte_ptr(next->thread_info)[TI_FLAG_BYTE_CURRENT_DS]));\
+ : : "r" (__thread_flag_byte_ptr(task_thread_info(next))[TI_FLAG_BYTE_CURRENT_DS]));\
__asm__ __volatile__( \
"mov %%g4, %%g7\n\t" \
"wrpr %%g0, 0x95, %%pstate\n\t" \
@@ -205,7 +205,7 @@ do { if (test_thread_flag(TIF_PERFCTR))
"b,a ret_from_syscall\n\t" \
"1:\n\t" \
: "=&r" (last) \
- : "0" (next->thread_info), \
+ : "0" (task_thread_info(next)), \
"i" (TI_WSTATE), "i" (TI_KSP), "i" (TI_FLAGS), "i" (TI_CWP), \
"i" (_TIF_NEWCHILD), "i" (TI_TASK) \
: "cc", \
Index: linux-2.6-mm/include/asm-v850/processor.h
===================================================================
--- linux-2.6-mm.orig/include/asm-v850/processor.h 2005-05-31 01:18:59.132021420 +0200
+++ linux-2.6-mm/include/asm-v850/processor.h 2005-05-31 01:20:37.373145691 +0200
@@ -98,7 +98,7 @@ unsigned long get_wchan (struct task_str


/* Return some info about the user process TASK. */
-#define task_tos(task) ((unsigned long)(task)->thread_info + THREAD_SIZE)
+#define task_tos(task) ((unsigned long)(task)->stack + THREAD_SIZE)
#define task_regs(task) ((struct pt_regs *)task_tos (task) - 1)
#define task_sp(task) (task_regs (task)->gpr[GPR_SP])
#define task_pc(task) (task_regs (task)->pc)
Index: linux-2.6-mm/include/asm-x86_64/i387.h
===================================================================
--- linux-2.6-mm.orig/include/asm-x86_64/i387.h 2005-05-31 01:18:59.132021420 +0200
+++ linux-2.6-mm/include/asm-x86_64/i387.h 2005-05-31 01:20:37.373145691 +0200
@@ -30,7 +30,7 @@ extern int save_i387(struct _fpstate __u
*/

#define unlazy_fpu(tsk) do { \
- if ((tsk)->thread_info->status & TS_USEDFPU) \
+ if (task_thread_info(tsk)->status & TS_USEDFPU) \
save_init_fpu(tsk); \
} while (0)

@@ -46,9 +46,9 @@ static inline void tolerant_fwait(void)
}

#define clear_fpu(tsk) do { \
- if ((tsk)->thread_info->status & TS_USEDFPU) { \
+ if (task_thread_info(tsk)->status & TS_USEDFPU) { \
tolerant_fwait(); \
- (tsk)->thread_info->status &= ~TS_USEDFPU; \
+ task_thread_info(tsk)->status &= ~TS_USEDFPU; \
stts(); \
} \
} while (0)
@@ -135,7 +135,7 @@ static inline void save_init_fpu( struct
{
asm volatile( "rex64 ; fxsave %0 ; fnclex"
: "=m" (tsk->thread.i387.fxsave));
- tsk->thread_info->status &= ~TS_USEDFPU;
+ task_thread_info(tsk)->status &= ~TS_USEDFPU;
stts();
}

Index: linux-2.6-mm/include/linux/sched.h
===================================================================
--- linux-2.6-mm.orig/include/linux/sched.h 2005-05-31 01:19:43.467405569 +0200
+++ linux-2.6-mm/include/linux/sched.h 2005-05-31 01:20:37.374145520 +0200
@@ -1160,7 +1160,7 @@ static inline void task_unlock(struct ta

#ifndef __HAVE_THREAD_FUNCTIONS

-#define task_thread_info(task) (task)->thread_info
+#define task_thread_info(task) ((struct thread_info *)(task)->stack)

static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org)
{
@@ -1170,7 +1170,7 @@ static inline void setup_thread_stack(st

static inline unsigned long *end_of_stack(struct task_struct *p)
{
- return (unsigned long *)(p->thread_info + 1);
+ return (unsigned long *)(task_thread_info(p) + 1);
}

/* set thread flags in other task's structures
@@ -1265,7 +1265,7 @@ extern void recalc_sigpending(void);
extern void signal_wake_up(struct task_struct *t, int resume_stopped);

/*
- * Wrappers for p->thread_info->cpu access. No-op on UP.
+ * Wrappers for task_thread_info(p)->cpu access. No-op on UP.
*/
#ifdef CONFIG_SMP

Index: linux-2.6-mm/arch/i386/kernel/kgdb_stub.c
===================================================================
--- linux-2.6-mm.orig/arch/i386/kernel/kgdb_stub.c 2005-05-31 01:18:59.126022450 +0200
+++ linux-2.6-mm/arch/i386/kernel/kgdb_stub.c 2005-05-31 01:20:37.375145348 +0200
@@ -702,7 +702,7 @@ get_gdb_regs(struct task_struct *p, stru

if (p->state == TASK_RUNNING)
return;
- stack_page = (unsigned long) p->thread_info;
+ stack_page = (unsigned long)p->stack;
if (gdb_regs[_ESP] < stack_page || gdb_regs[_ESP] >
THREAD_SIZE - sizeof(long) + stack_page)
return;
Index: linux-2.6-mm/arch/xtensa/kernel/process.c
===================================================================
--- linux-2.6-mm.orig/arch/xtensa/kernel/process.c 2005-05-31 01:18:59.130021763 +0200
+++ linux-2.6-mm/arch/xtensa/kernel/process.c 2005-05-31 01:20:37.376145176 +0200
@@ -144,7 +144,7 @@ int copy_thread(int nr, unsigned long cl
int user_mode = user_mode(regs);

/* Set up new TSS. */
- tos = (unsigned long)p->thread_info + THREAD_SIZE;
+ tos = (unsigned long)p->stack + THREAD_SIZE;
if (user_mode)
childregs = (struct pt_regs*)(tos - PT_USER_SIZE);
else
@@ -216,7 +216,7 @@ int kernel_thread(int (*fn)(void *), voi
unsigned long get_wchan(struct task_struct *p)
{
unsigned long sp, pc;
- unsigned long stack_page = (unsigned long) p->thread_info;
+ unsigned long stack_page = (unsigned long)p->stack;
int count = 0;

if (!p || p == current || p->state == TASK_RUNNING)
Index: linux-2.6-mm/include/asm-xtensa/ptrace.h
===================================================================
--- linux-2.6-mm.orig/include/asm-xtensa/ptrace.h 2005-05-31 01:18:59.132021420 +0200
+++ linux-2.6-mm/include/asm-xtensa/ptrace.h 2005-05-31 01:20:37.376145176 +0200
@@ -114,7 +114,7 @@ struct pt_regs {

#ifdef __KERNEL__
# define xtensa_pt_regs(tsk) ((struct pt_regs*) \
- (((long)(tsk)->thread_info + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4)) - 1)
+ (((long)(tsk)->stack + KERNEL_STACK_SIZE - (XCHAL_NUM_AREGS-16)*4)) - 1)
# define user_mode(regs) (((regs)->ps & 0x00000020)!=0)
# define instruction_pointer(regs) ((regs)->pc)
extern void show_regs(struct pt_regs *);
Index: linux-2.6-mm/arch/x86_64/kernel/kgdb_stub.c
===================================================================
--- linux-2.6-mm.orig/arch/x86_64/kernel/kgdb_stub.c 2005-05-31 01:18:59.130021763 +0200
+++ linux-2.6-mm/arch/x86_64/kernel/kgdb_stub.c 2005-05-31 01:20:37.377145004 +0200
@@ -717,7 +717,7 @@ get_gdb_regs(struct task_struct *p, stru
if (p->state == TASK_RUNNING)
return;
rsp0 = (unsigned long *)p->thread.rsp0;
- if (rsp < (unsigned long *) p->thread_info || rsp > rsp0)
+ if (rsp < (unsigned long *)p->stack || rsp > rsp0)
return;
/* include/asm-i386/system.h:switch_to() pushes ebp last. */
do {
Index: linux-2.6-mm/arch/i386/kernel/smpboot.c
===================================================================
--- linux-2.6-mm.orig/arch/i386/kernel/smpboot.c 2005-05-31 01:18:59.126022450 +0200
+++ linux-2.6-mm/arch/i386/kernel/smpboot.c 2005-05-31 01:20:37.377145004 +0200
@@ -836,7 +836,7 @@ static inline struct task_struct * alloc
* idle tread
*/
idle->thread.esp = (unsigned long)(((struct pt_regs *)
- (THREAD_SIZE + (unsigned long) idle->thread_info)) - 1);
+ (THREAD_SIZE + (unsigned long)idle->stack)) - 1);
init_idle(idle, cpu);
return idle;
}

2005-05-31 01:26:28

by Randy Dunlap

[permalink] [raw]
Subject: Re: more thread_info patches

On Tue, 31 May 2005 01:48:28 +0200 (CEST) Roman Zippel wrote:

| Hi,
|
| On Thu, 21 Apr 2005, Al Viro wrote:
|
| > thread_info, part 1:
|
| Here are some possible followup patches. Since it's already some time ago
| here are the original posts for everyone else:
| http://marc.theaimsgroup.com/?l=linux-kernel&m=111410539627881&w=2
|
| This introduces an additional stack variable in task_struct. It's
| basically redundant with the thread_info pointer, but in the long term I'd
| like to get of the latter (with the following patches).
|
| ---
|
| include/linux/init_task.h | 1 +
| include/linux/sched.h | 1 +
| kernel/fork.c | 1 +
| 3 files changed, 3 insertions(+)
|
| Index: linux-2.6-mm/include/linux/sched.h
| ===================================================================
| --- linux-2.6-mm.orig/include/linux/sched.h 2005-05-31 01:19:01.636591190 +0200
| +++ linux-2.6-mm/include/linux/sched.h 2005-05-31 01:19:05.913856451 +0200
| @@ -617,6 +617,7 @@ struct mempolicy;
| struct task_struct {
| volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
| struct thread_info *thread_info;
| + void *stack;

Any reason this is void * instead of being more strongly typed?
Does the actual type vary?


And a general comments about the 4 emails:
they all have the same subject. :(

I guess you need to read & follow:
http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
and
http://linux.yyz.us/patch-format.html

so that Andrew doesn't have to keep saying this over and over again
(no, it's not just you).


| atomic_t usage;
| unsigned long flags; /* per process flags, defined below */
| unsigned long ptrace;
| Index: linux-2.6-mm/include/linux/init_task.h
| ===================================================================
| --- linux-2.6-mm.orig/include/linux/init_task.h 2005-05-31 01:19:01.636591190 +0200
| +++ linux-2.6-mm/include/linux/init_task.h 2005-05-31 01:19:05.913856451 +0200
| @@ -71,6 +71,7 @@ extern struct group_info init_groups;
| { \
| .state = 0, \
| .thread_info = &init_thread_info, \
| + .stack = &init_stack, \
| .usage = ATOMIC_INIT(2), \
| .flags = 0, \
| .lock_depth = -1, \
| Index: linux-2.6-mm/kernel/fork.c
| ===================================================================
| --- linux-2.6-mm.orig/kernel/fork.c 2005-05-31 01:19:01.636591190 +0200
| +++ linux-2.6-mm/kernel/fork.c 2005-05-31 01:19:29.954726757 +0200
| @@ -173,6 +173,7 @@ static struct task_struct *dup_task_stru
| *tsk = *orig;
| setup_thread_info(tsk, ti);
| tsk->thread_info = ti;
| + tsk->stack = ti;
| ti->task = tsk;
|
| /* One for us, one for whoever does the "release_task()" (usually parent) */
| -

---
~Randy

2005-05-31 09:36:10

by Roman Zippel

[permalink] [raw]
Subject: Re: more thread_info patches

Hi,

On Mon, 30 May 2005, randy_dunlap wrote:

> | Index: linux-2.6-mm/include/linux/sched.h
> | ===================================================================
> | --- linux-2.6-mm.orig/include/linux/sched.h 2005-05-31 01:19:01.636591190 +0200
> | +++ linux-2.6-mm/include/linux/sched.h 2005-05-31 01:19:05.913856451 +0200
> | @@ -617,6 +617,7 @@ struct mempolicy;
> | struct task_struct {
> | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
> | struct thread_info *thread_info;
> | + void *stack;
>
> Any reason this is void * instead of being more strongly typed?
> Does the actual type vary?

Yes, on m68k it actually doesn't point to the thread_info at all.
The point of these patches are to allow archs to put the thread_info
structure somewhere else. Archs with a thread register can keep
task_struct and thread_info together and directly accessable via the
thread register. Only because i386 has no usable thread register, doesn't
mean everyone else has to suffer.

> And a general comments about the 4 emails:
> they all have the same subject. :(

I know and I did this intentionally, as these patches were not intended to
be applied, they are based on Al's patches and even these aren't in -mm
yet. I maybe should have added a [RFC].

bye, Roman

2005-05-31 12:16:52

by Vincent Hanquez

[permalink] [raw]
Subject: Re: more thread_info patches

On Tue, May 31, 2005 at 01:51:09AM +0200, Roman Zippel wrote:
> Hi,

Hey Roman,

> Index: linux-2.6-mm/arch/alpha/kernel/ptrace.c
> ===================================================================
> ....
> - addr = &task->thread_info->pcb.unique;
> + addr = &task_thread_infotask)->pcb.unique;

you forget a left parenthesis here

cheers,
--
Vincent Hanquez

2005-05-31 15:38:19

by Randy Dunlap

[permalink] [raw]
Subject: Re: more thread_info patches

On Tue, 31 May 2005 11:35:04 +0200 (CEST) Roman Zippel wrote:

| Hi,
|
| On Mon, 30 May 2005, randy_dunlap wrote:
|
| > | Index: linux-2.6-mm/include/linux/sched.h
| > | ===================================================================
| > | --- linux-2.6-mm.orig/include/linux/sched.h 2005-05-31 01:19:01.636591190 +0200
| > | +++ linux-2.6-mm/include/linux/sched.h 2005-05-31 01:19:05.913856451 +0200
| > | @@ -617,6 +617,7 @@ struct mempolicy;
| > | struct task_struct {
| > | volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
| > | struct thread_info *thread_info;
| > | + void *stack;
| >
| > Any reason this is void * instead of being more strongly typed?
| > Does the actual type vary?
|
| Yes, on m68k it actually doesn't point to the thread_info at all.
| The point of these patches are to allow archs to put the thread_info
| structure somewhere else. Archs with a thread register can keep
| task_struct and thread_info together and directly accessable via the
| thread register. Only because i386 has no usable thread register, doesn't
| mean everyone else has to suffer.

I see, thanks for the explanation.

| > And a general comments about the 4 emails:
| > they all have the same subject. :(
|
| I know and I did this intentionally, as these patches were not intended to
| be applied, they are based on Al's patches and even these aren't in -mm
| yet. I maybe should have added a [RFC].

I agree.

Thanks,
---
~Randy