aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-09-07 17:38:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-09-07 17:38:54 -0400
commitadd2b10f2ba15ac231181306c975e58d26f9bd54 (patch)
treee3196992ab39adfa42a4fe4234f9f6b2ce0ba5b1 /arch
parent3c5dff7b5ec7ac1bf356d43ac37e2e4ec7ec063a (diff)
parent3e073367a57d41e506f20aebb98e308387ce3090 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6: alpha: Fix printk format errors alpha: convert perf_event to use local_t Fix call to replaced SuperIO functions alpha: remove homegrown L1_CACHE_ALIGN macro
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/include/asm/cache.h1
-rw-r--r--arch/alpha/kernel/err_marvel.c6
-rw-r--r--arch/alpha/kernel/perf_event.c18
-rw-r--r--arch/alpha/kernel/proto.h3
-rw-r--r--arch/alpha/kernel/sys_cabriolet.c19
-rw-r--r--arch/alpha/kernel/sys_takara.c11
6 files changed, 37 insertions, 21 deletions
diff --git a/arch/alpha/include/asm/cache.h b/arch/alpha/include/asm/cache.h
index f199e69a5d0b..ad368a93a46a 100644
--- a/arch/alpha/include/asm/cache.h
+++ b/arch/alpha/include/asm/cache.h
@@ -17,7 +17,6 @@
17# define L1_CACHE_SHIFT 5 17# define L1_CACHE_SHIFT 5
18#endif 18#endif
19 19
20#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
21#define SMP_CACHE_BYTES L1_CACHE_BYTES 20#define SMP_CACHE_BYTES L1_CACHE_BYTES
22 21
23#endif 22#endif
diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c
index 52a79dfc13c6..5c905aaaeccd 100644
--- a/arch/alpha/kernel/err_marvel.c
+++ b/arch/alpha/kernel/err_marvel.c
@@ -109,7 +109,7 @@ marvel_print_err_cyc(u64 err_cyc)
109#define IO7__ERR_CYC__CYCLE__M (0x7) 109#define IO7__ERR_CYC__CYCLE__M (0x7)
110 110
111 printk("%s Packet In Error: %s\n" 111 printk("%s Packet In Error: %s\n"
112 "%s Error in %s, cycle %ld%s%s\n", 112 "%s Error in %s, cycle %lld%s%s\n",
113 err_print_prefix, 113 err_print_prefix,
114 packet_desc[EXTRACT(err_cyc, IO7__ERR_CYC__PACKET)], 114 packet_desc[EXTRACT(err_cyc, IO7__ERR_CYC__PACKET)],
115 err_print_prefix, 115 err_print_prefix,
@@ -313,7 +313,7 @@ marvel_print_po7_ugbge_sym(u64 ugbge_sym)
313 } 313 }
314 314
315 printk("%s Up Hose Garbage Symptom:\n" 315 printk("%s Up Hose Garbage Symptom:\n"
316 "%s Source Port: %ld - Dest PID: %ld - OpCode: %s\n", 316 "%s Source Port: %lld - Dest PID: %lld - OpCode: %s\n",
317 err_print_prefix, 317 err_print_prefix,
318 err_print_prefix, 318 err_print_prefix,
319 EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_SRC_PORT), 319 EXTRACT(ugbge_sym, IO7__PO7_UGBGE_SYM__UPH_SRC_PORT),
@@ -552,7 +552,7 @@ marvel_print_pox_spl_cmplt(u64 spl_cmplt)
552#define IO7__POX_SPLCMPLT__REM_BYTE_COUNT__M (0xfff) 552#define IO7__POX_SPLCMPLT__REM_BYTE_COUNT__M (0xfff)
553 553
554 printk("%s Split Completion Error:\n" 554 printk("%s Split Completion Error:\n"
555 "%s Source (Bus:Dev:Func): %ld:%ld:%ld\n", 555 "%s Source (Bus:Dev:Func): %lld:%lld:%lld\n",
556 err_print_prefix, 556 err_print_prefix,
557 err_print_prefix, 557 err_print_prefix,
558 EXTRACT(spl_cmplt, IO7__POX_SPLCMPLT__SOURCE_BUS), 558 EXTRACT(spl_cmplt, IO7__POX_SPLCMPLT__SOURCE_BUS),
diff --git a/arch/alpha/kernel/perf_event.c b/arch/alpha/kernel/perf_event.c
index 51c39fa41693..85d8e4f58c83 100644
--- a/arch/alpha/kernel/perf_event.c
+++ b/arch/alpha/kernel/perf_event.c
@@ -241,20 +241,20 @@ static inline unsigned long alpha_read_pmc(int idx)
241static int alpha_perf_event_set_period(struct perf_event *event, 241static int alpha_perf_event_set_period(struct perf_event *event,
242 struct hw_perf_event *hwc, int idx) 242 struct hw_perf_event *hwc, int idx)
243{ 243{
244 long left = atomic64_read(&hwc->period_left); 244 long left = local64_read(&hwc->period_left);
245 long period = hwc->sample_period; 245 long period = hwc->sample_period;
246 int ret = 0; 246 int ret = 0;
247 247
248 if (unlikely(left <= -period)) { 248 if (unlikely(left <= -period)) {
249 left = period; 249 left = period;
250 atomic64_set(&hwc->period_left, left); 250 local64_set(&hwc->period_left, left);
251 hwc->last_period = period; 251 hwc->last_period = period;
252 ret = 1; 252 ret = 1;
253 } 253 }
254 254
255 if (unlikely(left <= 0)) { 255 if (unlikely(left <= 0)) {
256 left += period; 256 left += period;
257 atomic64_set(&hwc->period_left, left); 257 local64_set(&hwc->period_left, left);
258 hwc->last_period = period; 258 hwc->last_period = period;
259 ret = 1; 259 ret = 1;
260 } 260 }
@@ -269,7 +269,7 @@ static int alpha_perf_event_set_period(struct perf_event *event,
269 if (left > (long)alpha_pmu->pmc_max_period[idx]) 269 if (left > (long)alpha_pmu->pmc_max_period[idx])
270 left = alpha_pmu->pmc_max_period[idx]; 270 left = alpha_pmu->pmc_max_period[idx];
271 271
272 atomic64_set(&hwc->prev_count, (unsigned long)(-left)); 272 local64_set(&hwc->prev_count, (unsigned long)(-left));
273 273
274 alpha_write_pmc(idx, (unsigned long)(-left)); 274 alpha_write_pmc(idx, (unsigned long)(-left));
275 275
@@ -300,10 +300,10 @@ static unsigned long alpha_perf_event_update(struct perf_event *event,
300 long delta; 300 long delta;
301 301
302again: 302again:
303 prev_raw_count = atomic64_read(&hwc->prev_count); 303 prev_raw_count = local64_read(&hwc->prev_count);
304 new_raw_count = alpha_read_pmc(idx); 304 new_raw_count = alpha_read_pmc(idx);
305 305
306 if (atomic64_cmpxchg(&hwc->prev_count, prev_raw_count, 306 if (local64_cmpxchg(&hwc->prev_count, prev_raw_count,
307 new_raw_count) != prev_raw_count) 307 new_raw_count) != prev_raw_count)
308 goto again; 308 goto again;
309 309
@@ -316,8 +316,8 @@ again:
316 delta += alpha_pmu->pmc_max_period[idx] + 1; 316 delta += alpha_pmu->pmc_max_period[idx] + 1;
317 } 317 }
318 318
319 atomic64_add(delta, &event->count); 319 local64_add(delta, &event->count);
320 atomic64_sub(delta, &hwc->period_left); 320 local64_sub(delta, &hwc->period_left);
321 321
322 return new_raw_count; 322 return new_raw_count;
323} 323}
@@ -636,7 +636,7 @@ static int __hw_perf_event_init(struct perf_event *event)
636 if (!hwc->sample_period) { 636 if (!hwc->sample_period) {
637 hwc->sample_period = alpha_pmu->pmc_max_period[0]; 637 hwc->sample_period = alpha_pmu->pmc_max_period[0];
638 hwc->last_period = hwc->sample_period; 638 hwc->last_period = hwc->sample_period;
639 atomic64_set(&hwc->period_left, hwc->sample_period); 639 local64_set(&hwc->period_left, hwc->sample_period);
640 } 640 }
641 641
642 return 0; 642 return 0;
diff --git a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h
index 3d2627ec9860..d3e52d3fd592 100644
--- a/arch/alpha/kernel/proto.h
+++ b/arch/alpha/kernel/proto.h
@@ -156,9 +156,6 @@ extern void SMC669_Init(int);
156/* es1888.c */ 156/* es1888.c */
157extern void es1888_init(void); 157extern void es1888_init(void);
158 158
159/* ns87312.c */
160extern void ns87312_enable_ide(long ide_base);
161
162/* ../lib/fpreg.c */ 159/* ../lib/fpreg.c */
163extern void alpha_write_fp_reg (unsigned long reg, unsigned long val); 160extern void alpha_write_fp_reg (unsigned long reg, unsigned long val);
164extern unsigned long alpha_read_fp_reg (unsigned long reg); 161extern unsigned long alpha_read_fp_reg (unsigned long reg);
diff --git a/arch/alpha/kernel/sys_cabriolet.c b/arch/alpha/kernel/sys_cabriolet.c
index affd0f3f25df..14c8898d19ec 100644
--- a/arch/alpha/kernel/sys_cabriolet.c
+++ b/arch/alpha/kernel/sys_cabriolet.c
@@ -33,7 +33,7 @@
33#include "irq_impl.h" 33#include "irq_impl.h"
34#include "pci_impl.h" 34#include "pci_impl.h"
35#include "machvec_impl.h" 35#include "machvec_impl.h"
36 36#include "pc873xx.h"
37 37
38/* Note mask bit is true for DISABLED irqs. */ 38/* Note mask bit is true for DISABLED irqs. */
39static unsigned long cached_irq_mask = ~0UL; 39static unsigned long cached_irq_mask = ~0UL;
@@ -236,17 +236,30 @@ cabriolet_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
236} 236}
237 237
238static inline void __init 238static inline void __init
239cabriolet_enable_ide(void)
240{
241 if (pc873xx_probe() == -1) {
242 printk(KERN_ERR "Probing for PC873xx Super IO chip failed.\n");
243 } else {
244 printk(KERN_INFO "Found %s Super IO chip at 0x%x\n",
245 pc873xx_get_model(), pc873xx_get_base());
246
247 pc873xx_enable_ide();
248 }
249}
250
251static inline void __init
239cabriolet_init_pci(void) 252cabriolet_init_pci(void)
240{ 253{
241 common_init_pci(); 254 common_init_pci();
242 ns87312_enable_ide(0x398); 255 cabriolet_enable_ide();
243} 256}
244 257
245static inline void __init 258static inline void __init
246cia_cab_init_pci(void) 259cia_cab_init_pci(void)
247{ 260{
248 cia_init_pci(); 261 cia_init_pci();
249 ns87312_enable_ide(0x398); 262 cabriolet_enable_ide();
250} 263}
251 264
252/* 265/*
diff --git a/arch/alpha/kernel/sys_takara.c b/arch/alpha/kernel/sys_takara.c
index 230464885b5c..4da596b6adbb 100644
--- a/arch/alpha/kernel/sys_takara.c
+++ b/arch/alpha/kernel/sys_takara.c
@@ -29,7 +29,7 @@
29#include "irq_impl.h" 29#include "irq_impl.h"
30#include "pci_impl.h" 30#include "pci_impl.h"
31#include "machvec_impl.h" 31#include "machvec_impl.h"
32 32#include "pc873xx.h"
33 33
34/* Note mask bit is true for DISABLED irqs. */ 34/* Note mask bit is true for DISABLED irqs. */
35static unsigned long cached_irq_mask[2] = { -1, -1 }; 35static unsigned long cached_irq_mask[2] = { -1, -1 };
@@ -264,7 +264,14 @@ takara_init_pci(void)
264 alpha_mv.pci_map_irq = takara_map_irq_srm; 264 alpha_mv.pci_map_irq = takara_map_irq_srm;
265 265
266 cia_init_pci(); 266 cia_init_pci();
267 ns87312_enable_ide(0x26e); 267
268 if (pc873xx_probe() == -1) {
269 printk(KERN_ERR "Probing for PC873xx Super IO chip failed.\n");
270 } else {
271 printk(KERN_INFO "Found %s Super IO chip at 0x%x\n",
272 pc873xx_get_model(), pc873xx_get_base());
273 pc873xx_enable_ide();
274 }
268} 275}
269 276
270 277