2.3.39 compiles & boot
Subsystems (2)
Hi All,
may some of you are as far as I am, otherwise here is the diff I had to do to get a 2.3.39-linus-tree to compile & boot with a Wallstreet I. hope to ok otherwise let me please know.
Good night,
Andreas
Signature · 4 lines
| Andreas Tobler | CH-8004 Zuerich | E-Mail: [email protected] ------------------------------------------------
include/asm-ppc/ipcbuf.h +29 -0
@@ -0,0 +1,29 @@ +#ifndef __PPC_IPCBUF_H__ +#define __PPC_IPCBUF_H__ + +/* +* The user_ipc_perm structure for PPC architecture. +* Note extra padding because this structure is passed back and forth +* between kernel and user space. +* +* Pad space is left for: +* - 32-bit mode_t and seq +* - 2 miscellaneous 32-bit values +*/ + +struct ipc64_perm +{ +__kernel_key_t key; +__kernel_uid32_t uid; +__kernel_gid32_t gid; +__kernel_uid32_t cuid; +__kernel_gid32_t cgid; +__kernel_mode_t mode; +unsigned short __pad1; +unsigned short seq; +unsigned short __pad2; +unsigned long __unused1; +unsigned long __unused2; +}; + +#endif /* __PPCIPCBUF_H__ */
include/asm-ppc/msgbuf.h +31 -0
@@ -0,0 +1,31 @@ +#ifndef _PPC_MSGBUF_H +#define _PPC_MSGBUF_H + +/* +* The msqid64_ds structure for PPC architecture. +* Note extra padding because this structure is passed back and forth +* between kernel and user space. +* +* Pad space is left for: +* - 64-bit time_t to solve y2038 problem +* - 2 miscellaneous 32-bit values +*/ + +struct msqid64_ds { +struct ipc64_perm msg_perm; +__kernel_time_t msg_stime;/* last msgsnd time */ +unsigned long __unused1; +__kernel_time_t msg_rtime;/* last msgrcv time */ +unsigned long __unused2; +__kernel_time_t msg_ctime;/* last change time */ +unsigned long __unused3; +unsigned long msg_cbytes;/* current number of bytes on queue */ +unsigned long msg_qnum;/* number of messages in queue */ +unsigned long msg_qbytes;/* max number of bytes on queue */ +__kernel_pid_t msg_lspid;/* pid of last msgsnd */ +__kernel_pid_t msg_lrpid;/* last receive pid */ +unsigned long __unused4; +unsigned long __unused5; +}; + +#endif /* _PPC_MSGBUF_H */
include/asm-ppc/posix_types.h +11 -0
@@ -24,6 +24,17 @@typedef int __kernel_daddr_t ;typedef char *__kernel_caddr_t ;typedef short __kernel_ipc_pid_t ; +typedef unsigned short __kernel_uid16_t ; +typedef unsigned short __kernel_gid16_t ; +typedef unsigned int __kernel_uid32_t ; +typedef unsigned int __kernel_gid32_t ; + + +#ifdef __KERNEL__ +#define UID16_COMPAT_NEEDED +typedef unsigned short __kernel_old_uid_t ; +typedef unsigned short __kernel_old_gid_t ; +#endif /* __KERNEL__ */ #ifdef __GNUC__typedef long long __kernel_loff_t ;
include/asm-ppc/sembuf.h +25 -0
@@ -0,0 +1,25 @@ +#ifndef _PPC_SEMBUF_H +#define _PPC_SEMBUF_H + +/* +* The semid64_ds structure for PPC architecture. +* Note extra padding because this structure is passed back and forth +* between kernel and user space. +* +* Pad space is left for: +* - 64-bit time_t to solve y2038 problem +* - 2 miscellaneous 32-bit values +*/ + +struct semid64_ds { +struct ipc64_perm sem_perm;/* permissions .. see ipc.h */ +__kernel_time_t sem_otime;/* last semop time */ +unsigned long __unused1; +__kernel_time_t sem_ctime;/* last change time */ +unsigned long __unused2; +unsigned long sem_nsems;/* no. of semaphores in array */ +unsigned long __unused3; +unsigned long __unused4; +}; + +#endif /* _PPC_SEMBUF_H */
include/asm-ppc/shmbuf.h +42 -0
42 lines not on this page · raw message
include/asm-ppc/siginfo.h +16 -6
@@ -1,10 +1,10 @@ #ifndef _PPC_SIGINFO_H #define _PPC_SIGINFO_H -/* Copied from i386 from alpha. */ - #include <linux/types.h> +/* This is copied from asm-alpha/siginfo.h. */ + typedef union sigval { int sival_int; void *sival_ptr;
@@ -24,7 +24,8 @@/* kill() */ struct {pid_t _pid;/* sender's pid */ -uid_t _uid;/* sender's uid */ +old_uid_t _uid;/* backwards compatibility */ +uid_t _uid32;/* sender's uid */ } _kill;/* POSIX.1b timers */
@@ -36,17 +37,19 @@/* POSIX.1b signals */ struct {pid_t _pid;/* sender's pid */ -uid_t _uid;/* sender's uid */ +old_uid_t _uid;/* backwards compatibility */ sigval_t _sigval; +uid_t _uid32;/* sender's uid */ } _rt;/* SIGCHLD */ struct {pid_t _pid;/* which child */ -uid_t _uid;/* sender's uid */ +old_uid_t _uid;/* backwards compatibility */ int _status;/* exit code */ clock_t _utime;clock_t _stime; +uid_t _uid32;/* sender's uid */ } _sigchld;/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
@@ -62,11 +65,18 @@ } _sifields; } siginfo_t; +#define UID16_SIGINFO_COMPAT_NEEDED +/* * How these fields are to be accessed. */ #define si_pid _sifields._kill._pid +#ifdef __KERNEL__ +#define si_uid _sifields._kill._uid32 +#define si_uid16 _sifields._kill._uid +#else #define si_uid _sifields._kill._uid +#endif /* __KERNEL__ */ #define si_status _sifields._sigchld._status#define si_utime _sifields._sigchld._utime#define si_stime _sifields._sigchld._stime
@@ -149,7 +159,7 @@#define CLD_TRAPPED 4/* traced child has trapped */ #define CLD_STOPPED 5/* child has stopped */ #define CLD_CONTINUED 6/* stopped child has continued */ -#define NSIGCHLD +#define NSIGCHLD /* * SIGPOLL si_codes
Quoted 3 lines · Andreas Tobler
may some of you are as far as I am, otherwise here is the diff I had to do to get a 2.3.39-linus-tree to compile & boot with a Wallstreet I. hope to ok otherwise let me please know.
I think this patch is not quite the best way to do it. We already had 32-bit uids so we don't need the compatibility crap. Here is a patch that fixes the compile (alternatively my linux-pmac-devel rsync tree has a 2.3.39 tree that compiles and works).
Paul.
arch/ppc/kernel/head_4xx.S +1 -1
@@ -474,7 +474,7 @@ _GLOBAL(abort) mfspr r13,SPRN_DBCR - oris r13,r13,DBCR_RST(SYSTEM)@h + oris r13,r13,DBCR_RST(DBCR_RST_SYSTEM)@h mtspr SPRN_DBCR,r13
include/asm-ppc/ipcbuf.h +11 -0
@@ -0,0 +1,11 @@ +#ifndef __PPC_IPCBUF_H__ +#define __PPC_IPCBUF_H__ + +/* +* The ipc64_perm structure for the PPC is identical to kern_ipc_perm +* as we have always had 32-bit UIDs and GIDs in the kernel. +*/ + +#define ipc64_perm kern_ipc_perm + +#endif /* __PPC_IPCBUF_H__ */
include/asm-ppc/msgbuf.h +26 -0
@@ -0,0 +1,26 @@ +#ifndef _PPC_MSGBUF_H +#define _PPC_MSGBUF_H + +/* +* The msqid64_ds structure for the PPC architecture. +*/ + +struct msqid64_ds { +struct ipc64_perm msg_perm; +unsigned int __unused0; +unsigned int __unused1; +__kernel_time_t msg_stime;/* last msgsnd time */ +unsigned int __unused2; +__kernel_time_t msg_rtime;/* last msgrcv time */ +unsigned int __unused3; +__kernel_time_t msg_ctime;/* last change time */ +unsigned long msg_cbytes;/* current number of bytes on queue */ +unsigned long msg_qnum;/* number of messages in queue */ +unsigned long msg_qbytes;/* max number of bytes on queue */ +__kernel_pid_t msg_lspid;/* pid of last msgsnd */ +__kernel_pid_t msg_lrpid;/* last receive pid */ +unsigned long __unused4; +unsigned long __unused5; +}; + +#endif /* _PPC_MSGBUF_H */
include/asm-ppc/posix_types.h +9 -0
@@ -24,6 +24,15 @@typedef int __kernel_daddr_t ;typedef char *__kernel_caddr_t ;typedef short __kernel_ipc_pid_t ; +typedef unsigned int __kernel_uid16_t ; +typedef unsigned int __kernel_gid16_t ; +typedef unsigned int __kernel_uid32_t ; +typedef unsigned int __kernel_gid32_t ; + +#ifdef __KERNEL__ +typedef unsigned int __kernel_old_uid_t ; +typedef unsigned int __kernel_old_gid_t ; +#endif /* __KERNEL__ */ #ifdef __GNUC__typedef long long __kernel_loff_t ;
include/asm-ppc/processor.h +4 -4
@@ -99,10 +99,10 @@#define DBCR_EDM 0x80000000#define DBCR_IDM 0x40000000#define DBCR_RST (x) (((x) & 0x3) << 28) -#define NONE 0 -#define CORE 1 -#define CHIP 2 -#define SYSTEM 3 +#define DBCR_RST_NONE 0 +#define DBCR_RST_CORE 1 +#define DBCR_RST_CHIP 2 +#define DBCR_RST_SYSTEM 3#define DBCR_IC 0x08000000/* Instruction Completion Debug Evnt */ #define DBCR_BT 0x04000000/* Branch Taken Debug Event */ #define DBCR_EDE 0x02000000/* Exception Debug Event */
include/asm-ppc/sembuf.h +20 -0
@@ -0,0 +1,20 @@ +#ifndef _PPC_SEMBUF_H +#define _PPC_SEMBUF_H + +/* +* The semid64_ds structure for PPC architecture. +*/ + +struct semid64_ds { +struct ipc64_perm sem_perm;/* permissions .. see ipc.h */ +unsigned int __unused0; +unsigned int __unused1; +__kernel_time_t sem_otime;/* last semop time */ +unsigned int __unused2; +__kernel_time_t sem_ctime;/* last change time */ +unsigned long sem_nsems;/* no. of semaphores in array */ +unsigned long __unused3; +unsigned long __unused4; +}; + +#endif /* _PPC_SEMBUF_H */
include/asm-ppc/shmbuf.h +37 -0
@@ -0,0 +1,37 @@ +#ifndef _PPC_SHMBUF_H +#define _PPC_SHMBUF_H + +/* +* The shmid64_ds structure for PPC architecture. +*/ + +struct shmid64_ds { +struct ipc64_perm shm_perm;/* operation perms */ +unsigned int __unused0; +size_t shm_segsz;/* size of segment (bytes) */ +unsigned long __unused1; +__kernel_time_t shm_atime;/* last attach time */ +unsigned long __unused2; +__kernel_time_t shm_dtime;/* last detach time */ +unsigned long __unused3; +__kernel_time_t shm_ctime;/* last change time */ +__kernel_pid_t shm_cpid;/* pid of creator */ +__kernel_pid_t shm_lpid;/* pid of last operator */ +unsigned long shm_nattch;/* no. of current attaches */ +unsigned long __unused4; +unsigned long __unused5; +}; + +struct shminfo64 { +unsigned long shmmax; +unsigned long shmmin; +unsigned long shmmni; +unsigned long shmseg; +unsigned long shmall; +unsigned long __unused1; +unsigned long __unused2; +unsigned long __unused3; +unsigned long __unused4; +}; + +#endif /* _PPC_SHMBUF_H */
include/asm-ppc/stat.h +22 -32
61 lines not on this page · raw message
include/linux/highuid.h +3 -0
@@ -72,6 +72,9 @@#define SET_STAT_GID (stat, gid) (stat).st_gid = gid#define high2lowuid (x) (x) +#define high2lowgid (x) (x) +#define low2highuid (x) (x) +#define low2highgid (x) (x)#endif /* UID16_COMPAT_NEEDED */
kernel/sys.c +2 -0
@@ -17,6 +17,7 @@#include <asm/uaccess.h> #include <asm/io.h> +#ifdef UID16_COMPAT_NEEDED /* * this is where the system-wide overflow UID and GID are defined, for * architectures that now have 32-bit UID/GID but didn't in the past
@@ -24,6 +25,7 @@int overflowuid =DEFAULT_OVERFLOWUID ;int overflowgid =DEFAULT_OVERFLOWGID ; +#endif /* UID16_COMPAT_NEEDED */ /* * the same as above, but for filesystems which can only store a 16-bit
kernel/sysctl.c +2 -0
@@ -247,12 +247,14 @@ {KERN_MAX_THREADS ,"threads-max" , &max_threads,sizeof (int ), 0644, NULL, &proc_dointvec}, {KERN_RANDOM, "random", NULL, 0, 0555, random_table}, +#ifdef UID16_COMPAT_NEEDED {KERN_OVERFLOWUID, "overflowuid", &overflowuid, sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec,NULL , &minolduid, &maxolduid}, {KERN_OVERFLOWGID, "overflowgid", &overflowgid, sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec,NULL , &minolduid, &maxolduid}, +#endif /* UID16_COMPAT_NEEDED */ {0} };
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 11 lines · Paul Mackerras
Quoted 3 lines · Andreas Tobler
may some of you are as far as I am, otherwise here is the diff I had to do to get a 2.3.39-linus-tree to compile & boot with a Wallstreet I. hope to ok otherwise let me please know.
I think this patch is not quite the best way to do it. We already had 32-bit uids so we don't need the compatibility crap. Here is a patch that fixes the compile (alternatively my linux-pmac-devel rsync tree has a 2.3.39 tree that compiles and works).
Take a look at 2.3.40-pre2. It includes my uid16 fixes to the core and to the Alpha arch. The Alpha didn't need the 16-bit compatibility mess either.
CONFIG_UID16 is now the define to test... I simply added "define_bool CONFIG_UID16 n" to arch/alpha/config.in, just to make it plain that the compatibility stuff was not wanted.
Regards,
Jeff
Signature · 5 lines
Jeff Garzik | Demotivator of the month: MISTAKES Building 1024 | It Could Be That The Purpose Of Your Life MandrakeSoft, Inc. | Is Only To Serve As A Warning For Others. ** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
kernel powerbook sleep docs
In reply to Paul Mackerrasthis isn't well-documented. here's a start at improving it...
Documentation/Configure.help Thu Feb 17 11:58:03 2000 renamed from linux-pmac-devel-orig/Documentation/Configure.help Thu Feb 10 16:19:48 2000 +16 -0
@@ -2391,6 +2391,22 @@ includes a server that supports the frame buffer device directly (XF68_FBDev). +Power management support for PowerBooks +CONFIG_PMAC_PBOOK + This provides support for putting a PowerBook to sleep; it also + enables media bay support. Power management works on the + PB2400/3400/3500, Wallstreet, Lombard, and Bronze PowerBook G3. You + must get the power management daemon, pmud, to make it work and you + must have the /dev/pmu device (see the pmud README). + + Get pmud from ftp://linuxcare.com.au/pub/ppclinux/pmud/ + + If you have a PowerBook, you should say Y. + + You may also want to compile the dma sound driver as a module and + have it autoloaded. The act of removing the module shuts down the + sound hardware for more power savings. + Matrox unified accelerated driver (EXPERIMENTAL) CONFIG_FB_MATROX Say Y here if you have Matrox Millennium, Matrox Millennium II,
Brad
[email protected] | http://www.turbolinux.com/~brad/
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/