Commit dd56fdf23dfa0127d512b73d4238dbd2b5a7c1eb
Committed by
Paul Mackerras
1 parent
64807081e3
Exists in
master
and in
39 other branches
[PATCH] powerpc: Merge a few more include files
Merge a few asm-ppc and asm-ppc64 header files. Note: the merge of setup.h intentionally does not carry forward the m68k cruft. That means this patch continues to break the already broken amiga on the ppc32. Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Showing 18 changed files with 240 additions and 380 deletions Side-by-side Diff
- include/asm-powerpc/msgbuf.h
- include/asm-powerpc/param.h
- include/asm-powerpc/setup.h
- include/asm-powerpc/timex.h
- include/asm-powerpc/topology.h
- include/asm-powerpc/user.h
- include/asm-ppc/msgbuf.h
- include/asm-ppc/param.h
- include/asm-ppc/setup.h
- include/asm-ppc/timex.h
- include/asm-ppc/topology.h
- include/asm-ppc/user.h
- include/asm-ppc64/msgbuf.h
- include/asm-ppc64/param.h
- include/asm-ppc64/setup.h
- include/asm-ppc64/timex.h
- include/asm-ppc64/topology.h
- include/asm-ppc64/user.h
include/asm-powerpc/msgbuf.h
1 | +#ifndef _ASM_POWERPC_MSGBUF_H | |
2 | +#define _ASM_POWERPC_MSGBUF_H | |
3 | + | |
4 | +/* | |
5 | + * The msqid64_ds structure for the PowerPC architecture. | |
6 | + * Note extra padding because this structure is passed back and forth | |
7 | + * between kernel and user space. | |
8 | + */ | |
9 | + | |
10 | +struct msqid64_ds { | |
11 | + struct ipc64_perm msg_perm; | |
12 | +#ifndef __powerpc64__ | |
13 | + unsigned int __unused1; | |
14 | +#endif | |
15 | + __kernel_time_t msg_stime; /* last msgsnd time */ | |
16 | +#ifndef __powerpc64__ | |
17 | + unsigned int __unused2; | |
18 | +#endif | |
19 | + __kernel_time_t msg_rtime; /* last msgrcv time */ | |
20 | +#ifndef __powerpc64__ | |
21 | + unsigned int __unused3; | |
22 | +#endif | |
23 | + __kernel_time_t msg_ctime; /* last change time */ | |
24 | + unsigned long msg_cbytes; /* current number of bytes on queue */ | |
25 | + unsigned long msg_qnum; /* number of messages in queue */ | |
26 | + unsigned long msg_qbytes; /* max number of bytes on queue */ | |
27 | + __kernel_pid_t msg_lspid; /* pid of last msgsnd */ | |
28 | + __kernel_pid_t msg_lrpid; /* last receive pid */ | |
29 | + unsigned long __unused4; | |
30 | + unsigned long __unused5; | |
31 | +}; | |
32 | + | |
33 | +#endif /* _ASM_POWERPC_MSGBUF_H */ |
include/asm-powerpc/param.h
1 | +#ifndef _ASM_POWERPC_PARAM_H | |
2 | +#define _ASM_POWERPC_PARAM_H | |
3 | + | |
4 | +#include <linux/config.h> | |
5 | + | |
6 | +#ifdef __KERNEL__ | |
7 | +#define HZ CONFIG_HZ /* internal kernel timer frequency */ | |
8 | +#define USER_HZ 100 /* for user interfaces in "ticks" */ | |
9 | +#define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ | |
10 | +#endif /* __KERNEL__ */ | |
11 | + | |
12 | +#ifndef HZ | |
13 | +#define HZ 100 | |
14 | +#endif | |
15 | + | |
16 | +#define EXEC_PAGESIZE 4096 | |
17 | + | |
18 | +#ifndef NOGROUP | |
19 | +#define NOGROUP (-1) | |
20 | +#endif | |
21 | + | |
22 | +#define MAXHOSTNAMELEN 64 /* max length of hostname */ | |
23 | + | |
24 | +#endif /* _ASM_POWERPC_PARAM_H */ |
include/asm-powerpc/setup.h
include/asm-powerpc/timex.h
1 | +#ifndef _ASM_POWERPC_TIMEX_H | |
2 | +#define _ASM_POWERPC_TIMEX_H | |
3 | + | |
4 | +#ifdef __KERNEL__ | |
5 | + | |
6 | +/* | |
7 | + * PowerPC architecture timex specifications | |
8 | + */ | |
9 | + | |
10 | +#include <linux/config.h> | |
11 | +#include <asm/cputable.h> | |
12 | + | |
13 | +#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ | |
14 | + | |
15 | +typedef unsigned long cycles_t; | |
16 | + | |
17 | +static inline cycles_t get_cycles(void) | |
18 | +{ | |
19 | + cycles_t ret; | |
20 | + | |
21 | +#ifdef __powerpc64__ | |
22 | + | |
23 | + __asm__ __volatile__("mftb %0" : "=r" (ret) : ); | |
24 | + | |
25 | +#else | |
26 | + /* | |
27 | + * For the "cycle" counter we use the timebase lower half. | |
28 | + * Currently only used on SMP. | |
29 | + */ | |
30 | + | |
31 | + ret = 0; | |
32 | + | |
33 | + __asm__ __volatile__( | |
34 | + "98: mftb %0\n" | |
35 | + "99:\n" | |
36 | + ".section __ftr_fixup,\"a\"\n" | |
37 | + " .long %1\n" | |
38 | + " .long 0\n" | |
39 | + " .long 98b\n" | |
40 | + " .long 99b\n" | |
41 | + ".previous" | |
42 | + : "=r" (ret) : "i" (CPU_FTR_601)); | |
43 | +#endif | |
44 | + | |
45 | + return ret; | |
46 | +} | |
47 | + | |
48 | +#endif /* __KERNEL__ */ | |
49 | +#endif /* _ASM_POWERPC_TIMEX_H */ |
include/asm-powerpc/topology.h
1 | +#ifndef _ASM_POWERPC_TOPOLOGY_H | |
2 | +#define _ASM_POWERPC_TOPOLOGY_H | |
3 | + | |
4 | +#include <linux/config.h> | |
5 | + | |
6 | +#ifdef CONFIG_NUMA | |
7 | + | |
8 | +#include <asm/mmzone.h> | |
9 | + | |
10 | +static inline int cpu_to_node(int cpu) | |
11 | +{ | |
12 | + int node; | |
13 | + | |
14 | + node = numa_cpu_lookup_table[cpu]; | |
15 | + | |
16 | +#ifdef DEBUG_NUMA | |
17 | + BUG_ON(node == -1); | |
18 | +#endif | |
19 | + | |
20 | + return node; | |
21 | +} | |
22 | + | |
23 | +#define parent_node(node) (node) | |
24 | + | |
25 | +static inline cpumask_t node_to_cpumask(int node) | |
26 | +{ | |
27 | + return numa_cpumask_lookup_table[node]; | |
28 | +} | |
29 | + | |
30 | +static inline int node_to_first_cpu(int node) | |
31 | +{ | |
32 | + cpumask_t tmp; | |
33 | + tmp = node_to_cpumask(node); | |
34 | + return first_cpu(tmp); | |
35 | +} | |
36 | + | |
37 | +#define pcibus_to_node(node) (-1) | |
38 | +#define pcibus_to_cpumask(bus) (cpu_online_map) | |
39 | + | |
40 | +#define nr_cpus_node(node) (nr_cpus_in_node[node]) | |
41 | + | |
42 | +/* sched_domains SD_NODE_INIT for PPC64 machines */ | |
43 | +#define SD_NODE_INIT (struct sched_domain) { \ | |
44 | + .span = CPU_MASK_NONE, \ | |
45 | + .parent = NULL, \ | |
46 | + .groups = NULL, \ | |
47 | + .min_interval = 8, \ | |
48 | + .max_interval = 32, \ | |
49 | + .busy_factor = 32, \ | |
50 | + .imbalance_pct = 125, \ | |
51 | + .cache_hot_time = (10*1000000), \ | |
52 | + .cache_nice_tries = 1, \ | |
53 | + .per_cpu_gain = 100, \ | |
54 | + .flags = SD_LOAD_BALANCE \ | |
55 | + | SD_BALANCE_EXEC \ | |
56 | + | SD_BALANCE_NEWIDLE \ | |
57 | + | SD_WAKE_IDLE \ | |
58 | + | SD_WAKE_BALANCE, \ | |
59 | + .last_balance = jiffies, \ | |
60 | + .balance_interval = 1, \ | |
61 | + .nr_balance_failed = 0, \ | |
62 | +} | |
63 | + | |
64 | +#else | |
65 | + | |
66 | +#include <asm-generic/topology.h> | |
67 | + | |
68 | +#endif /* CONFIG_NUMA */ | |
69 | + | |
70 | +#endif /* _ASM_POWERPC_TOPOLOGY_H */ |
include/asm-powerpc/user.h
1 | +#ifndef _ASM_POWERPC_USER_H | |
2 | +#define _ASM_POWERPC_USER_H | |
3 | + | |
4 | +#ifdef __KERNEL__ | |
5 | + | |
6 | +#include <asm/ptrace.h> | |
7 | +#include <asm/page.h> | |
8 | + | |
9 | +/* | |
10 | + * Adapted from <asm-alpha/user.h> | |
11 | + * | |
12 | + * Core file format: The core file is written in such a way that gdb | |
13 | + * can understand it and provide useful information to the user (under | |
14 | + * linux we use the `trad-core' bfd, NOT the osf-core). The file contents | |
15 | + * are as follows: | |
16 | + * | |
17 | + * upage: 1 page consisting of a user struct that tells gdb | |
18 | + * what is present in the file. Directly after this is a | |
19 | + * copy of the task_struct, which is currently not used by gdb, | |
20 | + * but it may come in handy at some point. All of the registers | |
21 | + * are stored as part of the upage. The upage should always be | |
22 | + * only one page long. | |
23 | + * data: The data segment follows next. We use current->end_text to | |
24 | + * current->brk to pick up all of the user variables, plus any memory | |
25 | + * that may have been sbrk'ed. No attempt is made to determine if a | |
26 | + * page is demand-zero or if a page is totally unused, we just cover | |
27 | + * the entire range. All of the addresses are rounded in such a way | |
28 | + * that an integral number of pages is written. | |
29 | + * stack: We need the stack information in order to get a meaningful | |
30 | + * backtrace. We need to write the data from usp to | |
31 | + * current->start_stack, so we round each of these in order to be able | |
32 | + * to write an integer number of pages. | |
33 | + */ | |
34 | +struct user { | |
35 | + struct pt_regs regs; /* entire machine state */ | |
36 | + size_t u_tsize; /* text size (pages) */ | |
37 | + size_t u_dsize; /* data size (pages) */ | |
38 | + size_t u_ssize; /* stack size (pages) */ | |
39 | + unsigned long start_code; /* text starting address */ | |
40 | + unsigned long start_data; /* data starting address */ | |
41 | + unsigned long start_stack; /* stack starting address */ | |
42 | + long int signal; /* signal causing core dump */ | |
43 | + struct regs * u_ar0; /* help gdb find registers */ | |
44 | + unsigned long magic; /* identifies a core file */ | |
45 | + char u_comm[32]; /* user command name */ | |
46 | +}; | |
47 | + | |
48 | +#define NBPG PAGE_SIZE | |
49 | +#define UPAGES 1 | |
50 | +#define HOST_TEXT_START_ADDR (u.start_code) | |
51 | +#define HOST_DATA_START_ADDR (u.start_data) | |
52 | +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) | |
53 | + | |
54 | +#endif /* __KERNEL__ */ | |
55 | +#endif /* _ASM_POWERPC_USER_H */ |
include/asm-ppc/msgbuf.h
1 | -#ifndef _PPC_MSGBUF_H | |
2 | -#define _PPC_MSGBUF_H | |
3 | - | |
4 | -/* | |
5 | - * The msqid64_ds structure for the PPC architecture. | |
6 | - */ | |
7 | - | |
8 | -struct msqid64_ds { | |
9 | - struct ipc64_perm msg_perm; | |
10 | - unsigned int __unused1; | |
11 | - __kernel_time_t msg_stime; /* last msgsnd time */ | |
12 | - unsigned int __unused2; | |
13 | - __kernel_time_t msg_rtime; /* last msgrcv time */ | |
14 | - unsigned int __unused3; | |
15 | - __kernel_time_t msg_ctime; /* last change time */ | |
16 | - unsigned long msg_cbytes; /* current number of bytes on queue */ | |
17 | - unsigned long msg_qnum; /* number of messages in queue */ | |
18 | - unsigned long msg_qbytes; /* max number of bytes on queue */ | |
19 | - __kernel_pid_t msg_lspid; /* pid of last msgsnd */ | |
20 | - __kernel_pid_t msg_lrpid; /* last receive pid */ | |
21 | - unsigned long __unused4; | |
22 | - unsigned long __unused5; | |
23 | -}; | |
24 | - | |
25 | -#endif /* _PPC_MSGBUF_H */ |
include/asm-ppc/param.h
1 | -#ifndef _ASM_PPC_PARAM_H | |
2 | -#define _ASM_PPC_PARAM_H | |
3 | - | |
4 | -#include <linux/config.h> | |
5 | - | |
6 | -#ifdef __KERNEL__ | |
7 | -#define HZ CONFIG_HZ /* internal timer frequency */ | |
8 | -#define USER_HZ 100 /* for user interfaces in "ticks" */ | |
9 | -#define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ | |
10 | -#endif /* __KERNEL__ */ | |
11 | - | |
12 | -#ifndef HZ | |
13 | -#define HZ 100 | |
14 | -#endif | |
15 | - | |
16 | -#define EXEC_PAGESIZE 4096 | |
17 | - | |
18 | -#ifndef NOGROUP | |
19 | -#define NOGROUP (-1) | |
20 | -#endif | |
21 | - | |
22 | -#define MAXHOSTNAMELEN 64 /* max length of hostname */ | |
23 | - | |
24 | -#endif |
include/asm-ppc/setup.h
1 | -#ifdef __KERNEL__ | |
2 | -#ifndef _PPC_SETUP_H | |
3 | -#define _PPC_SETUP_H | |
4 | - | |
5 | -#define m68k_num_memory num_memory | |
6 | -#define m68k_memory memory | |
7 | - | |
8 | -#include <asm-m68k/setup.h> | |
9 | -/* We have a bigger command line buffer. */ | |
10 | -#undef COMMAND_LINE_SIZE | |
11 | -#define COMMAND_LINE_SIZE 512 | |
12 | - | |
13 | -#endif /* _PPC_SETUP_H */ | |
14 | -#endif /* __KERNEL__ */ |
include/asm-ppc/timex.h
1 | -/* | |
2 | - * include/asm-ppc/timex.h | |
3 | - * | |
4 | - * ppc architecture timex specifications | |
5 | - */ | |
6 | -#ifdef __KERNEL__ | |
7 | -#ifndef _ASMppc_TIMEX_H | |
8 | -#define _ASMppc_TIMEX_H | |
9 | - | |
10 | -#include <linux/config.h> | |
11 | -#include <asm/cputable.h> | |
12 | - | |
13 | -#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ | |
14 | - | |
15 | -typedef unsigned long cycles_t; | |
16 | - | |
17 | -/* | |
18 | - * For the "cycle" counter we use the timebase lower half. | |
19 | - * Currently only used on SMP. | |
20 | - */ | |
21 | - | |
22 | -static inline cycles_t get_cycles(void) | |
23 | -{ | |
24 | - cycles_t ret = 0; | |
25 | - | |
26 | - __asm__ __volatile__( | |
27 | - "98: mftb %0\n" | |
28 | - "99:\n" | |
29 | - ".section __ftr_fixup,\"a\"\n" | |
30 | - " .long %1\n" | |
31 | - " .long 0\n" | |
32 | - " .long 98b\n" | |
33 | - " .long 99b\n" | |
34 | - ".previous" | |
35 | - : "=r" (ret) : "i" (CPU_FTR_601)); | |
36 | - return ret; | |
37 | -} | |
38 | - | |
39 | -#endif | |
40 | -#endif /* __KERNEL__ */ |
include/asm-ppc/topology.h
include/asm-ppc/user.h
1 | -#ifdef __KERNEL__ | |
2 | -#ifndef _PPC_USER_H | |
3 | -#define _PPC_USER_H | |
4 | - | |
5 | -/* Adapted from <asm-alpha/user.h> */ | |
6 | - | |
7 | -#include <linux/ptrace.h> | |
8 | -#include <asm/page.h> | |
9 | - | |
10 | -/* | |
11 | - * Core file format: The core file is written in such a way that gdb | |
12 | - * can understand it and provide useful information to the user (under | |
13 | - * linux we use the `trad-core' bfd, NOT the osf-core). The file contents | |
14 | - * are as follows: | |
15 | - * | |
16 | - * upage: 1 page consisting of a user struct that tells gdb | |
17 | - * what is present in the file. Directly after this is a | |
18 | - * copy of the task_struct, which is currently not used by gdb, | |
19 | - * but it may come in handy at some point. All of the registers | |
20 | - * are stored as part of the upage. The upage should always be | |
21 | - * only one page long. | |
22 | - * data: The data segment follows next. We use current->end_text to | |
23 | - * current->brk to pick up all of the user variables, plus any memory | |
24 | - * that may have been sbrk'ed. No attempt is made to determine if a | |
25 | - * page is demand-zero or if a page is totally unused, we just cover | |
26 | - * the entire range. All of the addresses are rounded in such a way | |
27 | - * that an integral number of pages is written. | |
28 | - * stack: We need the stack information in order to get a meaningful | |
29 | - * backtrace. We need to write the data from usp to | |
30 | - * current->start_stack, so we round each of these in order to be able | |
31 | - * to write an integer number of pages. | |
32 | - */ | |
33 | -struct user { | |
34 | - struct pt_regs regs; /* entire machine state */ | |
35 | - size_t u_tsize; /* text size (pages) */ | |
36 | - size_t u_dsize; /* data size (pages) */ | |
37 | - size_t u_ssize; /* stack size (pages) */ | |
38 | - unsigned long start_code; /* text starting address */ | |
39 | - unsigned long start_data; /* data starting address */ | |
40 | - unsigned long start_stack; /* stack starting address */ | |
41 | - long int signal; /* signal causing core dump */ | |
42 | - struct regs * u_ar0; /* help gdb find registers */ | |
43 | - unsigned long magic; /* identifies a core file */ | |
44 | - char u_comm[32]; /* user command name */ | |
45 | -}; | |
46 | - | |
47 | -#define NBPG PAGE_SIZE | |
48 | -#define UPAGES 1 | |
49 | -#define HOST_TEXT_START_ADDR (u.start_code) | |
50 | -#define HOST_DATA_START_ADDR (u.start_data) | |
51 | -#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) | |
52 | - | |
53 | -#endif /* _PPC_USER_H */ | |
54 | -#endif /* __KERNEL__ */ |
include/asm-ppc64/msgbuf.h
1 | -#ifndef _PPC64_MSGBUF_H | |
2 | -#define _PPC64_MSGBUF_H | |
3 | - | |
4 | -/* | |
5 | - * The msqid64_ds structure for the PPC architecture. | |
6 | - * | |
7 | - * This program is free software; you can redistribute it and/or | |
8 | - * modify it under the terms of the GNU General Public License | |
9 | - * as published by the Free Software Foundation; either version | |
10 | - * 2 of the License, or (at your option) any later version. | |
11 | - */ | |
12 | - | |
13 | -struct msqid64_ds { | |
14 | - struct ipc64_perm msg_perm; | |
15 | - __kernel_time_t msg_stime; /* last msgsnd time */ | |
16 | - __kernel_time_t msg_rtime; /* last msgrcv time */ | |
17 | - __kernel_time_t msg_ctime; /* last change time */ | |
18 | - unsigned long msg_cbytes; /* current number of bytes on queue */ | |
19 | - unsigned long msg_qnum; /* number of messages in queue */ | |
20 | - unsigned long msg_qbytes; /* max number of bytes on queue */ | |
21 | - __kernel_pid_t msg_lspid; /* pid of last msgsnd */ | |
22 | - __kernel_pid_t msg_lrpid; /* last receive pid */ | |
23 | - unsigned long __unused1; | |
24 | - unsigned long __unused2; | |
25 | -}; | |
26 | - | |
27 | -#endif /* _PPC64_MSGBUF_H */ |
include/asm-ppc64/param.h
1 | -#ifndef _ASM_PPC64_PARAM_H | |
2 | -#define _ASM_PPC64_PARAM_H | |
3 | - | |
4 | -#include <linux/config.h> | |
5 | - | |
6 | -/* | |
7 | - * This program is free software; you can redistribute it and/or | |
8 | - * modify it under the terms of the GNU General Public License | |
9 | - * as published by the Free Software Foundation; either version | |
10 | - * 2 of the License, or (at your option) any later version. | |
11 | - */ | |
12 | - | |
13 | -#ifdef __KERNEL__ | |
14 | -# define HZ CONFIG_HZ /* Internal kernel timer frequency */ | |
15 | -# define USER_HZ 100 /* .. some user interfaces are in "ticks" */ | |
16 | -# define CLOCKS_PER_SEC (USER_HZ) /* like times() */ | |
17 | -#endif | |
18 | - | |
19 | -#ifndef HZ | |
20 | -#define HZ 100 | |
21 | -#endif | |
22 | - | |
23 | -#define EXEC_PAGESIZE 4096 | |
24 | - | |
25 | -#ifndef NOGROUP | |
26 | -#define NOGROUP (-1) | |
27 | -#endif | |
28 | - | |
29 | -#define MAXHOSTNAMELEN 64 /* max length of hostname */ | |
30 | - | |
31 | -#endif /* _ASM_PPC64_PARAM_H */ |
include/asm-ppc64/setup.h
include/asm-ppc64/timex.h
1 | -/* | |
2 | - * linux/include/asm-ppc/timex.h | |
3 | - * | |
4 | - * PPC64 architecture timex specifications | |
5 | - * | |
6 | - * This program is free software; you can redistribute it and/or | |
7 | - * modify it under the terms of the GNU General Public License | |
8 | - * as published by the Free Software Foundation; either version | |
9 | - * 2 of the License, or (at your option) any later version. | |
10 | - */ | |
11 | -#ifndef _ASMPPC64_TIMEX_H | |
12 | -#define _ASMPPC64_TIMEX_H | |
13 | - | |
14 | -#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ | |
15 | - | |
16 | -typedef unsigned long cycles_t; | |
17 | - | |
18 | -static inline cycles_t get_cycles(void) | |
19 | -{ | |
20 | - cycles_t ret; | |
21 | - | |
22 | - __asm__ __volatile__("mftb %0" : "=r" (ret) : ); | |
23 | - return ret; | |
24 | -} | |
25 | - | |
26 | -#endif |
include/asm-ppc64/topology.h
1 | -#ifndef _ASM_PPC64_TOPOLOGY_H | |
2 | -#define _ASM_PPC64_TOPOLOGY_H | |
3 | - | |
4 | -#include <linux/config.h> | |
5 | -#include <asm/mmzone.h> | |
6 | - | |
7 | -#ifdef CONFIG_NUMA | |
8 | - | |
9 | -static inline int cpu_to_node(int cpu) | |
10 | -{ | |
11 | - int node; | |
12 | - | |
13 | - node = numa_cpu_lookup_table[cpu]; | |
14 | - | |
15 | -#ifdef DEBUG_NUMA | |
16 | - BUG_ON(node == -1); | |
17 | -#endif | |
18 | - | |
19 | - return node; | |
20 | -} | |
21 | - | |
22 | -#define parent_node(node) (node) | |
23 | - | |
24 | -static inline cpumask_t node_to_cpumask(int node) | |
25 | -{ | |
26 | - return numa_cpumask_lookup_table[node]; | |
27 | -} | |
28 | - | |
29 | -static inline int node_to_first_cpu(int node) | |
30 | -{ | |
31 | - cpumask_t tmp; | |
32 | - tmp = node_to_cpumask(node); | |
33 | - return first_cpu(tmp); | |
34 | -} | |
35 | - | |
36 | -#define pcibus_to_node(node) (-1) | |
37 | -#define pcibus_to_cpumask(bus) (cpu_online_map) | |
38 | - | |
39 | -#define nr_cpus_node(node) (nr_cpus_in_node[node]) | |
40 | - | |
41 | -/* sched_domains SD_NODE_INIT for PPC64 machines */ | |
42 | -#define SD_NODE_INIT (struct sched_domain) { \ | |
43 | - .span = CPU_MASK_NONE, \ | |
44 | - .parent = NULL, \ | |
45 | - .groups = NULL, \ | |
46 | - .min_interval = 8, \ | |
47 | - .max_interval = 32, \ | |
48 | - .busy_factor = 32, \ | |
49 | - .imbalance_pct = 125, \ | |
50 | - .cache_hot_time = (10*1000000), \ | |
51 | - .cache_nice_tries = 1, \ | |
52 | - .per_cpu_gain = 100, \ | |
53 | - .flags = SD_LOAD_BALANCE \ | |
54 | - | SD_BALANCE_EXEC \ | |
55 | - | SD_BALANCE_NEWIDLE \ | |
56 | - | SD_WAKE_IDLE \ | |
57 | - | SD_WAKE_BALANCE, \ | |
58 | - .last_balance = jiffies, \ | |
59 | - .balance_interval = 1, \ | |
60 | - .nr_balance_failed = 0, \ | |
61 | -} | |
62 | - | |
63 | -#else | |
64 | - | |
65 | -#include <asm-generic/topology.h> | |
66 | - | |
67 | -#endif /* CONFIG_NUMA */ | |
68 | - | |
69 | -#endif /* _ASM_PPC64_TOPOLOGY_H */ |
include/asm-ppc64/user.h
1 | -#ifndef _PPC_USER_H | |
2 | -#define _PPC_USER_H | |
3 | - | |
4 | -/* Adapted from <asm-alpha/user.h> | |
5 | - * | |
6 | - * This program is free software; you can redistribute it and/or | |
7 | - * modify it under the terms of the GNU General Public License | |
8 | - * as published by the Free Software Foundation; either version | |
9 | - * 2 of the License, or (at your option) any later version. | |
10 | - */ | |
11 | - | |
12 | -#include <asm/ptrace.h> | |
13 | -#include <asm/page.h> | |
14 | - | |
15 | -/* | |
16 | - * Core file format: The core file is written in such a way that gdb | |
17 | - * can understand it and provide useful information to the user (under | |
18 | - * linux we use the `trad-core' bfd, NOT the osf-core). The file contents | |
19 | - * are as follows: | |
20 | - * | |
21 | - * upage: 1 page consisting of a user struct that tells gdb | |
22 | - * what is present in the file. Directly after this is a | |
23 | - * copy of the task_struct, which is currently not used by gdb, | |
24 | - * but it may come in handy at some point. All of the registers | |
25 | - * are stored as part of the upage. The upage should always be | |
26 | - * only one page long. | |
27 | - * data: The data segment follows next. We use current->end_text to | |
28 | - * current->brk to pick up all of the user variables, plus any memory | |
29 | - * that may have been sbrk'ed. No attempt is made to determine if a | |
30 | - * page is demand-zero or if a page is totally unused, we just cover | |
31 | - * the entire range. All of the addresses are rounded in such a way | |
32 | - * that an integral number of pages is written. | |
33 | - * stack: We need the stack information in order to get a meaningful | |
34 | - * backtrace. We need to write the data from usp to | |
35 | - * current->start_stack, so we round each of these in order to be able | |
36 | - * to write an integer number of pages. | |
37 | - */ | |
38 | -struct user { | |
39 | - struct pt_regs regs; /* entire machine state */ | |
40 | - size_t u_tsize; /* text size (pages) */ | |
41 | - size_t u_dsize; /* data size (pages) */ | |
42 | - size_t u_ssize; /* stack size (pages) */ | |
43 | - unsigned long start_code; /* text starting address */ | |
44 | - unsigned long start_data; /* data starting address */ | |
45 | - unsigned long start_stack; /* stack starting address */ | |
46 | - long int signal; /* signal causing core dump */ | |
47 | - struct regs * u_ar0; /* help gdb find registers */ | |
48 | - unsigned long magic; /* identifies a core file */ | |
49 | - char u_comm[32]; /* user command name */ | |
50 | -}; | |
51 | - | |
52 | -#define NBPG PAGE_SIZE | |
53 | -#define UPAGES 1 | |
54 | -#define HOST_TEXT_START_ADDR (u.start_code) | |
55 | -#define HOST_DATA_START_ADDR (u.start_data) | |
56 | -#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) | |
57 | - | |
58 | -#endif /* _PPC_USER_H */ |