diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-05 20:46:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-05 20:46:42 -0400 |
commit | e7fda6c4c3c1a7d6996dd75fd84670fa0b5d448f (patch) | |
tree | daa51c16462c318b890acf7f01fba5827275dd74 /drivers/of | |
parent | 08d69a25714429850cf9ef71f22d8cdc9189d93f (diff) | |
parent | 953dec21aed4038464fec02f96a2f1b8701a5bce (diff) |
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer and time updates from Thomas Gleixner:
"A rather large update of timers, timekeeping & co
- Core timekeeping code is year-2038 safe now for 32bit machines.
Now we just need to fix all in kernel users and the gazillion of
user space interfaces which rely on timespec/timeval :)
- Better cache layout for the timekeeping internal data structures.
- Proper nanosecond based interfaces for in kernel users.
- Tree wide cleanup of code which wants nanoseconds but does hoops
and loops to convert back and forth from timespecs. Some of it
definitely belongs into the ugly code museum.
- Consolidation of the timekeeping interface zoo.
- A fast NMI safe accessor to clock monotonic for tracing. This is a
long standing request to support correlated user/kernel space
traces. With proper NTP frequency correction it's also suitable
for correlation of traces accross separate machines.
- Checkpoint/restart support for timerfd.
- A few NOHZ[_FULL] improvements in the [hr]timer code.
- Code move from kernel to kernel/time of all time* related code.
- New clocksource/event drivers from the ARM universe. I'm really
impressed that despite an architected timer in the newer chips SoC
manufacturers insist on inventing new and differently broken SoC
specific timers.
[ Ed. "Impressed"? I don't think that word means what you think it means ]
- Another round of code move from arch to drivers. Looks like most
of the legacy mess in ARM regarding timers is sorted out except for
a few obnoxious strongholds.
- The usual updates and fixlets all over the place"
* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (114 commits)
timekeeping: Fixup typo in update_vsyscall_old definition
clocksource: document some basic timekeeping concepts
timekeeping: Use cached ntp_tick_length when accumulating error
timekeeping: Rework frequency adjustments to work better w/ nohz
timekeeping: Minor fixup for timespec64->timespec assignment
ftrace: Provide trace clocks monotonic
timekeeping: Provide fast and NMI safe access to CLOCK_MONOTONIC
seqcount: Add raw_write_seqcount_latch()
seqcount: Provide raw_read_seqcount()
timekeeping: Use tk_read_base as argument for timekeeping_get_ns()
timekeeping: Create struct tk_read_base and use it in struct timekeeper
timekeeping: Restructure the timekeeper some more
clocksource: Get rid of cycle_last
clocksource: Move cycle_last validation to core code
clocksource: Make delta calculation a function
wireless: ath9k: Get rid of timespec conversions
drm: vmwgfx: Use nsec based interfaces
drm: i915: Use nsec based interfaces
timekeeping: Provide ktime_get_raw()
hangcheck-timer: Use ktime_get_ns()
...
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/address.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/of/address.c b/drivers/of/address.c index 5edfcb0da37d..e3718250d66e 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c | |||
@@ -702,6 +702,42 @@ void __iomem *of_iomap(struct device_node *np, int index) | |||
702 | } | 702 | } |
703 | EXPORT_SYMBOL(of_iomap); | 703 | EXPORT_SYMBOL(of_iomap); |
704 | 704 | ||
705 | /* | ||
706 | * of_io_request_and_map - Requests a resource and maps the memory mapped IO | ||
707 | * for a given device_node | ||
708 | * @device: the device whose io range will be mapped | ||
709 | * @index: index of the io range | ||
710 | * @name: name of the resource | ||
711 | * | ||
712 | * Returns a pointer to the requested and mapped memory or an ERR_PTR() encoded | ||
713 | * error code on failure. Usage example: | ||
714 | * | ||
715 | * base = of_io_request_and_map(node, 0, "foo"); | ||
716 | * if (IS_ERR(base)) | ||
717 | * return PTR_ERR(base); | ||
718 | */ | ||
719 | void __iomem *of_io_request_and_map(struct device_node *np, int index, | ||
720 | char *name) | ||
721 | { | ||
722 | struct resource res; | ||
723 | void __iomem *mem; | ||
724 | |||
725 | if (of_address_to_resource(np, index, &res)) | ||
726 | return IOMEM_ERR_PTR(-EINVAL); | ||
727 | |||
728 | if (!request_mem_region(res.start, resource_size(&res), name)) | ||
729 | return IOMEM_ERR_PTR(-EBUSY); | ||
730 | |||
731 | mem = ioremap(res.start, resource_size(&res)); | ||
732 | if (!mem) { | ||
733 | release_mem_region(res.start, resource_size(&res)); | ||
734 | return IOMEM_ERR_PTR(-ENOMEM); | ||
735 | } | ||
736 | |||
737 | return mem; | ||
738 | } | ||
739 | EXPORT_SYMBOL(of_io_request_and_map); | ||
740 | |||
705 | /** | 741 | /** |
706 | * of_dma_get_range - Get DMA range info | 742 | * of_dma_get_range - Get DMA range info |
707 | * @np: device node to get DMA range info | 743 | * @np: device node to get DMA range info |