diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 13:38:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 13:38:02 -0400 |
commit | 3aed77bc84013fced136977b7cc17fff60eddf7a (patch) | |
tree | 75ee4060f58f033deb16771a303fb55dd370b6f9 /include/asm-ppc64 | |
parent | 0b968d23610d65a46299347b141a687e207bd294 (diff) | |
parent | b2ad7b5e8115582cdf5bbda065aa516c24d62c21 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6
Diffstat (limited to 'include/asm-ppc64')
-rw-r--r-- | include/asm-ppc64/msgbuf.h | 27 | ||||
-rw-r--r-- | include/asm-ppc64/param.h | 31 | ||||
-rw-r--r-- | include/asm-ppc64/pci-bridge.h | 45 | ||||
-rw-r--r-- | include/asm-ppc64/prom.h | 19 | ||||
-rw-r--r-- | include/asm-ppc64/segment.h | 6 | ||||
-rw-r--r-- | include/asm-ppc64/setup.h | 6 | ||||
-rw-r--r-- | include/asm-ppc64/timex.h | 26 | ||||
-rw-r--r-- | include/asm-ppc64/topology.h | 69 | ||||
-rw-r--r-- | include/asm-ppc64/user.h | 58 |
9 files changed, 40 insertions, 247 deletions
diff --git a/include/asm-ppc64/msgbuf.h b/include/asm-ppc64/msgbuf.h deleted file mode 100644 index 31c1cbf133cc..000000000000 --- a/include/asm-ppc64/msgbuf.h +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
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 */ | ||
diff --git a/include/asm-ppc64/param.h b/include/asm-ppc64/param.h deleted file mode 100644 index 76c212d475b3..000000000000 --- a/include/asm-ppc64/param.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
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 */ | ||
diff --git a/include/asm-ppc64/pci-bridge.h b/include/asm-ppc64/pci-bridge.h index c4f9023ea5ed..6b4a5b1f695e 100644 --- a/include/asm-ppc64/pci-bridge.h +++ b/include/asm-ppc64/pci-bridge.h | |||
@@ -48,19 +48,52 @@ struct pci_controller { | |||
48 | unsigned long dma_window_size; | 48 | unsigned long dma_window_size; |
49 | }; | 49 | }; |
50 | 50 | ||
51 | /* | ||
52 | * PCI stuff, for nodes representing PCI devices, pointed to | ||
53 | * by device_node->data. | ||
54 | */ | ||
55 | struct pci_controller; | ||
56 | struct iommu_table; | ||
57 | |||
58 | struct pci_dn { | ||
59 | int busno; /* for pci devices */ | ||
60 | int bussubno; /* for pci devices */ | ||
61 | int devfn; /* for pci devices */ | ||
62 | int eeh_mode; /* See eeh.h for possible EEH_MODEs */ | ||
63 | int eeh_config_addr; | ||
64 | int eeh_capable; /* from firmware */ | ||
65 | int eeh_check_count; /* # times driver ignored error */ | ||
66 | int eeh_freeze_count; /* # times this device froze up. */ | ||
67 | int eeh_is_bridge; /* device is pci-to-pci bridge */ | ||
68 | |||
69 | int pci_ext_config_space; /* for pci devices */ | ||
70 | struct pci_controller *phb; /* for pci devices */ | ||
71 | struct iommu_table *iommu_table; /* for phb's or bridges */ | ||
72 | struct pci_dev *pcidev; /* back-pointer to the pci device */ | ||
73 | struct device_node *node; /* back-pointer to the device_node */ | ||
74 | u32 config_space[16]; /* saved PCI config space */ | ||
75 | }; | ||
76 | |||
77 | /* Get the pointer to a device_node's pci_dn */ | ||
78 | #define PCI_DN(dn) ((struct pci_dn *) (dn)->data) | ||
79 | |||
51 | struct device_node *fetch_dev_dn(struct pci_dev *dev); | 80 | struct device_node *fetch_dev_dn(struct pci_dev *dev); |
52 | 81 | ||
53 | /* Get a device_node from a pci_dev. This code must be fast except in the case | 82 | /* Get a device_node from a pci_dev. This code must be fast except |
54 | * where the sysdata is incorrect and needs to be fixed up (hopefully just once) | 83 | * in the case where the sysdata is incorrect and needs to be fixed |
84 | * up (this will only happen once). | ||
85 | * In this case the sysdata will have been inherited from a PCI host | ||
86 | * bridge or a PCI-PCI bridge further up the tree, so it will point | ||
87 | * to a valid struct pci_dn, just not the one we want. | ||
55 | */ | 88 | */ |
56 | static inline struct device_node *pci_device_to_OF_node(struct pci_dev *dev) | 89 | static inline struct device_node *pci_device_to_OF_node(struct pci_dev *dev) |
57 | { | 90 | { |
58 | struct device_node *dn = dev->sysdata; | 91 | struct device_node *dn = dev->sysdata; |
92 | struct pci_dn *pdn = dn->data; | ||
59 | 93 | ||
60 | if (dn->devfn == dev->devfn && dn->busno == dev->bus->number) | 94 | if (pdn && pdn->devfn == dev->devfn && pdn->busno == dev->bus->number) |
61 | return dn; /* fast path. sysdata is good */ | 95 | return dn; /* fast path. sysdata is good */ |
62 | else | 96 | return fetch_dev_dn(dev); |
63 | return fetch_dev_dn(dev); | ||
64 | } | 97 | } |
65 | 98 | ||
66 | static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus) | 99 | static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus) |
@@ -83,7 +116,7 @@ static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus) | |||
83 | struct device_node *busdn = bus->sysdata; | 116 | struct device_node *busdn = bus->sysdata; |
84 | 117 | ||
85 | BUG_ON(busdn == NULL); | 118 | BUG_ON(busdn == NULL); |
86 | return busdn->phb; | 119 | return PCI_DN(busdn)->phb; |
87 | } | 120 | } |
88 | 121 | ||
89 | #endif | 122 | #endif |
diff --git a/include/asm-ppc64/prom.h b/include/asm-ppc64/prom.h index dc5330b39509..c02ec1d6b909 100644 --- a/include/asm-ppc64/prom.h +++ b/include/asm-ppc64/prom.h | |||
@@ -116,14 +116,6 @@ struct property { | |||
116 | struct property *next; | 116 | struct property *next; |
117 | }; | 117 | }; |
118 | 118 | ||
119 | /* NOTE: the device_node contains PCI specific info for pci devices. | ||
120 | * This perhaps could be hung off the device_node with another struct, | ||
121 | * but for now it is directly in the node. The phb ptr is a good | ||
122 | * indication of a real PCI node. Other nodes leave these fields zeroed. | ||
123 | */ | ||
124 | struct pci_controller; | ||
125 | struct iommu_table; | ||
126 | |||
127 | struct device_node { | 119 | struct device_node { |
128 | char *name; | 120 | char *name; |
129 | char *type; | 121 | char *type; |
@@ -135,16 +127,6 @@ struct device_node { | |||
135 | struct interrupt_info *intrs; | 127 | struct interrupt_info *intrs; |
136 | char *full_name; | 128 | char *full_name; |
137 | 129 | ||
138 | /* PCI stuff probably doesn't belong here */ | ||
139 | int busno; /* for pci devices */ | ||
140 | int bussubno; /* for pci devices */ | ||
141 | int devfn; /* for pci devices */ | ||
142 | int eeh_mode; /* See eeh.h for possible EEH_MODEs */ | ||
143 | int eeh_config_addr; | ||
144 | int pci_ext_config_space; /* for pci devices */ | ||
145 | struct pci_controller *phb; /* for pci devices */ | ||
146 | struct iommu_table *iommu_table; /* for phb's or bridges */ | ||
147 | |||
148 | struct property *properties; | 130 | struct property *properties; |
149 | struct device_node *parent; | 131 | struct device_node *parent; |
150 | struct device_node *child; | 132 | struct device_node *child; |
@@ -154,6 +136,7 @@ struct device_node { | |||
154 | struct proc_dir_entry *pde; /* this node's proc directory */ | 136 | struct proc_dir_entry *pde; /* this node's proc directory */ |
155 | struct kref kref; | 137 | struct kref kref; |
156 | unsigned long _flags; | 138 | unsigned long _flags; |
139 | void *data; | ||
157 | }; | 140 | }; |
158 | 141 | ||
159 | extern struct device_node *of_chosen; | 142 | extern struct device_node *of_chosen; |
diff --git a/include/asm-ppc64/segment.h b/include/asm-ppc64/segment.h deleted file mode 100644 index d80fb68cc79e..000000000000 --- a/include/asm-ppc64/segment.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __PPC64_SEGMENT_H | ||
2 | #define __PPC64_SEGMENT_H | ||
3 | |||
4 | /* Only here because we have some old header files that expect it.. */ | ||
5 | |||
6 | #endif /* __PPC64_SEGMENT_H */ | ||
diff --git a/include/asm-ppc64/setup.h b/include/asm-ppc64/setup.h deleted file mode 100644 index b257b8348c73..000000000000 --- a/include/asm-ppc64/setup.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _PPC_SETUP_H | ||
2 | #define _PPC_SETUP_H | ||
3 | |||
4 | #define COMMAND_LINE_SIZE 512 | ||
5 | |||
6 | #endif /* _PPC_SETUP_H */ | ||
diff --git a/include/asm-ppc64/timex.h b/include/asm-ppc64/timex.h deleted file mode 100644 index 8db4da4064cd..000000000000 --- a/include/asm-ppc64/timex.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
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 | ||
diff --git a/include/asm-ppc64/topology.h b/include/asm-ppc64/topology.h deleted file mode 100644 index 1e9b19073230..000000000000 --- a/include/asm-ppc64/topology.h +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
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 */ | ||
diff --git a/include/asm-ppc64/user.h b/include/asm-ppc64/user.h deleted file mode 100644 index d7d6554a421f..000000000000 --- a/include/asm-ppc64/user.h +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
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 */ | ||