aboutsummaryrefslogtreecommitdiff
path: root/drivers/clocksource
Commit message (Collapse)AuthorAgeFilesLines
* Merge 3.18.112 into android-msm-marlin-3.18-ltsPetri Gynther2018-08-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux 3.18.112 * Revert "vti4: Don't override MTU passed on link creation via IFLA_MTU" net/ipv4/ip_vti.c Linux 3.18.111 kdb: make "mdr" command repeat * regulator: of: Add a missing 'of_node_put()' in an error handling path of 'of_regulator_match()' drivers/regulator/of_regulator.c scsi: lpfc: Fix frequency of Release WQE CQEs scsi: lpfc: Fix soft lockup in lpfc worker thread during LIP testing scsi: lpfc: Fix issue_lip if link is disabled netlabel: If PF_INET6, check sk_buff ip header version * audit: return on memory error to avoid null pointer dereference kernel/audit.c clk: samsung: exynos3250: Fix PLL rates clk: samsung: exynos5250: Fix PLL rates clk: samsung: exynos5260: Fix PLL rates clk: samsung: s3c2410: Fix PLL rates media: cx25821: prevent out-of-bounds read on array card udf: Provide saner default for invalid uid / gid * PCI: Add function 1 DMA alias quirk for Marvell 88SE9220 drivers/pci/quirks.c serial: arc_uart: Fix out-of-bounds access through DT alias serial: fsl_lpuart: Fix out-of-bounds access through DT alias serial: imx: Fix out-of-bounds access through serial port index serial: samsung: Fix out-of-bounds access through serial port index serial: xuartps: Fix out-of-bounds access through DT alias rtc: tx4939: avoid unintended sign extension on a 24 bit shift staging: rtl8192u: return -ENOMEM on failed allocation of priv->oldaddr media: em28xx: USB bulk packet size fix dmaengine: pl330: fix a race condition in case of threaded irqs media: s3c-camif: fix out-of-bounds array access media: cx23885: Set subdev host data to clk_freq pointer media: cx23885: Override 888 ImpactVCBe crystal frequency ALSA: vmaster: Propagate slave error * usb: gadget: composite: fix incorrect handling of OS desc requests drivers/usb/gadget/composite.c include/linux/usb/composite.h usb: gadget: udc: change comparison to bitshift when dealing with a mask cdrom: do not call check_disk_change() inside cdrom_open() hwmon: (pmbus/adm1275) Accept negative page register values hwmon: (pmbus/max8688) Accept negative page register values * perf/core: Fix perf_output_read_group() kernel/events/core.c powerpc: Add missing prototype for arch_irq_work_raise() * usb: gadget: ffs: Let setup() return USB_GADGET_DELAYED_STATUS drivers/usb/gadget/function/f_fs.c usb: dwc2: Fix interval type issue * PCI: Restore config space on runtime resume despite being unbound drivers/pci/pci-driver.c MIPS: ath79: Fix AR724X_PLL_REG_PCIE_CONFIG offset * xhci: zero usb device slot_id member when disabling and freeing a xhci slot drivers/usb/host/xhci-mem.c i2c: mv64xxx: Apply errata delay only in standard mode ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c ACPICA: Events: add a return on failure from acpi_hw_register_read bcache: quit dc->writeback_thread when BCACHE_DEV_DETACHING is set zorro: Set up z->dev.dma_mask for the DMA API * usb: dwc3: Update DWC_usb31 GTXFIFOSIZ reg fields drivers/usb/dwc3/core.h arm: dts: socfpga: fix GIC PPI warning virtio-net: Fix operstate for virtio when no VIRTIO_NET_F_STATUS ima: Fallback to the builtin hash algorithm ath10k: Fix kernel panic while using worker (ath10k_sta_rc_update_wk) net/mlx5: Protect from command bit overflow tools/thermal: tmon: fix for segfault powerpc/perf: Fix kernel address leak via sampling registers powerpc/perf: Prevent kernel address leak to userspace via BHRB buffer hwmon: (nct6775) Fix writing pwmX_mode parisc/pci: Switch LBA PCI bus from Hard Fail to Soft Fail mode m68k: set dma and coherent masks for platform FEC ethernets powerpc/mpic: Check if cpu_possible() in mpic_physmask() ACPI: acpi_pad: Fix memory leak in power saving threads xen/acpi: off by one in read_acpi_id() btrfs: fix lockdep splat in btrfs_alloc_subvolume_writers Btrfs: fix copy_items() return value when logging an inode btrfs: tests/qgroup: Fix wrong tree backref level sparc64: Make atomic_xchg() an inline function rather than a macro. KVM: VMX: raise internal error for exception during invalid protected mode state * sched/rt: Fix rq->clock_update_flags < RQCF_ACT_SKIP warning kernel/sched/rt.c btrfs: Fix possible softlock on single core machines Btrfs: fix NULL pointer dereference in log_dir_items Btrfs: bail out on error during replay_dir_deletes * mm: fix races between address_space dereference and free in page_evicatable mm/vmscan.c mm/ksm: fix interaction with THP dp83640: Ensure against premature access to PHY registers after reset scsi: aacraid: Insure command thread is not recursively stopped Force log to disk before reading the AGF during a fstrim sr: get/drop reference to device in revalidate and check_events * swap: divide-by-zero when zero length swap file on ssd mm/swapfile.c * fs/proc/proc_sysctl.c: fix potential page fault while unregistering sysctl table fs/proc/proc_sysctl.c sh: fix debug trap failure to process signals before return to user net: mvneta: fix enable of all initialized RXQs * net: Fix untag for vlan packets without ethernet header net/core/skbuff.c llc: properly handle dev_queue_xmit() return value net-usb: add qmi_wwan if on lte modem wistron neweb d18q1 net: qmi_wwan: add BroadMobi BM806U 2020:2033 batman-adv: fix packet loss for broadcasted DHCP packets to a server batman-adv: fix multicast-via-unicast transmission with AP isolation selftests: ftrace: Add a testcase for probepoint selftests: ftrace: Add a testcase for string type with kprobe_event selftests: ftrace: Add probe event argument syntax testcase mm/mempolicy.c: avoid use uninitialized preferred_node * vti4: Don't override MTU passed on link creation via IFLA_MTU net/ipv4/ip_vti.c * vti4: Don't count header length twice on tunnel setup net/ipv4/ip_vti.c batman-adv: fix header size check in batadv_dbg_arp() * net: Fix vlan untag for bridge and vlan_dev with reorder_hdr off include/uapi/linux/if_ether.h net/core/skbuff.c * netfilter: ebtables: fix erroneous reject of last rule net/bridge/netfilter/ebtables.c USB: OHCI: Fix NULL dereference in HCDs using HCD_LOCAL_MEM xen: xenbus: use put_device() instead of kfree() fbdev: Fixing arbitrary kernel leak in case FBIOGETCMAP_SPARC in sbusfb_ioctl_helper(). * scsi: sd: Keep disk read-only when re-reading partition drivers/scsi/sd.c usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers e1000e: allocate ring descriptors with dma_zalloc_coherent e1000e: Fix check_for_link return value with autoneg off watchdog: f71808e_wdt: Fix magic close handling Btrfs: send, fix issuing write op when processing hole in no data mode xen/pirq: fix error path cleanup when binding MSIs net/tcp/illinois: replace broken algorithm reference link * sit: fix IFLA_MTU ignored on NEWLINK net/ipv6/sit.c bcache: fix kcrashes with fio in RAID5 backend dev * r8152: fix tx packets accounting drivers/net/usb/r8152.c clocksource/drivers/fsl_ftm_timer: Fix error return checking * netfilter: ebtables: convert BUG_ONs to WARN_ONs net/bridge/netfilter/ebtables.c batman-adv: invalidate checksum on fragment reassembly batman-adv: fix packet checksum in receive path md/raid1: fix NULL pointer dereference media: dmxdev: fix error code for invalid ioctls x86/topology: Update the 'cpu cores' field in /proc/cpuinfo correctly across CPU hotplug operations locking/xchg/alpha: Fix xchg() and cmpxchg() memory ordering bugs * regulatory: add NUL to request alpha2 include/net/regulatory.h smsc75xx: fix smsc75xx_set_features() ARM: OMAP: Fix dmtimer init for omap1 s390/cio: clear timer when terminating driver I/O s390/cio: fix return code after missing interrupt * kernel/relay.c: limit kmalloc size to KMALLOC_MAX_SIZE kernel/relay.c locking/xchg/alpha: Add unconditional memory barrier to cmpxchg() drm/exynos: fix comparison to bitshift when dealing with a mask md raid10: fix NULL deference in handle_write_completed() mac80211: round IEEE80211_TX_STATUS_HEADROOM up to multiple of 4 NFC: llcp: Limit size of SDP URI ARM: OMAP1: clock: Fix debugfs_create_*() usage ARM: OMAP3: Fix prm wake interrupt for resume scsi: qla4xxx: skip error recovery in case of register disconnect. scsi: aacraid: fix shutdown crash when init fails selftests: memfd: add config fragment for fuse usb: gadget: fsl_udc_core: fix ep valid checks usb: gadget: f_uac2: fix bFirstInterface in composite gadget scsi: qla2xxx: Avoid triggering undefined behavior in qla2x00_mbx_completion() scsi: mptfusion: Add bounds check in mptctl_hp_targetinfo() scsi: sym53c8xx_2: iterator underflow in sym_getsync() scsi: bnx2fc: Fix check in SCSI completion handler for timed out request * scsi: ufs: Enable quirk to ignore sending WRITE_SAME command drivers/scsi/ufs/ufshcd.c * irqchip/gic-v3: Change pr_debug message to pr_devel drivers/irqchip/irq-gic-v3.c bcache: return attach error when no cache set exist bcache: fix for data collapse after re-attaching an attached device bcache: fix for allocator and register thread race bcache: properly set task state in bch_writeback_thread() cifs: silence compiler warnings showing up with gcc-8.0.0 * proc: fix /proc/*/map_files lookup fs/proc/base.c xen/grant-table: Use put_page instead of free_page MIPS: TXx9: use IS_BUILTIN() for CONFIG_LEDS_CLASS ACPI: processor_perflib: Do not send _PPC change notification if not ready * firmware: dmi_scan: Fix handling of empty DMI strings drivers/firmware/dmi_scan.c * x86/power: Fix swsusp_arch_resume prototype include/linux/suspend.h kernel/power/power.h IB/ipoib: Fix for potential no-carrier state * mm: pin address_space before dereferencing it while isolating an LRU page mm/vmscan.c * asm-generic: provide generic_pmdp_establish() include/asm-generic/pgtable.h mm/mempolicy: add nodes_empty check in SYSC_migrate_pages mm/mempolicy: fix the check of nodemask from user ocfs2/acl: use 'ip_xattr_sem' to protect getting extended attribute ocfs2: return -EROFS to mount.ocfs2 if inode block is invalid RDMA/mlx5: Avoid memory leak in case of XRCD dealloc failure jffs2: Fix use-after-free bug in jffs2_iget()'s error handling path HID: roccat: prevent an out of bounds read in kovaplus_profile_activated() scsi: fas216: fix sense buffer initialization btrfs: Fix out of bounds access in btrfs_search_slot * kconfig: Fix expr_free() E_NOT leak scripts/kconfig/expr.c * kconfig: Fix automatic menu creation mem leak scripts/kconfig/menu.c kconfig: Don't leak main menus during parsing watchdog: sp5100_tco: Fix watchdog disable bit nfs: Do not convert nfs_idmap_cache_timeout to jiffies dm thin: fix documentation relative to low water mark threshold tools lib traceevent: Fix get_field_str() for dynamic strings * PCI: Add function 1 DMA alias quirk for Marvell 9128 drivers/pci/quirks.c * tracing/hrtimer: Fix tracing bugs by taking all clock bases and modes into account include/trace/events/timer.h kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl ASoC: au1x: Fix timeout tests in au1xac97c_ac97_read() firewire-ohci: work around oversized DMA reads on JMicron controllers * kernel/signal.c: avoid undefined behaviour in kill_something_info kernel/signal.c xen-swiotlb: fix the check condition for xen_swiotlb_free_coherent libata: Blacklist some Sandisk SSDs for NCQ * do d_instantiate/unlock_new_inode combinations safely fs/dcache.c fs/ecryptfs/inode.c fs/ext4/namei.c include/linux/dcache.h * aio: fix io_destroy(2) vs. lookup_ioctx() race fs/aio.c affs_lookup(): close a race with affs_remove_link() KVM: Fix spelling mistake: "cop_unsuable" -> "cop_unusable" MIPS: Fix ptrace(2) PTRACE_PEEKUSR and PTRACE_POKEUSR accesses to o32 FGRs MIPS: ptrace: Expose FIR register through FP regset Change-Id: Ia6acd6cbeb826e23bcb8b5452dbd3b224410b7ad Signed-off-by: Petri Gynther <pgynther@google.com>
| * clocksource/drivers/fsl_ftm_timer: Fix error return checkingColin Ian King2018-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit f287eb9013ccf199cbfa4eabd80c36fedfc15a73 ] The error checks on freq for a negative error return always fails because freq is unsigned and can never be negative. Fix this by making freq a signed long. Detected with Coccinelle: drivers/clocksource/fsl_ftm_timer.c:287:5-9: WARNING: Unsigned expression compared with zero: freq <= 0 drivers/clocksource/fsl_ftm_timer.c:291:5-9: WARNING: Unsigned expression compared with zero: freq <= 0 Fixes: 2529c3a33079 ("clocksource: Add Freescale FlexTimer Module (FTM) timer support") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: kernel-janitors@vger.kernel.org Link: https://lkml.kernel.org/r/20180226113614.3092-1-colin.king@canonical.com Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | clocksource: arch_timer: make virtual counter access configurableGreg Hackmann2017-10-302-1/+12
| | | | | | | | | | Bug: 68266545 Change-Id: Ibdb1fd768b748002b90bfc165612c12c8311f8a2
* | Revert "clocksource: arch_timer: Enable user access to the physical counter"Greg Hackmann2017-10-301-4/+5
| | | | | | | | | | | | Bug: 68266545 This reverts commit 63cb2598d5bafa8cc861994f724e4b648ab13aca. Change-Id: I67817fcc0518351dbc6860884829c2e957a5b524
* | Revert "drivers: clocksource: arch_timer: enable user access to virt timers"Greg Hackmann2017-10-301-2/+2
| | | | | | | | | | | | Bug: 68266545 This reverts commit 6291ce55fdb6196d1f80cf51162aecb5cfea5df7. Change-Id: Ia38eff8403ea5295df08b007fbbcfb1a8abd4371
* | Merge 3.18.41 into android-msm-marlin-3.18Greg Kroah-Hartman2017-05-091-1/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes in 3.18.41 powerpc/eeh: eeh_pci_enable(): fix checking of post-request state tcp: make challenge acks less predictable mac80211: fix purging multicast PS buffer queue USB: serial: option: add D-Link DWM-156/A3 USB: serial: ftdi_sio: add PIDs for Ivium Technologies devices USB: serial: ftdi_sio: add device ID for WICED USB UART dev board USB: serial: option: add support for Telit LE920A4 USB: serial: fix memleak in driver-registration error path aacraid: Check size values after double-fetch from user crypto: caam - fix non-hmac hashes usb: hub: Fix unbalanced reference count/memory leak/deadlocks s390/dasd: fix hanging device after clear subchannel usb: dwc3: gadget: increment request->actual once usb: dwc3: gadget: fix for short pkts during chained xfers usb: dwc3: gadget: always cleanup all TRBs drm/i915: fix aliasing_ppgtt leak usb: misc: usbtest: add fix for driver hang cdc-acm: fix wrong pipe type on rx interrupt xfers xhci: always handle "Command Ring Stopped" events usb: xhci: Fix panic if disconnect ARC: Call trace_hardirqs_on() before enabling irqs ARC: Elide redundant setup of DMA callbacks uprobes: Fix the memcg accounting drm/radeon: don't use fractional dividers on RS[78]80 if SS is enabled drm/radeon: only apply the SS fractional workaround to RS[78]80 bcache: register_bcache(): call blkdev_put() when cache_alloc() fails bcache: RESERVE_PRIO is too small by one when prio_buckets() is a power of two. gpio: Fix OF build problem on UM drm/radeon: fix radeon_move_blit on 32bit systems Input: i8042 - set up shared ps2_cmd_mutex for AUX ports ARCv2: STAR 9000808988: signals involving Delay Slot ARC: use correct offset in pt_regs for saving/restoring user mode r25 ARC: Support syscall ABI v4 ARC: export __udivdi3 for modules parisc: Fix order of EREFUSED define in errno.h drm: Reject page_flip for !DRIVER_MODESET Input: tegra-kbc - fix inverted reset logic ubifs: Fix assertion in layout_in_gaps() timekeeping: Cap array access in timekeeping_debug xenbus: don't look up transaction IDs for ordinary writes dm flakey: fix reads to be issued if drop_writes configured clocksource/drivers/sun4i: Clear interrupts after stopping timer in probe function fs/seq_file: fix out-of-bounds read net: fec: fix NULL pointer dereference in fec_enet_timeout_work PCI: Support PCIe devices with short cfg_size PCI: Add Netronome vendor and device IDs PCI: Limit config space size for Netronome NFP6000 family PCI: Add Netronome NFP4000 PF device ID PCI: Limit config space size for Netronome NFP4000 Linux 3.18.41 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
| * clocksource/drivers/sun4i: Clear interrupts after stopping timer in probe ↵Chen-Yu Tsai2016-08-311-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function [ Upstream commit b53e7d000d9e6e9fd2c6eb6b82d2783c67fd599e ] The bootloader (U-boot) sometimes uses this timer for various delays. It uses it as a ongoing counter, and does comparisons on the current counter value. The timer counter is never stopped. In some cases when the user interacts with the bootloader, or lets it idle for some time before loading Linux, the timer may expire, and an interrupt will be pending. This results in an unexpected interrupt when the timer interrupt is enabled by the kernel, at which point the event_handler isn't set yet. This results in a NULL pointer dereference exception, panic, and no way to reboot. Clear any pending interrupts after we stop the timer in the probe function to avoid this. Cc: stable@vger.kernel.org Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
* | drivers: clocksource: arch_timer: enable user access to virt timersKyle Yan2016-06-131-2/+2
| | | | | | | | | | | | | | | | | | Allow virtual timers i.e. CNTV_TVAL_EL0 to be accessed by userspace. CRs-Fixed: 1018301 Change-Id: I724ddbf4e7c02ee25622c6712210aee948d037f6 Signed-off-by: Kyle Yan <kyan@codeaurora.org>
* | clocksource: arch_timer: Use _no_log variants while accessing registersPrasad Sodagudi2015-08-131-16/+17
| | | | | | | | | | | | | | | | | | arch_timer register accesses happen more frequently flooding the RTB logs. Since they are not that useful for debugging purposes, use _no_log variants while accessing those registers. Change-Id: Ide35ef1a01e4792c1b3b7b7be7ad3f069dc2f694 Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
* | arm: arm_arch_timer: export function to read physical counterAnand N Sunkad2015-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | Since the arch_timer is a system-wide block, other hardware in an SoC can make use of the counter values. Export a way to read the physical counter for use by other drivers. Change-Id: Ib3c9f6fb4d1a077ba32ac13d9ff945d11686b23a CRs-Fixed: 542881 Signed-off-by: Anand N Sunkad <asunka@codeaurora.org>
* | Merge tag 'v3.18.18' into msm-3.18Matt Wagantall2015-07-141-13/+30
|\| | | | | | | | | | | | | | | | | | | | | | | Linux 3.18.18 Resolve trivial context conflicts as part of the merge. Conflicts: drivers/usb/dwc3/gadget.c Change-Id: Id01a97938e743d4e6b53b9e1a156e31db8097f1d Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
| * clocksource: exynos_mct: Avoid blocking calls in the cpu hotplug notifierDamian Eppel2015-07-051-13/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit 56a94f13919c0db5958611b388e1581b4852f3c9 ] Whilst testing cpu hotplug events on kernel configured with DEBUG_PREEMPT and DEBUG_ATOMIC_SLEEP we get following BUG message, caused by calling request_irq() and free_irq() in the context of hotplug notification (which is in this case atomic context). [ 40.785859] CPU1: Software reset [ 40.786660] BUG: sleeping function called from invalid context at mm/slub.c:1241 [ 40.786668] in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/1 [ 40.786678] Preemption disabled at:[< (null)>] (null) [ 40.786681] [ 40.786692] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.19.0-rc4-00024-g7dca860 #36 [ 40.786698] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 40.786728] [<c0014a00>] (unwind_backtrace) from [<c0011980>] (show_stack+0x10/0x14) [ 40.786747] [<c0011980>] (show_stack) from [<c0449ba0>] (dump_stack+0x70/0xbc) [ 40.786767] [<c0449ba0>] (dump_stack) from [<c00c6124>] (kmem_cache_alloc+0xd8/0x170) [ 40.786785] [<c00c6124>] (kmem_cache_alloc) from [<c005d6f8>] (request_threaded_irq+0x64/0x128) [ 40.786804] [<c005d6f8>] (request_threaded_irq) from [<c0350b8c>] (exynos4_local_timer_setup+0xc0/0x13c) [ 40.786820] [<c0350b8c>] (exynos4_local_timer_setup) from [<c0350ca8>] (exynos4_mct_cpu_notify+0x30/0xa8) [ 40.786838] [<c0350ca8>] (exynos4_mct_cpu_notify) from [<c003b330>] (notifier_call_chain+0x44/0x84) [ 40.786857] [<c003b330>] (notifier_call_chain) from [<c0022fd4>] (__cpu_notify+0x28/0x44) [ 40.786873] [<c0022fd4>] (__cpu_notify) from [<c0013714>] (secondary_start_kernel+0xec/0x150) [ 40.786886] [<c0013714>] (secondary_start_kernel) from [<40008764>] (0x40008764) Interrupts cannot be requested/freed in the CPU_STARTING/CPU_DYING notifications which run on the hotplugged cpu with interrupts and preemption disabled. To avoid the issue, request the interrupts for all possible cpus in the boot code. The interrupts are marked NO_AUTOENABLE to avoid a racy request_irq/disable_irq() sequence. The flag prevents the request_irq() code from enabling the interrupt immediately. The interrupt is then enabled in the CPU_STARTING notifier of the hotplugged cpu and again disabled with disable_irq_nosync() in the CPU_DYING notifier. [ tglx: Massaged changelog to match the patch ] Fixes: 7114cd749a12 ("clocksource: exynos_mct: use (request/free)_irq calls for local timer registration") Reported-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Tested-by: Marcin Jabrzyk <m.jabrzyk@samsung.com> Signed-off-by: Damian Eppel <d.eppel@samsung.com> Cc: m.szyprowski@samsung.com Cc: kyungmin.park@samsung.com Cc: daniel.lezcano@linaro.org Cc: kgene@kernel.org Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/1435324984-7328-1-git-send-email-d.eppel@samsung.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: <stable@vger.kernel.org> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
* | Merge tag 'v3.18.12' into msm-3.18Matt Wagantall2015-07-142-6/+6
|\| | | | | | | | | | | | | Linux 3.18.12 Change-Id: Ibdaf047e565608b583917deeed01f20a3d9bef9c Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
| * clocksource: efm32: Fix a NULL pointer dereferenceYongbae Park2015-04-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit 7b8f10da3bf1056546133c9f54f49ce389fd95ab ] The initialisation of the efm32 clocksource first sets up the irq and only after that initialises the data needed for irq handling. In case this initialisation is delayed the irq handler would dereference a NULL pointer. I'm not aware of anything that could delay the process in such a way, but it's better to be safe than sorry, so setup the irq only when the clock event device is ready. Cc: stable@vger.kernel.org Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Yongbae Park <yongbae2@gmail.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
| * clockevents: sun5i: Fix setup_irq init sequenceYongbae Park2015-04-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit 1096be084ac59927158ce80ff1d31c33eed0e565 ] The interrupt is enabled before the handler is set. Even this bug did not appear, it is potentially dangerous as it can lead to a NULL pointer dereference. Fix the error by enabling the interrupt after clockevents_config_and_register() is called. Cc: stable@vger.kernel.org Signed-off-by: Yongbae Park <yongbae2@gmail.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
* | Merge tag 'v3.18.9' into msm-3.18Matt Wagantall2015-07-141-4/+5
|\| | | | | | | | | | | | | This is the 3.18.9 stable release Change-Id: Ica4795b84ccfb8583b8db7c536bba48f38fb28df Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
| * clocksource: mtk: Fix race conditions in probe codeMatthias Brugger2015-03-061-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit d4a19eb3b15a4ba98f627182f48d5bc0cffae670 upstream. We have two race conditions in the probe code which could lead to a null pointer dereference in the interrupt handler. The interrupt handler accesses the clockevent device, which may not yet be registered. First race condition happens when the interrupt handler gets registered before the interrupts get disabled. The second race condition happens when the interrupts get enabled, but the clockevent device is not yet registered. Fix that by disabling the interrupts before we register the interrupt and enable the interrupts after the clockevent device got registered. Reported-by: Gongbae Park <yongbae2@gmail.com> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge tag 'v3.18.6' into msm-3.18Matt Wagantall2015-07-141-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the 3.18.6 stable release Resolve conflicts in arch_timer code related to inclusion of the local change 22953ce9e86a ("ARM: arch_timer: resurrect cntpct for MSM users") and upstream change b2f21d1b ("clocksource: arch_timer: Only use the virtual counter (CNTVCT) on arm64"), as well as a trivial context conflict in soc-compress.c. Conflicts: drivers/clocksource/arm_arch_timer.c sound/soc/soc-compress.c Change-Id: I1057739415e6fdbc450432fe8b5f5450cfd80a15 Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
| * clocksource: arch_timer: Only use the virtual counter (CNTVCT) on arm64Catalin Marinas2015-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit d6ad36913083d683aad4e02e53580c995f1a6ede upstream. Commit 0b46b8a718c6 (clocksource: arch_timer: Fix code to use physical timers when requested) introduces the use of physical counters in the ARM architected timer driver. However, he arm64 kernel uses CNTVCT in VDSO. When booting in EL2, the kernel switches to the physical timers to make things easier for KVM but it continues to use the virtual counter both in user and kernel. While in such scenario CNTVCT == CNTPCT (since CNTVOFF is initialised by the kernel to 0), we want to spot firmware bugs corrupting CNTVOFF early (which would affect CNTVCT). Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Tested-by: Yingjoe Chen <yingjoe.chen@mediatek.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 0b46b8a718c6 ("clocksource: arch_timer: Fix code to use physical timers when requested") Cc: Ian Campbell <ijc@hellion.org.uk> Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge tag 'v3.18.5' into msm-3.18Matt Wagantall2015-07-141-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | This is the 3.18.5 stable release Resolve a conflict due to similar (but not identical) array-out-of-bounds fixes in pinctrl-msm.c made upstream and internally. Keep the upstream version. Conflicts: drivers/pinctrl/qcom/pinctrl-msm.c Change-Id: Ib8c2bce3963b1807c6937eb3bff48b7a1738dd6c Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
| * clocksource: exynos_mct: Fix bitmask regression for exynos4_mct_writeTobias Jakobi2015-01-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 8c38d28ba8da98f7102c31d35359b4dbe9d1f329 upstream. EXYNOS4_MCT_L_MASK is defined as 0xffffff00, so applying this bitmask produces a number outside the range 0x00 to 0xff, which always results in execution of the default switch statement. Obviously this is wrong and git history shows that the bitmask inversion was incorrectly set during a refactoring of the MCT code. Fix this by putting the inversion at the correct position again. Acked-by: Kukjin Kim <kgene.kim@samsung.com> Reported-by: GP Orcullo <kinsamanka@gmail.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge tag 'v3.18.2' into msm-3.18Matt Wagantall2015-07-141-2/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the 3.18.2 stable release Resolve conflicts in arch_timer code related to inclusion of the local change 22953ce9e86a ("ARM: arch_timer: resurrect cntpct for MSM users") and upstream change 82c236bcbe0c ("clocksource: arch_timer: Fix code to use physical timers when requested"), as well as a trivial context conflict in mmc/card/block.c. Conflicts: arch/arm/include/asm/arch_timer.h arch/arm64/include/asm/arch_timer.h drivers/clocksource/arm_arch_timer.c drivers/mmc/card/block.c Change-Id: I453acfd66eb856181c2a497dcdb235ce39db9292 Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
| * clocksource: arch_timer: Fix code to use physical timers when requestedSonny Rao2015-01-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 0b46b8a718c6e90910a1b1b0fe797be3c167e186 upstream. This is a bug fix for using physical arch timers when the arch_timer_use_virtual boolean is false. It restores the arch_counter_get_cntpct() function after removal in 0d651e4e "clocksource: arch_timer: use virtual counters" We need this on certain ARMv7 systems which are architected like this: * The firmware doesn't know and doesn't care about hypervisor mode and we don't want to add the complexity of hypervisor there. * The firmware isn't involved in SMP bringup or resume. * The ARCH timer come up with an uninitialized offset between the virtual and physical counters. Each core gets a different random offset. * The device boots in "Secure SVC" mode. * Nothing has touched the reset value of CNTHCTL.PL1PCEN or CNTHCTL.PL1PCTEN (both default to 1 at reset) One example of such as system is RK3288 where it is much simpler to use the physical counter since there's nobody managing the offset and each time a core goes down and comes back up it will get reinitialized to some other random value. Fixes: 0d651e4e65e9 ("clocksource: arch_timer: use virtual counters") Signed-off-by: Sonny Rao <sonnyrao@chromium.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge "ARM: arch_timer: force re-selection of the best clocksource"Linux Build Service Account2015-06-231-0/+1
|\ \
| * | ARM: arch_timer: force re-selection of the best clocksourceSe Wang (Patrick) Oh2015-06-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the best clocksource is not selected till core boot completion, only periodic tick timer works and it increases jiffies by one at every tick updates. If interrupt is disabled more than one tick(10ms), timer interrupts are missed and jiffies can't be updated at every 10ms and it can be behind the real time. So make it possible to select the best clocksource right after arm arch timer initialization so that jiffies can be increased by multiple counts since then. Change-Id: Id8c4e3ce9b9e44061fef7ad7e678ca1c27d84bb1 Signed-off-by: Se Wang (Patrick) Oh <sewango@codeaurora.org>
* | | Merge "arm: traps: emulate a MRCC instruction reading CNTPCT register"Linux Build Service Account2015-06-161-0/+2
|\ \ \
| * | | arm: traps: emulate a MRCC instruction reading CNTPCT registerSe Wang (Patrick) Oh2015-06-111-0/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A user space application is planned to support feature for synchronized timestamp among debug packets across peripherals. As part of the feature, it is responsible for providing physical timer count value to user space. If memory mapped timer is used in ARM arch, Usersapce can't read the physical timer count directly with a MRCC ASM instruction. So Kernel traps the instruction and returns the physical timer count. Change-Id: Ia3f0d9c8c06ca9e2204187890c0c57c8640e4f7e Signed-off-by: Se Wang (Patrick) Oh <sewango@codeaurora.org>
* / / clocksource: arch_timer: Enable user access to the physical counterSe Wang (Patrick) Oh2015-06-051-5/+4
|/ / | | | | | | | | | | | | | | | | | | | | A user space application is planned to support feature for synchronized timestamp among debug packets across peripherals. As part of the feature, it is responsible for providing physical timer count value to user space. So Enable user access to the physical counter in cp15 register. Change-Id: Idf7f6375713d842925e6f72a4b1fb98a7168726d Signed-off-by: Se Wang (Patrick) Oh <sewango@codeaurora.org>
* | clocksource: arch_timer: Export arch_counter_get_cntvct()Stephen Boyd2015-05-301-0/+1
| | | | | | | | | | | | | | | | | | get_cycles() on arm64 is defined to be arch_counter_get_cntvct(). Export this function to modules so that modules can use get_cycles() appropriately. Change-Id: I3e66af01cbd4f2631637ccfba94e1fe589625b4e Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
* | ARM: arch_timer: resurrect cntpct for MSM usersStephen Boyd2015-05-301-2/+30
|/ | | | | | | | | | | | | | | | | | | | | | | | | | ARM: arch_timer: resurrect cntpct for MSM users We have some users of the physical counter reading function, and they need to work when either the cp15 or mmio timers are present in any configuration. Bring back the functionality and expose it to drivers so that the RPM code and SMEM code have proper global timestamps to communicate with other processors. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> ARM64: arch_timer: resurrect cntpct for MSM users We have some users of the physical counter reading function, and they need to work when either the cp15 or mmio timers are present in any configuration. Change-Id: If37d73be1a75ef33be1e2276d4fa84740d933891 Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org> [joshc: combine 32-bit and 64-bit patches, fixed up trivial add/change conflict] Signed-off-by: Josh Cartwright <joshc@codeaurora.org> [abhimany: fixed up trivial add/change conflict] Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
* clockevent: sun4i: Fix race condition in the probe codeMaxime Ripard2014-11-191-6/+6
| | | | | | | | | | | | | | | | | | The interrupts were activated and the handler registered before the clockevent was registered in the probe function. The interrupt handler, however, was making the assumption that the clockevent device was registered. That could cause a null pointer dereference if the timer interrupt was firing during this narrow window. Fix that by moving the clockevent registration before the interrupt is enabled. Reported-by: Roman Byshko <rbyshko@gmail.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: stable@vger.kernel.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
* ARM/ARM64: arch-timer: fix arch_timer_probed logicMarc Zyngier2014-10-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit c387f07e6205 (clocksource: arm_arch_timer: Discard unavailable timers correctly) changed the way the driver makes sure both the memory and system-register timers have been probed before finalizing the probing. There is a interesting flaw in this logic that leads to this final step never to be executed. Things seems to work pretty well until something actually needs the data that is produced during this final stage. For example, KVM explodes on the first run of a guest when executed on a platform that has both memory and sysreg nodes (Juno, for example). Just fix the damned logic, and enjoy booting VMs again. Tested on a Juno system. Cc: Sudeep Holla <sudeep.holla@arm.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Christoffer Dall <christoffer.dall@linaro.org> Reported-by: Riku Voipio <riku.voipio@linaro.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Sudeep Holla <sudeep.holla@arm.com> Tested-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
* Merge branch 'for-3.18-consistent-ops' of ↵Linus Torvalds2014-10-153-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu Pull percpu consistent-ops changes from Tejun Heo: "Way back, before the current percpu allocator was implemented, static and dynamic percpu memory areas were allocated and handled separately and had their own accessors. The distinction has been gone for many years now; however, the now duplicate two sets of accessors remained with the pointer based ones - this_cpu_*() - evolving various other operations over time. During the process, we also accumulated other inconsistent operations. This pull request contains Christoph's patches to clean up the duplicate accessor situation. __get_cpu_var() uses are replaced with with this_cpu_ptr() and __this_cpu_ptr() with raw_cpu_ptr(). Unfortunately, the former sometimes is tricky thanks to C being a bit messy with the distinction between lvalues and pointers, which led to a rather ugly solution for cpumask_var_t involving the introduction of this_cpu_cpumask_var_ptr(). This converts most of the uses but not all. Christoph will follow up with the remaining conversions in this merge window and hopefully remove the obsolete accessors" * 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (38 commits) irqchip: Properly fetch the per cpu offset percpu: Resolve ambiguities in __get_cpu_var/cpumask_var_t -fix ia64: sn_nodepda cannot be assigned to after this_cpu conversion. Use __this_cpu_write. percpu: Resolve ambiguities in __get_cpu_var/cpumask_var_t Revert "powerpc: Replace __get_cpu_var uses" percpu: Remove __this_cpu_ptr clocksource: Replace __this_cpu_ptr with raw_cpu_ptr sparc: Replace __get_cpu_var uses avr32: Replace __get_cpu_var with __this_cpu_write blackfin: Replace __get_cpu_var uses tile: Use this_cpu_ptr() for hardware counters tile: Replace __get_cpu_var uses powerpc: Replace __get_cpu_var uses alpha: Replace __get_cpu_var ia64: Replace __get_cpu_var uses s390: cio driver &__get_cpu_var replacements s390: Replace __get_cpu_var uses mips: Replace __get_cpu_var uses MIPS: Replace __get_cpu_var uses in FPU emulator. arm: Replace __this_cpu_ptr with raw_cpu_ptr ...
| * clocksource: Replace __this_cpu_ptr with raw_cpu_ptrChristoph Lameter2014-08-261-1/+1
| | | | | | | | | | | | | | One newly introduced __this_cpu_ptr should be raw_cpu_ptr. Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * drivers/clocksource: Replace __get_cpu_var used for address calculationChristoph Lameter2014-08-261-1/+1
| | | | | | | | | | | | | | | | Replace __get_cpu_var used for address calculation with this_cpu_ptr. Acked-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * time: Replace __get_cpu_var usesChristoph Lameter2014-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Convert uses of __get_cpu_var for creating a address from a percpu offset to this_cpu_ptr. The two cases where get_cpu_var is used to actually access a percpu variable are changed to use this_cpu_read/raw_cpu_read. Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* | Merge branch 'timers-core-for-linus' of ↵Linus Torvalds2014-10-097-12/+247
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "Nothing really exciting this time: - a few fixlets in the NOHZ code - a new ARM SoC timer abomination. One should expect that we have enough of them already, but they insist on inventing new ones. - the usual bunch of ARM SoC timer updates. That feels like herding cats" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource: arm_arch_timer: Consolidate arch_timer_evtstrm_enable clocksource: arm_arch_timer: Enable counter access for 32-bit ARM clocksource: arm_arch_timer: Change clocksource name if CP15 unavailable clocksource: sirf: Disable counter before re-setting it clocksource: cadence_ttc: Add support for 32bit mode clocksource: tcb_clksrc: Sanitize IRQ request clocksource: arm_arch_timer: Discard unavailable timers correctly clocksource: vf_pit_timer: Support shutdown mode ARM: meson6: clocksource: Add Meson6 timer support ARM: meson: documentation: Add timer documentation clocksource: sh_tmu: Document r8a7779 binding clocksource: sh_mtu2: Document r7s72100 binding clocksource: sh_cmt: Document SoC specific bindings timerfd: Remove an always true check nohz: Avoid tick's double reprogramming in highres mode nohz: Fix spurious periodic tick behaviour in low-res dynticks mode
| * | clocksource: arm_arch_timer: Consolidate arch_timer_evtstrm_enableNathan Lynch2014-09-291-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The arch_timer_evtstrm_enable hooks in arm and arm64 are substantially similar, the only difference being a CONFIG_COMPAT-conditional section which is relevant only for arm64. Copy the arm64 version to the driver, removing the arch-specific hooks. Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Will Deacon <will.deacon@arm.com>
| * | clocksource: arm_arch_timer: Enable counter access for 32-bit ARMNathan Lynch2014-09-291-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only difference between arm and arm64's implementations of arch_counter_set_user_access is that 32-bit ARM does not enable user access to the virtual counter. We want to enable this access for the 32-bit ARM VDSO, so copy the arm64 version to the driver itself, and remove the arch-specific implementations. Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Will Deacon <will.deacon@arm.com>
| * | clocksource: arm_arch_timer: Change clocksource name if CP15 unavailableNathan Lynch2014-09-291-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The arm and arm64 VDSOs need CP15 access to the architected counter. If this is unavailable (which is allowed by ARM v7), indicate this by changing the clocksource name to "arch_mem_counter" before registering the clocksource. Suggested by Stephen Boyd. Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Will Deacon <will.deacon@arm.com>
| * | clocksource: sirf: Disable counter before re-setting itHao Liu2014-09-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to HW spec, we have to disable the counter before setting it, if we don't this, in pressure test, sometimes the timer might not generate interrupt any more. And this patch also fixes a typo for register set by changing 0x7 to 0x3. 0x7 is loop mode in HW, but here we are using oneshot 0x3. Signed-off-by: Hao Liu <Hao.Liu@csr.com> Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
| * | clocksource: cadence_ttc: Add support for 32bit modeMichal Simek2014-09-291-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | New TTCs support 32bit mode. Older versions support only 16bit modes. Keep 16bit mode as default and 32bit optional. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
| * | clocksource: tcb_clksrc: Sanitize IRQ requestGael Portay2014-09-291-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clock is not unprepared in case of the request IRQ fails. Also update to request_irq. Signed-off-by: Gaël PORTAY <gael.portay@gmail.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
| * | clocksource: arm_arch_timer: Discard unavailable timers correctlySudeep Holla2014-09-291-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we wait until both cp15 and mem timers are probed if we have both timer device nodes present in the device tree without checking if the device is actually available. If one of the timer device node present is disabled, the system locks up on the boot as no timer gets registered. This patch adds the check for the availability of the timer device so that unavailable timers are discarded correctly. It also adds the missing of_node_put. Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
| * | clocksource: vf_pit_timer: Support shutdown modeStefan Agner2014-09-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to avoid waking up the system in a low power mode, the clocksource should not generate interrupts anymore. Disable the PIT timer interrupt when changing into the CLOCK_EVT_MODE_SHUTDOWN mode. [dlezcano] : remove superfluous empty line Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Bill Pringlemeir <bpringlemeir@nbsps.com>
| * | ARM: meson6: clocksource: Add Meson6 timer supportCarlo Caione2014-09-293-0/+171
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Meson6 SoCs are equipped with 5 32-bit timers, called TIMER_A, TIMER_B, TIMER_C, TIMER_D and TIMER_E. The driver is providing clocksource support for the 32-bit counter using TIMER_E. Clockevents are also supported using TIMER_A. Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Carlo Caione <carlo@caione.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
* | Merge tag 'drivers-for-linus' of ↵Linus Torvalds2014-10-083-0/+301
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Arnd Bergmann: "These are changes for drivers that are intimately tied to some SoC and for some reason could not get merged through the respective subsystem maintainer tree. Most of the new code is for the Keystone Navigator driver, which is new base support that is going to be needed for their hardware accelerated network driver and other units. Most of the commits are for moving old code around from at91 and omap for things that are done in device drivers nowadays. - at91: move reset, poweroff, memory and clocksource code into drivers directories - socfpga: add edac driver (through arm-soc, as requested by Boris) - omap: move omap-intc code to drivers/irqchip - sunxi: added an RTC driver for sun6i - omap: mailbox driver related changes - keystone: support for the "Navigator" component - versatile: new reboot, led and soc drivers" * tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (92 commits) bus: arm-ccn: Fix spurious warning message leds: add device tree bindings for register bit LEDs soc: add driver for the ARM RealView power: reset: driver for the Versatile syscon reboot leds: add a driver for syscon-based LEDs drivers/soc: ti: fix build break with modules MAINTAINERS: Add Keystone Multicore Navigator drivers entry soc: ti: add Keystone Navigator DMA support Documentation: dt: soc: add Keystone Navigator DMA bindings soc: ti: add Keystone Navigator QMSS driver Documentation: dt: soc: add Keystone Navigator QMSS bindings rtc: sunxi: Depend on platforms sun4i/sun7i that actually have the rtc rtc: sun6i: Add sun6i RTC driver irqchip: omap-intc: remove unnecessary comments irqchip: omap-intc: correct maximum number or MIR registers irqchip: omap-intc: enable TURBO idle mode irqchip: omap-intc: enable IP protection irqchip: omap-intc: remove unnecesary of_address_to_resource() call irqchip: omap-intc: comment style cleanup irqchip: omap-intc: minor improvement to omap_irq_pending() ...
| * | ARM: at91: PIT: Move the driver to drivers/clocksourceMaxime Ripard2014-09-153-0/+301
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we don't depend on anyting in the mach-at91 directory, we can just move the driver to where it belongs. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Conflicts: arch/arm/mach-at91/Kconfig arch/arm/mach-at91/Makefile
* | clocksource: tcb_clksrc: sanitize IRQ requestGaël PORTAY2014-09-081-9/+4
| | | | | | | | | | | | | | | | | | | | | | The clock is not unprepared in case of the request IRQ fails. Also update to request_irq. Signed-off-by: Gaël PORTAY <gael.portay@gmail.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* | ARM: at91/tclib: move initialization from alloc to probeGaël PORTAY2014-09-081-1/+1
|/ | | | | | | | | | | | | | | | | | | Move resource retrieval from atmel_tc_alloc to tc_probe to avoid lately reporting resource related issues when a TC block user request a TC block. Moreover, resources retrieval are usually done in the probe function, thus moving them add some consistency with other drivers. Initialization is done once, ie not every time a tc block is requested. If it fails, the device is not appended to the list of tc blocks. Furhermore, the device id is retrieved at probe as well, avoiding parsing DT every time the user requests of tc block. Signed-off-by: Gaël PORTAY <gael.portay@gmail.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>