linux/include/asm-generic
Ivan Kokshaysky 5f7dc5d750 alpha: fix RTC on marvel
Unlike other alphas, marvel doesn't have real PC-style CMOS clock hardware
- RTC accesses are emulated via PAL calls.  Unfortunately, for unknown
reason these calls work only on CPU #0.  So current implementation for
arbitrary CPU makes CMOS_READ/WRITE to be executed on CPU #0 via IPI.
However, for obvious reason this doesn't work with standard
get/set_rtc_time() functions, where a bunch of CMOS accesses is done with
disabled interrupts.

Solved by making the IPI calls for entire get/set_rtc_time() functions,
not for individual CMOS accesses.  Which is also a lot more effective
performance-wise.

The patch is largely based on the code from Jay Estabrook.
My changes:
- tweak asm-generic/rtc.h by adding a couple of #defines to
  avoid a massive code duplication in arch/alpha/include/asm/rtc.h;
- sys_marvel.c: fix get/set_rtc_time() return values (Jay's FIXMEs).

NOTE: this fixes *only* LIB_RTC drivers.  Legacy (CONFIG_RTC) driver
wont't work on marvel.  Actually I think that we should just disable
CONFIG_RTC on alpha (maybe in 2.6.30?), like most other arches - AFAIK,
all modern distributions use LIB_RTC anyway.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-15 16:39:40 -08:00
..
bitops bitops: use __fls for fls64 on 64-bit archs 2008-04-26 19:21:16 +02:00
4level-fixup.h add mm argument to pte/pmd/pud/pgd_free 2008-02-05 09:44:18 -08:00
Kbuild types: create <asm-generic/int-*.h> 2008-05-02 16:18:19 -07:00
Kbuild.asm byteorder: make swab.h include asm/swab.h like a regular header 2009-01-14 19:56:50 -08:00
atomic.h atomic: fix a typo in atomic_long_xchg() 2008-12-10 08:01:53 -08:00
audit_change_attr.h
audit_dir_write.h
audit_read.h
audit_signal.h [PATCH] add SIGNAL syscall class (v3) 2007-05-11 05:38:25 -04:00
audit_write.h [PATCH] asm/generic: fix bug - kernel fails to build when enable some common audit code on Blackfin 2008-12-09 02:27:39 -05:00
bitops.h remove __KERNEL__ tests of unexported headers under asm-generic/ 2008-04-30 08:29:54 -07:00
bug.h documentation: when to BUG(), and when to not BUG() 2009-01-06 15:59:13 -08:00
cmpxchg-local.h Add cmpxchg_local to asm-generic for per cpu atomic operations 2008-02-07 08:42:30 -08:00
cmpxchg.h Add cmpxchg_local to asm-generic for per cpu atomic operations 2008-02-07 08:42:30 -08:00
cputime.h taskstats scaled time cleanup 2008-02-06 10:41:00 -08:00
device.h
div64.h rename div64_64 to div64_u64 2008-05-01 08:03:58 -07:00
dma-coherent.h generic: per-device coherent dma allocator 2008-06-30 12:51:05 +02:00
dma-mapping-broken.h dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
dma-mapping.h dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
emergency-restart.h
errno-base.h
errno.h
fcntl.h Introduce O_CLOEXEC 2007-07-16 09:05:45 -07:00
futex.h remove __KERNEL__ tests of unexported headers under asm-generic/ 2008-04-30 08:29:54 -07:00
gpio.h gpiolib: request/free hooks 2008-10-16 11:21:40 -07:00
ide_iops.h
int-l64.h types: add C99-style constructors to <asm-generic/int-*.h> 2008-05-02 16:18:42 -07:00
int-ll64.h asm-generic/int-ll64.h: always provide __{s,u}64 2008-07-25 10:53:27 -07:00
ioctl.h Make ioctl.h compatible with userland 2008-08-12 16:07:31 -07:00
iomap.h generic: add ioremap_wc() interface wrapper 2008-04-24 23:40:47 +02:00
irq_regs.h
kdebug.h asm-generic: define DIE_OOPS in asm-generic 2008-10-27 11:39:03 +01:00
libata-portmap.h libata-portmap: Remove unused definitions 2007-10-12 14:55:37 -04:00
local.h remove linux/hardirq.h from asm-generic/local.h 2009-01-06 15:59:13 -08:00
memory_model.h mm: remove CONFIG_OUT_OF_LINE_PFN_TO_PAGE 2009-01-06 15:59:10 -08:00
mm_hooks.h
mman.h
mutex-dec.h mutex: speed up generic mutex implementations 2008-10-23 09:18:20 -07:00
mutex-null.h
mutex-xchg.h mutex: speed up generic mutex implementations 2008-10-23 09:18:20 -07:00
page.h remove __KERNEL__ tests of unexported headers under asm-generic/ 2008-04-30 08:29:54 -07:00
pci-dma-compat.h dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
pci.h
percpu.h percpu: fix DEBUG_PREEMPT per_cpu checking 2008-02-23 12:09:28 -08:00
pgtable-nopmd.h include/asm-generic/pgtable-nopmd.h: macros are noxious, reason #435 2008-07-28 16:30:21 -07:00
pgtable-nopud.h add mm argument to pte/pmd/pud/pgd_free 2008-02-05 09:44:18 -08:00
pgtable.h x86 PAT: change track_pfn_vma_new to take pgprot_t pointer param 2009-01-13 19:13:01 +01:00
poll.h Consolidate asm/poll.h 2007-05-11 08:29:34 -07:00
resource.h sched: SCHED_FIFO/SCHED_RR watchdog timer 2008-01-25 21:08:27 +01:00
rtc.h alpha: fix RTC on marvel 2009-01-15 16:39:40 -08:00
sections.h lib: Correct printk %pF to work on all architectures 2008-09-09 11:51:15 -07:00
siginfo.h signals: demultiplexing SIGTRAP signal 2008-09-23 13:26:52 +02:00
signal.h
statfs.h Make <asm-generic/statfs.h> suitable for 64-bit platforms. 2008-09-04 09:46:08 +01:00
syscall.h tracehook: comment pasto fixes 2008-09-05 14:39:38 -07:00
termios.h tty: let architectures override the user/kernel macros. 2008-02-08 09:22:24 -08:00
tlb.h asm-generic/tlb.h: remove <linux/quicklist.h> 2008-02-04 16:48:00 +01:00
topology.h cpumask: Introduce cpumask_of_{node,pcibus} to replace {node,pcibus}_to_cpumask 2008-12-13 21:20:27 +10:30
uaccess.h
vmlinux.lds.h tracing/function-graph-tracer: add a new .irqentry.text section 2008-12-12 11:14:07 +01:00
xor.h