diff options
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r-- | arch/sparc64/kernel/iommu.c | 3 | ||||
-rw-r--r-- | arch/sparc64/kernel/pci.c | 21 | ||||
-rw-r--r-- | arch/sparc64/kernel/process.c | 15 | ||||
-rw-r--r-- | arch/sparc64/kernel/prom.c | 1 | ||||
-rw-r--r-- | arch/sparc64/kernel/setup.c | 29 | ||||
-rw-r--r-- | arch/sparc64/kernel/sparc64_ksyms.c | 3 | ||||
-rw-r--r-- | arch/sparc64/kernel/unaligned.c | 3 |
7 files changed, 10 insertions, 65 deletions
diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c index d3276ebcfb47..0e347ff812a3 100644 --- a/arch/sparc64/kernel/iommu.c +++ b/arch/sparc64/kernel/iommu.c | |||
@@ -200,12 +200,11 @@ int iommu_table_init(struct iommu *iommu, int tsbsize, | |||
200 | /* Allocate and initialize the dummy page which we | 200 | /* Allocate and initialize the dummy page which we |
201 | * set inactive IO PTEs to point to. | 201 | * set inactive IO PTEs to point to. |
202 | */ | 202 | */ |
203 | iommu->dummy_page = __get_free_pages(GFP_KERNEL, 0); | 203 | iommu->dummy_page = get_zeroed_page(GFP_KERNEL); |
204 | if (!iommu->dummy_page) { | 204 | if (!iommu->dummy_page) { |
205 | printk(KERN_ERR "IOMMU: Error, gfp(dummy_page) failed.\n"); | 205 | printk(KERN_ERR "IOMMU: Error, gfp(dummy_page) failed.\n"); |
206 | goto out_free_map; | 206 | goto out_free_map; |
207 | } | 207 | } |
208 | memset((void *)iommu->dummy_page, 0, PAGE_SIZE); | ||
209 | iommu->dummy_page_pa = (unsigned long) __pa(iommu->dummy_page); | 208 | iommu->dummy_page_pa = (unsigned long) __pa(iommu->dummy_page); |
210 | 209 | ||
211 | /* Now allocate and setup the IOMMU page table itself. */ | 210 | /* Now allocate and setup the IOMMU page table itself. */ |
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index a61c38fe75ea..545356b00e2e 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -225,20 +225,6 @@ static int __init pci_controller_init(const char *model_name, int namelen, struc | |||
225 | return 0; | 225 | return 0; |
226 | } | 226 | } |
227 | 227 | ||
228 | static int __init pci_is_controller(const char *model_name, int namelen, struct device_node *dp) | ||
229 | { | ||
230 | int i; | ||
231 | |||
232 | for (i = 0; i < PCI_NUM_CONTROLLER_TYPES; i++) { | ||
233 | if (!strncmp(model_name, | ||
234 | pci_controller_table[i].model_name, | ||
235 | namelen)) { | ||
236 | return 1; | ||
237 | } | ||
238 | } | ||
239 | return 0; | ||
240 | } | ||
241 | |||
242 | static int __init pci_controller_scan(int (*handler)(const char *, int, struct device_node *)) | 228 | static int __init pci_controller_scan(int (*handler)(const char *, int, struct device_node *)) |
243 | { | 229 | { |
244 | struct device_node *dp; | 230 | struct device_node *dp; |
@@ -273,13 +259,6 @@ static int __init pci_controller_scan(int (*handler)(const char *, int, struct d | |||
273 | return count; | 259 | return count; |
274 | } | 260 | } |
275 | 261 | ||
276 | |||
277 | /* Is there some PCI controller in the system? */ | ||
278 | int __init pcic_present(void) | ||
279 | { | ||
280 | return pci_controller_scan(pci_is_controller); | ||
281 | } | ||
282 | |||
283 | /* Find each controller in the system, attach and initialize | 262 | /* Find each controller in the system, attach and initialize |
284 | * software state structure for each and link into the | 263 | * software state structure for each and link into the |
285 | * pci_pbm_root. Setup the controller enough such | 264 | * pci_pbm_root. Setup the controller enough such |
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 1b2379174988..6eceac51ae62 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c | |||
@@ -113,16 +113,9 @@ void cpu_idle(void) | |||
113 | 113 | ||
114 | extern char reboot_command []; | 114 | extern char reboot_command []; |
115 | 115 | ||
116 | extern void (*prom_palette)(int); | ||
117 | extern void (*prom_keyboard)(void); | ||
118 | |||
119 | void machine_halt(void) | 116 | void machine_halt(void) |
120 | { | 117 | { |
121 | sstate_halt(); | 118 | sstate_halt(); |
122 | if (prom_palette) | ||
123 | prom_palette (1); | ||
124 | if (prom_keyboard) | ||
125 | prom_keyboard(); | ||
126 | prom_halt(); | 119 | prom_halt(); |
127 | panic("Halt failed!"); | 120 | panic("Halt failed!"); |
128 | } | 121 | } |
@@ -130,10 +123,6 @@ void machine_halt(void) | |||
130 | void machine_alt_power_off(void) | 123 | void machine_alt_power_off(void) |
131 | { | 124 | { |
132 | sstate_poweroff(); | 125 | sstate_poweroff(); |
133 | if (prom_palette) | ||
134 | prom_palette(1); | ||
135 | if (prom_keyboard) | ||
136 | prom_keyboard(); | ||
137 | prom_halt_power_off(); | 126 | prom_halt_power_off(); |
138 | panic("Power-off failed!"); | 127 | panic("Power-off failed!"); |
139 | } | 128 | } |
@@ -145,10 +134,6 @@ void machine_restart(char * cmd) | |||
145 | sstate_reboot(); | 134 | sstate_reboot(); |
146 | p = strchr (reboot_command, '\n'); | 135 | p = strchr (reboot_command, '\n'); |
147 | if (p) *p = 0; | 136 | if (p) *p = 0; |
148 | if (prom_palette) | ||
149 | prom_palette (1); | ||
150 | if (prom_keyboard) | ||
151 | prom_keyboard(); | ||
152 | if (cmd) | 137 | if (cmd) |
153 | prom_reboot(cmd); | 138 | prom_reboot(cmd); |
154 | if (*reboot_command) | 139 | if (*reboot_command) |
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c index a246e962e5a7..68964ddcde1e 100644 --- a/arch/sparc64/kernel/prom.c +++ b/arch/sparc64/kernel/prom.c | |||
@@ -1716,7 +1716,6 @@ static void __init of_console_init(void) | |||
1716 | 1716 | ||
1717 | of_console_device = dp; | 1717 | of_console_device = dp; |
1718 | 1718 | ||
1719 | prom_printf(msg, of_console_path); | ||
1720 | printk(msg, of_console_path); | 1719 | printk(msg, of_console_path); |
1721 | } | 1720 | } |
1722 | 1721 | ||
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 5964d8653ade..d036dbe72864 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c | |||
@@ -68,33 +68,22 @@ struct screen_info screen_info = { | |||
68 | 16 /* orig-video-points */ | 68 | 16 /* orig-video-points */ |
69 | }; | 69 | }; |
70 | 70 | ||
71 | void (*prom_palette)(int); | ||
72 | void (*prom_keyboard)(void); | ||
73 | |||
74 | static void | 71 | static void |
75 | prom_console_write(struct console *con, const char *s, unsigned n) | 72 | prom_console_write(struct console *con, const char *s, unsigned n) |
76 | { | 73 | { |
77 | prom_write(s, n); | 74 | prom_write(s, n); |
78 | } | 75 | } |
79 | 76 | ||
80 | unsigned int boot_flags = 0; | ||
81 | #define BOOTME_DEBUG 0x1 | ||
82 | |||
83 | /* Exported for mm/init.c:paging_init. */ | 77 | /* Exported for mm/init.c:paging_init. */ |
84 | unsigned long cmdline_memory_size = 0; | 78 | unsigned long cmdline_memory_size = 0; |
85 | 79 | ||
86 | static struct console prom_debug_console = { | 80 | static struct console prom_early_console = { |
87 | .name = "debug", | 81 | .name = "earlyprom", |
88 | .write = prom_console_write, | 82 | .write = prom_console_write, |
89 | .flags = CON_PRINTBUFFER, | 83 | .flags = CON_PRINTBUFFER | CON_BOOT, |
90 | .index = -1, | 84 | .index = -1, |
91 | }; | 85 | }; |
92 | 86 | ||
93 | /* XXX Implement this at some point... */ | ||
94 | void kernel_enter_debugger(void) | ||
95 | { | ||
96 | } | ||
97 | |||
98 | /* | 87 | /* |
99 | * Process kernel command line switches that are specific to the | 88 | * Process kernel command line switches that are specific to the |
100 | * SPARC or that require special low-level processing. | 89 | * SPARC or that require special low-level processing. |
@@ -103,8 +92,6 @@ static void __init process_switch(char c) | |||
103 | { | 92 | { |
104 | switch (c) { | 93 | switch (c) { |
105 | case 'd': | 94 | case 'd': |
106 | boot_flags |= BOOTME_DEBUG; | ||
107 | break; | ||
108 | case 's': | 95 | case 's': |
109 | break; | 96 | break; |
110 | case 'h': | 97 | case 'h': |
@@ -112,8 +99,7 @@ static void __init process_switch(char c) | |||
112 | prom_halt(); | 99 | prom_halt(); |
113 | break; | 100 | break; |
114 | case 'p': | 101 | case 'p': |
115 | /* Use PROM debug console. */ | 102 | /* Just ignore, this behavior is now the default. */ |
116 | register_console(&prom_debug_console); | ||
117 | break; | 103 | break; |
118 | case 'P': | 104 | case 'P': |
119 | /* Force UltraSPARC-III P-Cache on. */ | 105 | /* Force UltraSPARC-III P-Cache on. */ |
@@ -168,8 +154,6 @@ static void __init boot_flags_init(char *commands) | |||
168 | } | 154 | } |
169 | } | 155 | } |
170 | 156 | ||
171 | extern void panic_setup(char *, int *); | ||
172 | |||
173 | extern unsigned short root_flags; | 157 | extern unsigned short root_flags; |
174 | extern unsigned short root_dev; | 158 | extern unsigned short root_dev; |
175 | extern unsigned short ram_flags; | 159 | extern unsigned short ram_flags; |
@@ -296,6 +280,9 @@ void __init setup_arch(char **cmdline_p) | |||
296 | *cmdline_p = prom_getbootargs(); | 280 | *cmdline_p = prom_getbootargs(); |
297 | strcpy(boot_command_line, *cmdline_p); | 281 | strcpy(boot_command_line, *cmdline_p); |
298 | 282 | ||
283 | boot_flags_init(*cmdline_p); | ||
284 | register_console(&prom_early_console); | ||
285 | |||
299 | if (tlb_type == hypervisor) | 286 | if (tlb_type == hypervisor) |
300 | printk("ARCH: SUN4V\n"); | 287 | printk("ARCH: SUN4V\n"); |
301 | else | 288 | else |
@@ -307,8 +294,6 @@ void __init setup_arch(char **cmdline_p) | |||
307 | conswitchp = &prom_con; | 294 | conswitchp = &prom_con; |
308 | #endif | 295 | #endif |
309 | 296 | ||
310 | boot_flags_init(*cmdline_p); | ||
311 | |||
312 | idprom_init(); | 297 | idprom_init(); |
313 | 298 | ||
314 | if (!root_flags) | 299 | if (!root_flags) |
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index 68db08930399..51fa773f38c9 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c | |||
@@ -85,7 +85,6 @@ extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *); | |||
85 | extern long sparc32_open(const char __user * filename, int flags, int mode); | 85 | extern long sparc32_open(const char __user * filename, int flags, int mode); |
86 | extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | 86 | extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, |
87 | unsigned long pfn, unsigned long size, pgprot_t prot); | 87 | unsigned long pfn, unsigned long size, pgprot_t prot); |
88 | extern void (*prom_palette)(int); | ||
89 | 88 | ||
90 | extern int __ashrdi3(int, int); | 89 | extern int __ashrdi3(int, int); |
91 | 90 | ||
@@ -355,5 +354,3 @@ EXPORT_SYMBOL(xor_niagara_2); | |||
355 | EXPORT_SYMBOL(xor_niagara_3); | 354 | EXPORT_SYMBOL(xor_niagara_3); |
356 | EXPORT_SYMBOL(xor_niagara_4); | 355 | EXPORT_SYMBOL(xor_niagara_4); |
357 | EXPORT_SYMBOL(xor_niagara_5); | 356 | EXPORT_SYMBOL(xor_niagara_5); |
358 | |||
359 | EXPORT_SYMBOL(prom_palette); | ||
diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c index dc7bf1b6321c..1a511e9f0d3e 100644 --- a/arch/sparc64/kernel/unaligned.c +++ b/arch/sparc64/kernel/unaligned.c | |||
@@ -7,6 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | 9 | ||
10 | #include <linux/jiffies.h> | ||
10 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
11 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
12 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
@@ -283,7 +284,7 @@ static void log_unaligned(struct pt_regs *regs) | |||
283 | { | 284 | { |
284 | static unsigned long count, last_time; | 285 | static unsigned long count, last_time; |
285 | 286 | ||
286 | if (jiffies - last_time > 5 * HZ) | 287 | if (time_after(jiffies, last_time + 5 * HZ)) |
287 | count = 0; | 288 | count = 0; |
288 | if (count < 5) { | 289 | if (count < 5) { |
289 | last_time = jiffies; | 290 | last_time = jiffies; |