Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7303
b: refs/heads/master
c: 6b9269a
h: refs/heads/master
i:
  7301: ed4877d
  7299: 52a9051
  7295: 94638a8
v: v3
  • Loading branch information
Jon Loeliger authored and Paul Mackerras committed Sep 6, 2005
1 parent 4721c01 commit 19c054f
Show file tree
Hide file tree
Showing 19 changed files with 168 additions and 308 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad6571a78ac74e9fa27e581834709067dba459af
refs/heads/master: 6b9269abd64c54f11dc4aaf162d2915fccae6c77
18 changes: 18 additions & 0 deletions trunk/include/asm-powerpc/bugs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ifndef _POWERPC_BUGS_H
#define _POWERPC_BUGS_H

/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/

/*
* This file is included by 'init/main.c' to check for
* architecture-dependent bugs.
*/

extern void check_bugs(void);

#endif /* _POWERPC_BUGS_H */
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef _POWERPC_MC146818RTC_H
#define _POWERPC_MC146818RTC_H

/*
* Machine dependent access functions for RTC registers.
*
Expand All @@ -6,8 +9,8 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#ifndef __ASM_PPC64_MC146818RTC_H
#define __ASM_PPC64_MC146818RTC_H

#ifdef __KERNEL__

#include <asm/io.h>

Expand All @@ -29,4 +32,5 @@ outb_p((addr),RTC_PORT(0)); \
outb_p((val),RTC_PORT(1)); \
})

#endif /* __ASM_PPC64_MC146818RTC_H */
#endif /* __KERNEL__ */
#endif /* _POWERPC_MC146818RTC_H */
77 changes: 77 additions & 0 deletions trunk/include/asm-powerpc/module.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#ifndef _POWERPC_MODULE_H
#define _POWERPC_MODULE_H

/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/

#include <linux/list.h>
#include <asm/bug.h>


#ifndef __powerpc64__
/*
* Thanks to Paul M for explaining this.
*
* PPC can only do rel jumps += 32MB, and often the kernel and other
* modules are furthur away than this. So, we jump to a table of
* trampolines attached to the module (the Procedure Linkage Table)
* whenever that happens.
*/

struct ppc_plt_entry {
/* 16 byte jump instruction sequence (4 instructions) */
unsigned int jump[4];
};
#endif /* __powerpc64__ */


struct mod_arch_specific {
#ifdef __powerpc64__
unsigned int stubs_section; /* Index of stubs section in module */
unsigned int toc_section; /* What section is the TOC? */
#else
/* Indices of PLT sections within module. */
unsigned int core_plt_section;
unsigned int init_plt_section;
#endif

/* List of BUG addresses, source line numbers and filenames */
struct list_head bug_list;
struct bug_entry *bug_table;
unsigned int num_bugs;
};

extern struct bug_entry *module_find_bug(unsigned long bugaddr);

/*
* Select ELF headers.
* Make empty section for module_frob_arch_sections to expand.
*/

#ifdef __powerpc64__
# define Elf_Shdr Elf64_Shdr
# define Elf_Sym Elf64_Sym
# define Elf_Ehdr Elf64_Ehdr
# ifdef MODULE
asm(".section .stubs,\"ax\",@nobits; .align 3; .previous");
# endif
#else
# define Elf_Shdr Elf32_Shdr
# define Elf_Sym Elf32_Sym
# define Elf_Ehdr Elf32_Ehdr
# ifdef MODULE
asm(".section .plt,\"ax\",@nobits; .align 3; .previous");
asm(".section .init.plt,\"ax\",@nobits; .align 3; .previous");
# endif /* MODULE */
#endif


struct exception_table_entry;
void sort_ex_table(struct exception_table_entry *start,
struct exception_table_entry *finish);

#endif /* _POWERPC_MODULE_H */
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
#ifndef _PPC64_SEMBUF_H
#define _PPC64_SEMBUF_H
#ifndef _POWERPC_SEMBUF_H
#define _POWERPC_SEMBUF_H

/*
* The semid64_ds structure for PPC architecture.
*
*
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/

/*
* 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:
* - 2 miscellaneous 64-bit values
* - 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 */
#ifndef __powerpc64__
unsigned long __unused1;
#endif
__kernel_time_t sem_otime; /* last semop time */
#ifndef __powerpc64__
unsigned long __unused2;
#endif
__kernel_time_t sem_ctime; /* last change time */
unsigned long sem_nsems; /* no. of semaphores in array */

unsigned long __unused1;
unsigned long __unused2;
unsigned long __unused3;
unsigned long __unused4;
};

#endif /* _PPC64_SEMBUF_H */
#endif /* _POWERPC_SEMBUF_H */
Original file line number Diff line number Diff line change
@@ -1,31 +1,47 @@
#ifndef _PPC64_SHMBUF_H
#define _PPC64_SHMBUF_H
#ifndef _POWERPC_SHMBUF_H
#define _POWERPC_SHMBUF_H

/*
* The shmid64_ds structure for PPC64 architecture.
* Note extra padding because this structure is passed back and forth
* between kernel and user space.
*
* Pad space is left for:
* - 2 miscellaneous 64-bit values
*
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/

/*
* The shmid64_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 shmid64_ds {
struct ipc64_perm shm_perm; /* operation perms */
#ifndef __power64__
unsigned long __unused1;
#endif
__kernel_time_t shm_atime; /* last attach time */
#ifndef __power64__
unsigned long __unused2;
#endif
__kernel_time_t shm_dtime; /* last detach time */
#ifndef __power64__
unsigned long __unused3;
#endif
__kernel_time_t shm_ctime; /* last change time */
#ifndef __power64__
unsigned long __unused4;
#endif
size_t shm_segsz; /* size of segment (bytes) */
__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 __unused1;
unsigned long __unused2;
unsigned long __unused5;
unsigned long __unused6;
};

struct shminfo64 {
Expand All @@ -40,4 +56,4 @@ struct shminfo64 {
unsigned long __unused4;
};

#endif /* _PPC64_SHMBUF_H */
#endif /* _POWERPC_SHMBUF_H */
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _PPC64_SIGINFO_H
#define _PPC64_SIGINFO_H
#ifndef _POWERPC_SIGINFO_H
#define _POWERPC_SIGINFO_H

/*
* This program is free software; you can redistribute it and/or
Expand All @@ -8,9 +8,11 @@
* 2 of the License, or (at your option) any later version.
*/

#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
#define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3)
#ifdef __powerpc64__
# define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
# define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3)
#endif

#include <asm-generic/siginfo.h>

#endif /* _PPC64_SIGINFO_H */
#endif /* _POWERPC_SIGINFO_H */
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _ASM_SOCKET_H
#define _ASM_SOCKET_H
#ifndef _POWERPC_SOCKET_H
#define _POWERPC_SOCKET_H

/*
* This program is free software; you can redistribute it and/or
Expand All @@ -10,7 +10,7 @@

#include <asm/sockios.h>

/* For setsockoptions(2) */
/* For setsockopt(2) */
#define SOL_SOCKET 1

#define SO_DEBUG 1
Expand Down Expand Up @@ -52,8 +52,8 @@
#define SO_TIMESTAMP 29
#define SCM_TIMESTAMP SO_TIMESTAMP

#define SO_ACCEPTCONN 30
#define SO_ACCEPTCONN 30

#define SO_PEERSEC 31
#define SO_PEERSEC 31

#endif /* _ASM_SOCKET_H */
#endif /* _POWERPC_SOCKET_H */
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _ASM_PPC64_SOCKIOS_H
#define _ASM_PPC64_SOCKIOS_H
#ifndef _POWERPC_SOCKIOS_H
#define _POWERPC_SOCKIOS_H

/*
* This program is free software; you can redistribute it and/or
Expand All @@ -16,4 +16,4 @@
#define SIOCATMARK 0x8905
#define SIOCGSTAMP 0x8906 /* Get stamp */

#endif /* _ASM_PPC64_SOCKIOS_H */
#endif /* _POWERPC_SOCKIOS_H */
6 changes: 0 additions & 6 deletions trunk/include/asm-ppc/bugs.h

This file was deleted.

31 changes: 0 additions & 31 deletions trunk/include/asm-ppc/mc146818rtc.h

This file was deleted.

44 changes: 0 additions & 44 deletions trunk/include/asm-ppc/module.h

This file was deleted.

Loading

0 comments on commit 19c054f

Please sign in to comment.