Commit graph

562399 commits

Author SHA1 Message Date
Krzysztof Kozlowski
a83a793ad4 rtc: s5m: Cleanup by removing useless 'rtc' prefix from fields
Remove the 'rtc' prefix from some of the fields in struct
s5m_rtc_reg_config because it is obvious - this is a RTC driver. No
functional changes.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Tested-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:21:35 +01:00
LABBE Corentin
f571287bda rtc: Replace simple_strtoul by kstrtoul
The simple_strtoul function is obsolete.
This patch replace it by kstrtoul.

Since kstrtoul is more strict, it permits to filter some invalid input that
simple_strtoul accept. For example:
echo '1022xxx' > /sys/devices/pnp0/00:03/rtc/rtc0/max_user_freq
cat /sys/devices/pnp0/00:03/rtc/rtc0/max_user_freq
1022

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:20:02 +01:00
Alexandre Belloni
718a820a30 rtc: abx80x: add alarm support
Add alarm support to the abx80x driver.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:20:01 +01:00
Alexandre Belloni
fca733a14e rtc: abx80x: Add Microcrystal rv1805 support
Microcrystal RV-1805 is compatible with Abracon 1805.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:20:01 +01:00
Julia Lawall
7432a850b5 rtc: v3020: constify v3020_chip_ops structures
The v3020_chip_ops structures are never modified, so declare them as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:20:00 +01:00
Gregory CLEMENT
78ef5f2d2d rtc: rv8803: Extend compatibility with the rx8900
The Seiko Epson's RTC RX8900 layout register is compatible with the
RV8803. So let's add its ID in order to reuse the same driver.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:20:00 +01:00
Andrzej Hajda
68c85f2916 rtc: rv8803: fix handling return value of i2c_smbus_read_byte_data
The function can return negative values, so its result should
be assigned to signed variable.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2046107

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:20:00 +01:00
Akshay Bhat
ed13d89b08 rtc: Add Epson RX8010SJ RTC driver
This driver supports the following functions:
 - reading and setting time
 - alarms when connected to an IRQ
 - reading and clearing the voltage low flags

Datasheet:
http://www.epsondevice.com/docs/qd/en/DownloadServlet?id=ID000956
Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:19:59 +01:00
Vladimir Zapolskiy
529af7d198 rtc: lpc32xx: remove irq > NR_IRQS check from probe()
If the driver is used on an ARM platform with SPARSE_IRQ defined,
semantics of NR_IRQS is different (minimal value of virtual irqs)
and by default it is set to 16, see arch/arm/include/asm/irq.h.

This value may be less than the actual number of virtual irqs, which
may break the driver initialization. The check removal allows to use
the driver on such a platform, and, if irq controller driver works
correctly, the check is not needed on legacy platforms.

Fixes a runtime problem:

  rtc-lpc32xx 40024000.rtc: Can't get interrupt resource

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:19:59 +01:00
Colin Ian King
d5878a869f rtc: imxdi: fix spelling mistake in warning message
Minor issue, fix spelling mistake, happend -> happened

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:19:58 +01:00
Rasmus Villemoes
9c25a106c0 rtc: ds1685: don't try to micromanage sysfs output size
...and don't do it wrong.

"not ok or N/A" has length 13. Add the trailing newline, and the
snprintf return value will be 14. However, we lied to snprintf and
told it that only 13 bytes were available. Hence snprintf has only
written "not ok or N/" and a trailing '\0' to the buffer. Next we
continue lying, this time to the upper sysfs layer, claiming that we
wrote 14 meaningful bytes to the buffer. That'll make the upper layer
copy "not ok or N/" plus two nul bytes to user space (one nul byte
from snprintf, the other since sysfs takes care to clear the buffer
before giving it to the ->show method).

In the other cases, the claimed buffer size is closer to sufficient,
but we'll still get a nul byte instead of a newline written to user
space.  There's absolutely no reason to try to predict the output
size, and there's plenty of room in the buffer, so just use sprintf.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:19:58 +01:00
Rasmus Villemoes
ff67abd236 rtc: use %ph for short hex dumps
This makes the generated code slightly smaller.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:19:58 +01:00
Enrico Scholz
2ad2c17480 rtc: da9063: avoid writing undefined data to rtc
driver did

| static void da9063_tm_to_data(struct rtc_time *tm, u8 *data,
| {
|  	const struct da9063_compatible_rtc_regmap *config = rtc->config;
|
| 	data[RTC_SEC] &= ~config->rtc_count_sec_mask;
| 	data[RTC_SEC] |= tm->tm_sec & config->rtc_count_sec_mask;
| ...
| }
| ...
| static int da9063_rtc_set_time(struct device *dev, struct rtc_time *tm)
| {
|       ...
|	u8 data[RTC_DATA_LEN];
|	int ret;
|
|	da9063_tm_to_data(tm, data, rtc);

which means that some bits of stack content (in 'data[]') was masked out
and written to the RTC.

Because da9063_tm_to_data() is used only by da9063_rtc_set_time() and
da9063_rtc_set_alarm(), we can write fields directly.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Acked-by: Steve Twiss <stwiss.opensource@diasemi.com>
Tested-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:19:57 +01:00
LABBE Corentin
4d833d6013 rtc: sunxi: use of_device_get_match_data
The usage of of_device_get_match_data reduce the code size a bit.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:19:57 +01:00
LABBE Corentin
6ddab92faa rtc: sunxi: constify the data_year_param structure
The data_year_param struct is never modified, so lets constify it.
This permit to remove cast since of_device_id is const also.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:19:56 +01:00
LABBE Corentin
f8947feb2c rtc: sunxi: fix signedness issues
The variable year must be set as unsigned since it is used with
sunxi_rtc_data_year{.min|.max} and as parameter of is_leap_year() which
wait for unsigned int.
Only tm_year is not unsigned, but it is long.
This patch fix also the format of printing of min/max. (must use %u since
they are unsigned)

The parameter to of sunxi_rtc_setaie() must be set to uint since callers
give always uint data.

Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:19:56 +01:00
Nizam Haider
3fc2c14aca rtc: gemini: Remove unnecessary platform_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure

Signed-off-by: Nizam Haider <nijamh@cdac.in>
Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:19:56 +01:00
Geliang Tang
501385f2a7 rtc: efi: add efi_procfs in efi_rtc_ops
Add efi_procfs in efi_rtc_ops to show rtc-efi info in /proc/driver/rtc.
Most of the code comes from efi_rtc_proc_show() in efirtc.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:19:55 +01:00
Geliang Tang
b01079be44 rtc: fix module reference count in rtc-proc
rtc-proc.c is not built as a module. Thus, rather than dealing with
THIS_MODULE's reference count, we should deal with rtc->owner's
reference count.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:19:55 +01:00
Uwe Kleine-König
fbbf53f702 rtc: pcf8523: refuse to write dates later than 2099
When the chip increments the YEAR register and it already holds
bin2bcd(99) it reads as 0 afterwards. With this behaviour the last valid
day (without trickery) that has a representation is 2099-12-31 23:59:59.
So refuse to write later dates.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2016-01-11 20:19:54 +01:00
Alexandre Belloni
c60faa3afa Immutable branch between MFD, Regulator and RTC for the v4.5 merge window
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWUuxrAAoJEFGvii+H/HdhgTIP/1YxzOiEmEHV5HRmzh3mpn7J
 9CvcAFY1TL0vHJbpl4v269xzooum4RtHyKR7p0bShUZRPIfVf//yeoKQQWLhws5w
 M5zde3dGn27uI6o/rky62RClAgUE3HfTk+6MspLl2wyZpuiducoaiijqQGInHAJR
 68KQR2mutOItg6a8ZUdWS0pAYdfX27k9ek9k1fQhAH5+dE563Ad/Gw2ten9/Tf01
 6NgHZMnON7H337WvwZhIf+aK/rKgScD5WB6CwGll157qmOFU/RKp3Wl8MTDcyAZS
 qWl/YNQro8HUVyQ0u0i8GpPDGiL9rS9ZX4oeqk6ATRR3Si2o0Lfd5MOhfMR3MiX+
 r7Rimc+OaKazHlW0UtcrzF1vsQhsvrFW6bZXqCJKgcpwU+HjEJvlanY/9TOW4wAh
 lPBUeE0BMC1AJUiO7/Opk8hHl8GMw6XEK6T6Rnwlm1LA4kf89W+nUyPUWacaJLVe
 pKaJIii/xqJKIB32LCRQUqxbTYYWlX8nmjsEAUBGSLrwww4xWIC/j9J2OwfHz/mf
 0DMZGb8wJbsvGgkF6Wqro3/ytyVJsiP+tvOM42f1ZKMkOgTsbFMoF+MJ4x4XOLoE
 uaz6H4uUZOPu6f2ICL9LGXg/hrzUmfnOjfNzyLwjf8sAARMYg7pUcBRZqdSqZaPh
 /9MBsosF7WzWTi3SXmlA
 =Rzrv
 -----END PGP SIGNATURE-----

Merge tag 'ib-mfd-regulator-rtc-v4.5' into rtc-next

Immutable branch between MFD, Regulator and RTC for the v4.5 merge window
2016-01-11 20:19:40 +01:00
Linus Torvalds
afd2ff9b7e Linux 4.4 2016-01-10 15:01:32 -08:00
Linus Torvalds
eac6f76ac7 SCSI fixes on 20160109
Single fix for machines with pages > 4k (PPC mostly).  There's a bug in our
 optimal transfer size code where we don't account for pages > 4k and can set
 the transfer size to be less than the page size causing nasty failures.
 
 Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQEcBAABAgAGBQJWkUiHAAoJEDeqqVYsXL0MArAH/2XWKJGI9tr0AQQ79WGD/kjV
 KZsUjKP9sshjxXBB8jK+TFvO/Z2BE92XzXtIswgdc6OdeANyhE+LhdbNpuooX2gv
 lW28RAbSVLrwJzyr7B2VGAiCOR9opGu2opOJnQMo05pSAFqJxNG4l1Ap+4pOX9/1
 ffTwidgk6bWs5zKlDwbETHVv/X50U90O5MyJBvf9KC7YvFhD41OIz7QEqiHgs1qW
 T6J80ZH4ZhWN+pRMHlybJ7RwP7TVjUSkDRLWRSX8IWjisbDqY86JVVt/BUA3lbhL
 sLDc/mku3ZPsRAUJL544ydAPWA2DtJ9PjPkYuMgPQOCyUfAKq5OTf6hG0Mghm34=
 =n00Y
 -----END PGP SIGNATURE-----

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fix from James Bottomley:
 "A single fix for machines with pages > 4k (PPC mostly).

  There's a bug in our optimal transfer size code where we don't account
  for pages > 4k and can set the transfer size to be less than the page
  size causing nasty failures"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  sd: Reject optimal transfer length smaller than page size
2016-01-09 14:53:48 -08:00
Linus Torvalds
c0cb139345 PCI updates for v4.4:
TI DRA7xx host bridge driver
     Mark driver as broken (Richard Cochran)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWkSPdAAoJEFmIoMA60/r80kQP/jPgr13qJ0bt+DE8WMZ98zRu
 BKpgL2MMQ2PzHjpHvrce1y2WceSdnPvloB5fElpi0PtYRzjmhZ607tgBpUjUEm5U
 u/jmFa28PlzzGMu8zQuV6Ge4zFp8PdcNGxZqRNpxZl4HLltxYgd7LnM9wgmSAUo7
 VwZlO5QIjHUPQ2oFC1o7F7pRhme1RpfUDwXaoHAER1E44pHBRksjY/xRlP/Nknh5
 7QOcb62e6N/ngR6Vb01evNVSdtH1+HQQlPaxPALw3sItaRsqqB9rLfXecw5Xu1NN
 h2DiRTcG/2X5bA8yxYZtmkFyvkFQFHjoxgvD2RHf7jb9TX0qyryFJceAKyyAUmFT
 A4z3XSmd54tXjetFkSzYsUbb0Egp1atBLT1Uw8d7UH4djebnwh3hTqPNFpRZBDeA
 AZRIkhTeupRjJGgtYsVghsiOQeS0yg4OboDVBPJljELOcsYN/nuoNvreXCp8qk4H
 pHyq9AQ3XVu3OS94SvDNmTdssUNARPL020/K8FDOkbOnD9EDK/J/PdiEGCZtNea4
 nu8qVo1PaROd5HBxQ2zB6PDiAIXAEfuqmFZPRXd5xa/DHxSfkHRJMmdE1TUVeFHn
 rB+8Fz/PqdkA4wIM3STWtVZOCjYnn6WkeWYS95jX9PmVc1Pa8ByNYkrYc5mxGtar
 uzqdDmZqYJAzRKkIadMR
 =srOL
 -----END PGP SIGNATURE-----

Merge tag 'pci-v4.4-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fixlet from Bjorn Helgaas:
 "This marks the TI DRA7xx host bridge driver as broken.  Apparently it
  has never worked without some additional out-of-tree code, so I'm
  going to mark it broken now and remove it completely next cycle unless
  it's fixed"

* tag 'pci-v4.4-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: dra7xx: Mark driver as broken
2016-01-09 14:44:44 -08:00
Michal Hocko
751e5f5c75 vmstat: allocate vmstat_wq before it is used
kernel test robot has reported the following crash:

  BUG: unable to handle kernel NULL pointer dereference at 00000100
  IP: [<c1074df6>] __queue_work+0x26/0x390
  *pdpt = 0000000000000000 *pde = f000ff53f000ff53 *pde = f000ff53f000ff53
  Oops: 0000 [#1] PREEMPT PREEMPT SMP SMP
  CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 4.4.0-rc4-00139-g373ccbe #1
  Workqueue: events vmstat_shepherd
  task: cb684600 ti: cb7ba000 task.ti: cb7ba000
  EIP: 0060:[<c1074df6>] EFLAGS: 00010046 CPU: 0
  EIP is at __queue_work+0x26/0x390
  EAX: 00000046 EBX: cbb37800 ECX: cbb37800 EDX: 00000000
  ESI: 00000000 EDI: 00000000 EBP: cb7bbe68 ESP: cb7bbe38
   DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
  CR0: 8005003b CR2: 00000100 CR3: 01fd5000 CR4: 000006b0
  Stack:
  Call Trace:
    __queue_delayed_work+0xa1/0x160
    queue_delayed_work_on+0x36/0x60
    vmstat_shepherd+0xad/0xf0
    process_one_work+0x1aa/0x4c0
    worker_thread+0x41/0x440
    kthread+0xb0/0xd0
    ret_from_kernel_thread+0x21/0x40

The reason is that start_shepherd_timer schedules the shepherd work item
which uses vmstat_wq (vmstat_shepherd) before setup_vmstat allocates
that workqueue so if the further initialization takes more than HZ we
might end up scheduling on a NULL vmstat_wq.  This is really unlikely
but not impossible.

Fixes: 373ccbe592 ("mm, vmstat: allow WQ concurrency to discover memory reclaim doesn't make any progress")
Reported-by: kernel test robot <ying.huang@linux.intel.com>
Signed-off-by: Michal Hocko <mhocko@suse.com>
Tested-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: stable@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-01-08 23:47:54 -08:00
Linus Torvalds
44d8a7d5c1 ARM: SoC fixes for 4.4-rc
This is the final small set of ARM SoC bug fixes for linux-4.4,
 almost all regressions:
 
 OMAP:		data corruption on the Nokia N900 flash
 Allwinner:	Two defconfig change to get USB working again
 ARM Versatile:	Interrupt numbers gone bad after an older bug fix
 Nomadik:	Crashes from incorrect L2 cache settings
 VIA vt8500:	SD/MMC support on WM8650 never worked
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIVAwUAVpA/vGCrR//JCVInAQK1NQ//fk4EYJj6JMwaB/I2hGtpUpartVtXj9tj
 916+NazORGc/UBP9vG/bLWnZrKzZQdeLd2HwDT9eyHtZ+Qq8bm+No312l10EATkS
 EAZKy4oy0HH5BD8yE5xM+CQn9fxh8GcmGJ/hKacpJnY2e0aaGgp9iHiPWH8kRmO4
 kBbUWsbfGjxzfM+a/9XGrzcTWZLSOu6VGtxvdp2rGy+Un8AWVc6FQz48xsFXWivB
 5JHp0qTnyUebSNbsxq05BDorybDuNSho5d3r94H85WwfbdybCxuFYedTZ1r3vCh9
 rWDI8R2vb3uotzYYjigRwyYqggUz6TewWqwnyeyGsMHOCEU/q/2n2ASLhdxKl2x8
 UZ+kKDhRiraaxnsNh/apVy4yvs7KmsUM6DgxzvXW3uyrrLrjJyGHKY5doHt5Z5mJ
 ErhOW024skA8GNiWObmNiKzUdKEbO4e7ReFgwbLbA8W6ACVVMNdL4udsmkb+nj25
 +VFWOg5WVG5WJFaEoSOGze7J0+SSwu7wP0HRPmWFotslExh5HsrvkSw429sDDB0R
 4OwT0Ru0vDZvGrHD+Bu6mFJO1nL2kWKVsolyben1sA+OIbm7eoHcennRUFf2sog0
 yWD03DT9iz//bmWPHVntcdRTTaXYvaChPWzHxlbBxw2DCfRkzy4Tx/Ic44s2Kjuq
 PgQjTmNlnQ8=
 =Z1E0
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:
 "This is the final small set of ARM SoC bug fixes for linux-4.4, almost
  all regressions:

  OMAP:
   - data corruption on the Nokia N900 flash

  Allwinner:
   - Two defconfig change to get USB working again

  ARM Versatile:
   - Interrupt numbers gone bad after an older bug fix

  Nomadik:
   - Crashes from incorrect L2 cache settings

  VIA vt8500:
   - SD/MMC support on WM8650 never worked"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  dts: vt8500: Add SDHC node to DTS file for WM8650
  ARM: Fix broken USB support in multi_v7_defconfig for sunxi devices
  ARM: versatile: fix MMC/SD interrupt assignment
  ARM: nomadik: set latencies to 8 cycles
  ARM: OMAP2+: Fix onenand rate detection to avoid filesystem corruption
  ARM: Fix broken USB support in sunxi_defconfig
2016-01-08 16:11:05 -08:00
Linus Torvalds
516c50cde6 A simple fix. I'm sending it before the merge window, because it refines
a patch found in your master branch but not yet in the kvm/next branch
 that is destined for 4.5.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQEcBAABAgAGBQJWj+yRAAoJEL/70l94x66DulYH/0OGP+yIHDDFlBqtPRm6q0pr
 r8pSVRPPd4GY2SOJDBsBvMmWphFSYKIoCTyMbFnikADHM2yh/pycwLU/uzCM5xQl
 uABMsCUntwbGaKq+A4bOvsNO49ueRCkML4ToVuKNTeuEKRYfdnlj3XcAMMgsUfEF
 QGz8W2cm9xPn69df91cfBuFLLFeQVv2XsjA5WpqzzvWy5HEs1F07aVh57TI4j8OF
 eFdn3Lkes9Ync70KjEy2QKe2Su0EWjderE0oqAORKomwZFVCYv/Vg1wERJYsugg5
 UyYCY2j1tKlycKYDnO47L1xoS9JgMHY05OsH08Sn/EXBjRjnEVwTyco5pGPmuNA=
 =5Lst
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM fix from Paolo Bonzini:
 "A simple fix.  I'm sending it before the merge window, because it
  refines a patch found in your master branch but not yet in the
  kvm/next branch that is destined for 4.5"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  kvm: x86: only channel 0 of the i8254 is linked to the HPET
2016-01-08 15:58:14 -08:00
Linus Torvalds
496b0b57c0 ACPI fix for final v4.4
Just one obvious fix that adds a missing function argument in
 ACPI code introduced recently (Kees Cook).
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJWkD8gAAoJEILEb/54YlRxOC4P/RDQxQkTzQPskyqHayzamCSQ
 cEqKYOL199Do42OD0mlJm9gc2Ax0tLvSEK/6VRz4WB+xqrlUz8Lcnqrcjld632jx
 a+xxqXcgIYTV03ujhNs4rRiWBedH9alwKvy4SoukQkL6eeXsE7llk1hZNjoqA3rh
 VsVsPSxQNLOAkJJzaHpBrGE3weCdXAmUb7aaFe1mjj1eGrPP+MjOYRSKWoyRn4bA
 RWL84wUmaM5X/NowCuFJZHEXGyiYm3EBFu4oqfKMRJDE6saJ0DLIPfIuaEX6srox
 gSsOB0tCHhrVR4vhfFD2x4P3rMEwt39IcW/5dAj76zYH2yyYiCpC4SmdYIJTkI+a
 /8y+a9/4CyKfOGhZ+lfJQOo0HbMHOGkF1VitNHGmiGnefTKDravFXIVqFqWBvgm3
 oT1tPtM4fmgy787WBVMP+P7NQ9yh4/YQ5oB+3Mi5AS13mT1PCTKe32q9LiuMUAtE
 QmcK0yvDAUM9LwNDYffUFVoUxkCAUft7CYIso46X5qjDOp94fB52K/JxM4aMX90b
 kjtKWLWVFGzBCehj7cb4RX6Jqaq/5cR8f3pLf+wyC9tli2DtThX2aiFXjA3PcY8z
 TZwZ8L31LL6apbIW5wZTMN9f6cKiM4YT44KYxWFdgf/S8ZqRx9EtjqrAKcJxgziF
 WM+yB+XEb7Q21WcTESV/
 =XAk2
 -----END PGP SIGNATURE-----

Merge tag 'pm+acpi-4.4-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fix from Rafael Wysocki:
 "Just one obvious fix that adds a missing function argument in ACPI
  code introduced recently (Kees Cook)"

* tag 'pm+acpi-4.4-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / property: avoid leaking format string into kobject name
2016-01-08 15:50:59 -08:00
Linus Torvalds
650e5455d8 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar:
 "A handful of x86 fixes:

   - a syscall ABI fix, fixing an Android breakage
   - a Xen PV guest fix relating to the RTC device, causing a
     non-working console
   - a Xen guest syscall stack frame fix
   - an MCE hotplug CPU crash fix"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/numachip: Fix NumaConnect2 MMCFG PCI access
  x86/entry: Restore traditional SYSENTER calling convention
  x86/entry: Fix some comments
  x86/paravirt: Prevent rtc_cmos platform device init on PV guests
  x86/xen: Avoid fast syscall path for Xen PV guests
  x86/mce: Ensure offline CPUs don't participate in rendezvous process
2016-01-08 15:21:48 -08:00
Linus Torvalds
de03017958 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Ingo Molnar:
 "Misc scheduler fixes"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/core: Reset task's lockless wake-queues on fork()
  sched/core: Fix unserialized r-m-w scribbling stuff
  sched/core: Check tgid in is_global_init()
  sched/fair: Fix multiplication overflow on 32-bit systems
2016-01-08 13:57:13 -08:00
Linus Torvalds
3ab6d1ebd5 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar:
 "Two core subsystem fixes, plus a handful of tooling fixes"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Fix race in swevent hash
  perf: Fix race in perf_event_exec()
  perf list: Robustify event printing routine
  perf list: Add support for PERF_COUNT_SW_BPF_OUT
  perf hists browser: Fix segfault if use symbol filter in cmdline
  perf hists browser: Reset selection when refresh
  perf hists browser: Add NULL pointer check to prevent crash
  perf buildid-list: Fix return value of perf buildid-list -k
  perf buildid-list: Show running kernel build id fix
2016-01-08 13:52:59 -08:00
Linus Torvalds
ea83ae2fb3 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fix from Ingo Molnar:
 "Fixes a core IRQ subsystem deadlock"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq: Prevent chip buslock deadlock
2016-01-08 13:46:59 -08:00
Linus Torvalds
a6a7358e49 Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block revert from Jens Axboe:
 "The previous pull request had a split fix for NVMe, however there are
  corner cases where that ends up blowing up.

  So let's revert it for 4.4.  The regression isn't introduced in this
  cycle, and it's "just" a performance regression, not a
  stability/integrity issue"

* 'for-linus' of git://git.kernel.dk/linux-block:
  Revert "block: Split bios on chunk boundaries"
2016-01-08 13:39:09 -08:00
Linus Torvalds
212c7f66ec dmaengine fixes for 4.4
Late fixes for 4.4 are three fixes for drivers which include a
 revert of mic-x100 fix which is causing regression, xgene fix for
 double IRQ and async_tx fix to use GFP_NOWAIT
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWj7XNAAoJEHwUBw8lI4NHOEEQAIj9YoQjkHkPo2PviIeiX3Zy
 HNAIM0GepYSZrJO+duKAzFxK4mEGC92gpyOiv6NJ91RdC2ijYc9gb6Z7ig/g4znq
 odqMGFIdBEqZAq1PhN81BtJqdkw4EmzffS/GaEol0MM85Hvm5r91GfOx86AKs0HW
 emOJL5XXG8/byNY7xihCl+55u9l1E5c7+K8QNj3++bgKK07KIor4qtxBNUqejQUj
 /eFdi8Z1SFOHHDvdYKGVRRm70uq6BqfYcsLfLcgd7uEDkvz0Zcy7SF11hY67z8QU
 ood0eyyuBhuZjxzZN+5No9UkRf2BKfjXUex/wr2AnuqF2xYcGYC76tFKeAUbOc6s
 YF+SdfDoQVys3o6EhYj6hj9s1viepu41tpnOB8ldBE2B/Gyn0iq/ipj05rsMKIRp
 ivefoSb7KG1O6aesJ/n7vUBY8VWiE3KBcRYoIotW5jNQ83Jb/e40ougpshzxeWYR
 08PekcG+CAUlnfaF8f0+c3xuo2Q23MMpf6e3XqlNxCGBpwIn8NEtLw1qcLdKI9zG
 x6zguGxEZDIoGYC0kjmP+PNAjrJmNVHutcJODgK73H4zNvY1O6Kg+dOBLrwkqXh5
 Um6RRDzOcEWsGMHg0akPHWaaAt7slCvtTXLMtzMysHR1mkihqAbzq6Zr0QoGjekz
 j20fC8o8bArX9cCDO71F
 =jYJY
 -----END PGP SIGNATURE-----

Merge tag 'dmaengine-fix-4.4' of git://git.infradead.org/users/vkoul/slave-dma

Pull dmaengine fixes from Vinod Koul:
 "Late fixes for 4.4 are three fixes for drivers which include a revert
  of mic-x100 fix which is causing regression, xgene fix for double IRQ
  and async_tx fix to use GFP_NOWAIT"

* tag 'dmaengine-fix-4.4' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine: xgene-dma: Fix double IRQ issue by setting IRQ_DISABLE_UNLAZY flag
  async_tx: use GFP_NOWAIT rather than GFP_IO
  dmaengine: Revert "dmaengine: mic_x100: add missing spin_unlock"
2016-01-08 12:23:00 -08:00
Linus Torvalds
436950a65d Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
Pull dmi fix from Jean Delvare.

* 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  firmware: dmi_scan: Fix UUID endianness for SMBIOS >= 2.6
2016-01-08 12:18:45 -08:00
Linus Torvalds
4054f64c93 sound fixes for 4.4
A slightly higher volume than a new year's wish, but not too
 worrisome: a large LOC is only for HD-audio device-specific quirks,
 so fairly safe to apply.  The rest ASoC fixes are all trivial and
 small; a simple replacement of mutex call with nested lock version,
 a few Arizona and Realtek codec fixes, and a regression fix for
 Skylake firmware handling.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJWjmpaAAoJEGwxgFQ9KSmkypcP/AsZgxRp9kU7xBKcymZR6ldi
 OtXse9Irie7/Da23v98VfOmC0SF1RYDnEO+yDi3ud31ZGyqcwCMBrcO1ZrvuQw1w
 3LDsUdVsOJyD2bK/u9pDy+HfZQ62I+IVN/lwQ3eA4fimxae5M+6Ptt4q6tAiOVul
 mk6sf+aVIIpGRJDV0icVj+S+N1o05PhukEPCrzi8NgLjN6QYwOeaIEQa6/ymZjfe
 mcYG7SQsyyxGtdDpGEebZtQJVxmYY93qnLDykikLsNquCJKRX4GGWZqZn2dVF73M
 afZWt921+CvPdLIabQYgjPpqMniFR/XbGXuXYhLtADbb806SFmy68Dvfs29u9qDH
 ZwmsMcvwx/CjeyuZGicbjlApND9pA5RHGkL4qE2hCxkrrBrfWPfVKsa5DKUMthiy
 vIUTBQohgMQE+H1N6S1vd+4itnUdMaxhF4+yV1oIzHtAo1m+bHR6Mzein3O9lS9o
 7ch028nrhDZZZNOMl3vsbCS8R9KAXKSpojwgCZ94QwY8xSelXXiLQY05ggA1U5Bo
 w7Uqnn3AnvGieORv3ZZ0TKEQSGO6rxMUB+L8PsrJEiC8F3tkSr9yYVQzXxo69Qhs
 jQXAREwdwarugVj+ER8rIyFfJ9rd1+8yZT3oRr+WhmaXvuQ6CoGrQ/P0+VsMUSxC
 RJKBEeGjaFRhc2NedGO7
 =XSAp
 -----END PGP SIGNATURE-----

Merge tag 'sound-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A slightly higher volume than a new year's wish, but not too
  worrisome: a large LOC is only for HD-audio device-specific quirks, so
  fairly safe to apply.  The rest ASoC fixes are all trivial and small;
  a simple replacement of mutex call with nested lock version, a few
  Arizona and Realtek codec fixes, and a regression fix for Skylake
  firmware handling"

* tag 'sound-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: Intel: Skylake: Fix the memory leak
  ASoC: Intel: Skylake: Revert previous broken fix memory leak fix
  ASoC: Use nested lock for snd_soc_dapm_mutex_lock
  ASoC: rt5645: add sys clk detection
  ALSA: hda - Add keycode map for alc input device
  ALSA: hda - Add mic mute hotkey quirk for Lenovo ThinkCentre AIO
  ASoC: arizona: Fix bclk for sample rates that are multiple of 4kHz
2016-01-08 11:52:18 -08:00
Arnd Bergmann
841bcd2e50 Last minute urgent pull request to prevent file system corruption
on Nokia N900.
 
 Looks like we have a GPMC bus timing bug that has gone unnoticed
 because of bootloader configured registers until few days ago. We
 are not detecting the onenand clock rate properly unless we have
 CONFIG_OMAP_GPMC_DEBUG set and this causes onenand corruption
 that can be easily be reproduced.
 
 There seems to be also an additional bug still lurking around for
 onenand corruption. But that is still being investigated and
 it does not seem to be GPMC timings related.
 
 Meanwhile, it would be good to get this fix into v4.4 to prevent
 wrong timings from corrupting onenand.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWj+LZAAoJEBvUPslcq6VzRwMQAN9cxwbGblHuEnt22GJEQNUP
 XRgAB6j00zKugAYg5QCXihZf+SgQuvI8VeB+BeI0K0vL0zNnLlF/jiKYg1fwzDvr
 jcKx8dKbcfI7idWtNP2DL1nWe9dDjT+hBye3xH/DavXFcvFiuMLrBtbZ2WO1zPn7
 MYADo5jh+X3/Cl+9okS0q7ZblaZ+txs+8dl87bIkup96A2hYw/Zp+h4H7PcnJbFn
 4YyOVMsHwTUeCXCbcd5aDZvENN4uhXYFZXo1glrB4GePz7F7ST+vgUZkhuSqI4Z0
 vwRpYPjLtZfsvW9SWodMLt7r7qIKYbEX7ATtjYIV2QLa8QL14KUZLFk35VgXGCA5
 WciP3UeNQrzQPUSnDfthYDVDWV50EbrN0Tw3/f+xo4RDGYfMZ5A26jZsJavHaEHj
 stB0EGy72RkqUJmCqquP3X2k1W2JsFbhI/WKyHxZspOuvadFzbfW5Rz8I1ad6+68
 b485s5qPLYpufZj5+03wAnuCJBVz8A6x6qAZqi2sIaHbqa8H0b0/u85Svrfe0y45
 PxxwLbjipWy2/FCTicJL3HiboSGdJoXXO6ru65oEqG7J6BFGk/607QCSpEB3FWbW
 jx/4WbdMcsoPgqlbFoCG5TSPD7esMdhBNlZirZiAvRoPeSdmQVOy230dLn7Cek7z
 3ws+XPHWsOSgATpwvE//
 =QtBl
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.4/onenand-corruption' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Pull "urgent onenand file system corruption fix for n900" from Tony Lindgren:

Last minute urgent pull request to prevent file system corruption
on Nokia N900.

Looks like we have a GPMC bus timing bug that has gone unnoticed
because of bootloader configured registers until few days ago. We
are not detecting the onenand clock rate properly unless we have
CONFIG_OMAP_GPMC_DEBUG set and this causes onenand corruption
that can be easily be reproduced.

There seems to be also an additional bug still lurking around for
onenand corruption. But that is still being investigated and
it does not seem to be GPMC timings related.

Meanwhile, it would be good to get this fix into v4.4 to prevent
wrong timings from corrupting onenand.

* tag 'omap-for-v4.4/onenand-corruption' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Fix onenand rate detection to avoid filesystem corruption
2016-01-08 17:46:45 +01:00
Jens Axboe
6126eb2483 Revert "block: Split bios on chunk boundaries"
This reverts commit d380561113.

If we end up splitting on the first segment, we don't adjust
the sector count. That results in hitting a BUG() with attempting
to split 0 sectors.

As this is just a performance issue and not a regression since
4.3 release, let's just rever this change. That gives us more
time to test a real fix for 4.5, which would be marked for
stable anyway.
2016-01-08 09:00:29 -07:00
Richard Cochran
5c3b99d057 PCI: dra7xx: Mark driver as broken
Mark the dra7xx PCI host driver as broken.  This driver was first merged in
v3.17 and has never worked.  Although the driver compiles just fine, it is
missing an essential device reset.  If the driver is included, the kernel
locks up hard shortly after booting, before any console output appears.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2016-01-08 09:58:31 -06:00
Andrea Arcangeli
ff4319dc7c firmware: dmi_scan: Fix UUID endianness for SMBIOS >= 2.6
The dmi_ver wasn't updated correctly before the dmi_decode method run
to save the uuid.

That resulted in "dmidecode -s system-uuid" and
/sys/class/dmi/id/product_uuid disagreeing. The latter was buggy and
this fixes it.

Reported-by: Federico Simoncelli <fsimonce@redhat.com>
Fixes: 9f9c9cbb60 ("drivers/firmware/dmi_scan.c: fetch dmi version from SMBIOS if it exists")
Fixes: 79bae42d51 ("dmi_scan: refactor dmi_scan_machine(), {smbios,dmi}_present()")
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
2016-01-08 09:00:54 +01:00
Kees Cook
9db22d928c ACPI / property: avoid leaking format string into kobject name
The dn->name is expected to be used as a literal, so add the missing
"%s".

Fixes: 263b4c1a64 (ACPI / property: Expose data-only subnodes via sysfs)
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-01-08 01:01:41 +01:00
Linus Torvalds
02006f7a7a Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm nouveau fix from Dave Airlie:
 "Still not back to work, but I decided to forward this fix"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/nouveau/gr/nv40: fix oops in interrupt handler
2016-01-07 13:06:35 -08:00
Linus Torvalds
1d8b0e7908 IOMMU Fixes for Linux v4.4-rc8
The patches include fixes for:
 
 	* Two build issues, one in the ipmmu-vmsa driver and one for the
 	  new generic dma-api implemention used on arm64
 
 	* A performance fix for said dma-api implemention
 
 	* An issue caused by a wrong offset in map_sg in the same code
 	  as above
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJWjrtUAAoJECvwRC2XARrjBs8P/i+KWbiFqDDnlpk492OAib75
 IlCWw9IydVbn0foshZg5isZyx6UP2t4PoNeK2JLrN48BKw6fs3AFzPMXF7ur6/o5
 UP/S/RsdC8zcy12GvrCONQl2SYqnENvMjZZwtjmobYYrRISJ2RYHNND5VjTwofqh
 SitxPB9/g4MlD8dwFKgkgkA4jEwN8klbkm7qGBq3zeuDY7Gk8SVep+rRTnlXnk50
 6vJVPVvfYD+HIdvNwIQp+Y6iFzLE2aNP090Rq33xHjBNuIgvkpEXE7XPjsKvdC5I
 LbWskbwiUPoviX3ti283Zoijv45My6i9lzn2n2ESOp6JpZb4KytRoWbLhtJ3TvjO
 vTxBqbhj9iok770xecaNpIg9Of5evVRsOpGLwWxpzH/bwzlqtIGvRi+pzFC1atB9
 ye9djC6uA7mUVgHG5XZXH1dO3sHk4AxqnDvzv9N6jZC1Cvp+7NVBRdr7QtVRojnY
 e7cc+DwoZr48bad4WtbiIjRxYRXue6+QjlD02WfqHpiHa3R9mguCyVeFxQzp1JRL
 6QbCzuqqhdR0ie7dDAn30xQXsBzfiHyShlWn8B3z7JshV3vh3BPNVVOFVQMpMt56
 Wlgmry68r0W/HR1R6UuU+EoaBD7NSTBTZvL8illod/esMz6LMnGgPphm8dBvlGrb
 2WtGtIuqA5RvOJGI4aVC
 =AFI4
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fixes-v4.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull IOMMU fixes from Joerg Roedel:

 - Two build issues, one in the ipmmu-vmsa driver and one for the new
   generic dma-api implemention used on arm64

 - A performance fix for said dma-api implemention

 - An issue caused by a wrong offset in map_sg in the same code as above

* tag 'iommu-fixes-v4.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/dma: Use correct offset in map_sg
  iommu/ipmmu-vmsa: Don't truncate ttbr if LPAE is not enabled
  iommu/dma: Avoid unlikely high-order allocations
  iommu/dma: Add some missing #includes
2016-01-07 12:56:23 -08:00
Linus Torvalds
2626820d83 PeiyangX Qiu reported that if a module fails to load between calling
ftrace_module_init() and do_init_module() that the allocations made
 in ftrace_module_init() will not be freed, resulting in a memory leak.
 
 The solution is to call ftrace_release_mod() on the failing module in
 the fail path befor do_init_module() is called. This will remove any
 allocations made for that module, and nothing if ftrace_module_init()
 wasn't called yet for that module.
 
 Note, once do_init_module() is called, the MODULE_GOING notifiers are
 called for the failed module, which calls into the ftrace code to do the
 proper clean up (basically calling ftrace_release_mod()).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWjqzAAAoJEKKk/i67LK/8WgIH/3OTlOqrr527nodzj5glLgyn
 GJRyQcI2VNq1m63KjWRO1QtH0OPIB/kFEyBVruNb3FEU3jQHgUNOk5whDkiOdcbp
 yXBXkTkhyNOSAUxm95drUkEQiwDScfU6FjUy2dQjdyi4+86sYKRP+FIdL6B1Q5vk
 M2w2JRVe2HU5RnONf63AUPcRRA+PbUqGk3S9i+HwOfCMqVEEoayRVmxibTnlEsba
 YCf6d1ppzimd4c2FcyCnoyFGkfDUZWDQw2RFdWaEtOTKTzFz25hMebw4omwMQ9pt
 gdbve/sY2e9BI4yHIew+tmDDWqfT8ejpXhn/eOzWd074HD7hzxU7xfd2UXZRD7w=
 =x94j
 -----END PGP SIGNATURE-----

Merge tag 'trace-v4.4-rc4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull ftrace fix from Steven Rostedt:
 "PeiyangX Qiu reported that if a module fails to load between calling
  ftrace_module_init() and do_init_module() that the allocations made in
  ftrace_module_init() will not be freed, resulting in a memory leak.

  The solution is to call ftrace_release_mod() on the failing module in
  the fail path befor do_init_module() is called.  This will remove any
  allocations made for that module, and nothing if ftrace_module_init()
  wasn't called yet for that module.

  Note, once do_init_module() is called, the MODULE_GOING notifiers are
  called for the failed module, which calls into the ftrace code to do
  the proper clean up (basically calling ftrace_release_mod())"

* tag 'trace-v4.4-rc4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  ftrace/module: Call clean up function when module init fails early
2016-01-07 12:42:22 -08:00
Steven Rostedt (Red Hat)
049fb9bd41 ftrace/module: Call clean up function when module init fails early
If the module init code fails after calling ftrace_module_init() and before
calling do_init_module(), we can suffer from a memory leak. This is because
ftrace_module_init() allocates pages to store the locations that ftrace
hooks are placed in the module text. If do_init_module() fails, it still
calls the MODULE_GOING notifiers which will tell ftrace to do a clean up of
the pages it allocated for the module. But if load_module() fails before
then, the pages allocated by ftrace_module_init() will never be freed.

Call ftrace_release_mod() on the module if load_module() fails before
getting to do_init_module().

Link: http://lkml.kernel.org/r/567CEA31.1070507@intel.com

Reported-by: "Qiu, PeiyangX" <peiyangx.qiu@intel.com>
Fixes: a949ae560a "ftrace/module: Hardcode ftrace_module_init() call into load_module()"
Cc: stable@vger.kernel.org # v2.6.38+
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-01-07 12:17:39 -05:00
Roman Volkov
0f090bf14e dts: vt8500: Add SDHC node to DTS file for WM8650
Since WM8650 has the same 'WMT' SDHC controller as WM8505, and the driver
is already in the kernel, this node enables the controller support for
WM8650

Signed-off-by: Roman Volkov <rvolkov@v1ros.org>
Reviewed-by: Alexey Charkov <alchark@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2016-01-07 16:02:53 +01:00
Timo Sigurdsson
5b1a618118 ARM: Fix broken USB support in multi_v7_defconfig for sunxi devices
Commit 69fb4dcada ("power: Add an axp20x-usb-power driver") introduced a
new driver for the USB power supply used on various Allwinner based SBCs.
However, the driver was not added to multi_v7_defconfig which breaks USB
support for some boards (e.g. LeMaker BananaPi) as the kernel will now
turn off the USB power supply during boot by default if the driver isn't
present. (This was not the case in linux 4.3 or lower where the USB power
was always left on.)

Hence, add the driver to multi_v7_defconfig in order to keep USB support
working on those boards that require it.

Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de>
Tested-by: Timo Sigurdsson <public_timo.s@silentcreek.de>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2016-01-07 16:02:19 +01:00
Paolo Bonzini
e5e57e7a03 kvm: x86: only channel 0 of the i8254 is linked to the HPET
While setting the KVM PIT counters in 'kvm_pit_load_count', if
'hpet_legacy_start' is set, the function disables the timer on
channel[0], instead of the respective index 'channel'. This is
because channels 1-3 are not linked to the HPET.  Fix the caller
to only activate the special HPET processing for channel 0.

Reported-by: P J P <pjp@fedoraproject.org>
Fixes: 0185604c2d
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-01-07 13:50:38 +01:00
Robin Murphy
164afb1d85 iommu/dma: Use correct offset in map_sg
When mapping a non-page-aligned scatterlist entry, we copy the original
offset to the output DMA address before aligning it to hand off to
iommu_map_sg(), then later adding the IOVA page address portion to get
the final mapped address. However, when the IOVA page size is smaller
than the CPU page size, it is the offset within the IOVA page we want,
not that within the CPU page, which can easily be larger than an IOVA
page and thus result in an incorrect final address.

Fix the bug by taking only the IOVA-aligned part of the offset as the
basis of the DMA address, not the whole thing.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2016-01-07 13:36:41 +01:00
Dave Airlie
3bea6a4c78 Merge branch 'linux-4.4' of git://github.com/skeggsb/linux into drm-fixes
single nv40 oops fix.

* 'linux-4.4' of git://github.com/skeggsb/linux:
  drm/nouveau/gr/nv40: fix oops in interrupt handler
2016-01-07 17:18:45 +10:00