1
0
Fork 0
Commit Graph

643921 Commits (steinar/wifi_calib_4_9_kernel)

Author SHA1 Message Date
Steinar Bakkemo 1e056eb1d1 Add support for BCM43455 and turn off wifi power cycling (ref original wifi-calibration kernel) 2018-08-31 14:15:10 +02:00
Steinar Bakkemo c73b4b9a31 Add zero-gravitas-dev_defconfig containing memtest and other test configuration settings as required
The linux-rmxxx recipes in yocto contains machine_feature selecting the appropriate kernel config to build with
2018-08-24 16:54:27 +02:00
Steinar Bakkemo c3c33c6a23 Turn off memory tests 2018-08-17 13:34:37 +02:00
Lars Ivar Miljeteig cf2879ab1d brcmfmac: Add support for 43455 2018-06-26 15:48:50 +02:00
Lars Ivar Miljeteig fc31d1ecfd config: Add memtest and imx6sll 2018-06-20 16:23:30 +02:00
Lars Ivar Miljeteig b74ba7d9f6 bq27441: New kernel, stricter rules for memory 2018-06-20 13:03:41 +02:00
Lars Ivar Miljeteig 63a0829def bq27441: Driver in kernel
Used to be an out-of-tree module
2018-06-19 16:35:11 +02:00
Lars Ivar Miljeteig f99934dde5 brcmfmac: Update firmware 2018-06-19 13:16:41 +02:00
Lars Ivar Miljeteig 3b7f71f9ab brcmfmac: nvram config 2018-06-19 12:51:14 +02:00
Lars Ivar Miljeteig 393526558f brcmfmac: Device tree entry support 2018-06-04 16:06:19 +02:00
Lars Ivar Miljeteig 66653d70e4 dts: VCOM values 2018-06-01 20:15:41 +02:00
Martin T. H. Sandsmark 5b59fd064d caamrng: bump up quality so it is used by default 2018-06-01 20:15:40 +02:00
Martin T. H. Sandsmark 368f855f3c pfuze100: sysfs file to disable SWBST regulator
add ugly hack because the factory needs to be able to disable the SWBST regulator to reset the charging circuit during tests
2018-06-01 20:15:40 +02:00
Martin T. H. Sandsmark bfe00d1c04 borrow the IBM rndis vid and pid until we get the code signing certificate and our own driver 2018-06-01 20:15:39 +02:00
Martin T. H. Sandsmark 9b18736438 fsl_otp: read CPU serial from OTP during init 2018-06-01 20:15:39 +02:00
Martin T. H. Sandsmark 9b037dbc9a pm-imx6: fix suspend of imx6sl with ddr3 2018-06-01 20:15:38 +02:00
Martin T. H. Sandsmark ce88a842db Touch firmware
touch: add updated firmware for touch controller
touch firmware: update firmware for touch controller to latest calibrated version
touch firmware: upgrade to vendor version 4
2018-06-01 20:15:38 +02:00
Martin T. H. Sandsmark 87340ba572 touch: Fix getting of GPIO in cyttsp5 from device tree 2018-06-01 20:15:38 +02:00
Martin T. H. Sandsmark 9bdd8f4c45 touch: Import cyttsp5 driver from Parade 2018-06-01 20:15:37 +02:00
Martin T. H. Sandsmark 416a27e421 epdc: epdc configuration for zero-gravitas
epdc: Turn on regulators unconditionally
  Add hack to EPDC driver to unconditionally turn on the regulators
  during initialization for Kaifa testing

epdc: Set pir display configuration
  First attempt at setting our display configuration, based on info sheet from E-Ink

epdc: Add waveform for our display
epdc: Move waveform to correct folder
epdc: Update EPDC driver to use correct pixels per SDCLK and data bus width
epdc: Update panel timing information based on NXP EPD calculator values
epdc: Update waveform after attempting to fix NXP's waveform converter
epdc: Bring up our panel by default
epdc: Update panel timing values based on independent calculations
epdc: Add 4bit waveform for ES103CS1
epdc: Add support for ES103CS1 display with 4bit waveforms
epdc: Add patch from NXP to use the correct mutex when panning display
epdc: Remove all traces of the 5bit waveforms
epdc: Remove EPDC powerup hack
epdc: update parameters for 85hz
epdc: undo some custom unnecessary changes
epdc: don't do a normal grayscale update just for init
epdc: fix some printing of errors
epdc: use synchronous firmware loading so users know that the EPDC is inited and can do stuff
mxc_epdc_fb: restore powerdown delay after suspend
mxc_epdc_fb: fix inverted conditional leading to endless collisions
mxc_epdc_fb: epdc driver wants pixclock in hz, not ps
mxc_epdc_fb: add support for automatically getting updated temperature from pmic
2018-06-01 20:15:37 +02:00
Lars Ivar Miljeteig 9172ab93ce Busfreq: Disable busfreq 2018-06-01 20:15:36 +02:00
Martin T. H. Sandsmark 2ab696117d max17135: Tweaks
max17135: Add some extra output for Kaifa
max17135: Make the MAX17135 driver check the PWRGOOD pin
max17135: Set the default pass number for MAX17135 to 2
max17135: specify chip version in devicetree
max17135: print ret when failing to write to device
max17135: use sysfs for programming vcom
max17135: add thermistor regulator to read temperature
max17135: get_voltage parameter
2018-06-01 20:15:36 +02:00
Martin T. H. Sandsmark 10f6492a8d max17135: Ensure that the MAX17135 MFD selects MFD_CORE 2018-06-01 20:15:35 +02:00
Lars Ivar Miljeteig 60e4d35952 Devicetree: Quick fixes 2018-06-01 20:15:35 +02:00
Lars Ivar Miljeteig e7beaa2d8d mmc: Try to bring up SD card
mmc

ENGR00285671 mmc: setup emmc boot partition configure methods

- Configure boot partition
Expose the interfaces that used to enable the configurations
of the boot mode of the eMMC cards.
usage how-to and examples:
Enable the boot partition 1 boot enabled.
"echo 8 > /sys/devices/soc0/soc.1/2100000.aips-bus/
219c000.usdhc/mmc_host/mmc2/mmc2\:0001/boot_config"

In order to make sure that the re-read the ext-csd of card
can be completed successfully, add the method to wait for
the finish of the busy state.

- setup boot_info message output
Output bit means of important esd_csd register

Read esd_csd info each time when cat boot_info
becasue user may change config affect esd_csd
value.

- Boot partition access howto:
About the details, please refer to the guidance of
Documentation/mmc/mmc-dev-parts.txt

To enable write access to /dev/mmcblkXbootY, disable the forced
read-only access with:
echo 0 > /sys/block/mmcblkXbootY/force_ro

To re-enable read-only access:
echo 1 > /sys/block/mmcblkXbootY/force_ro

NOTE:
- The definitions of the EXT_CSD_PART_CONFIG and EXT_CSD_BOOT_BUS_WIDTH
+------------------------------------------------------------+
| Bit7 | Bit6     | Bit5 Bit4 Bit3        | Bit2 Bit1 Bit0   |
|------|----------|-----------------------|------------------|
| X    | BOOT_ACK | BOOT_PARTITION_ENABLE | PARTITION_ACCESS |
+------------------------------------------------------------+
Bit7: Reserved
Bit6: always set to vaule '1' when boot_part is enabled
Bit[5:3]:
0x0 : Device not boot enabled (default)
0x1 : Boot partition 1 enabled for boot
0x2 : Boot partition 2 enabled for boot
0x7 : User area enabled for boot
Bit[2:0]:
0x0 : No access to boot partition (default)
0x1 : R/W boot partition 1
0x2 : R/W boot partition 2

+--------------------------------------------------------------------+
| Bit7 Bit6 Bit5 | Bit4 Bit3 | Bit2                 | Bit1 Bit0      |
|----------------|----------------------------------|----------------|
| X              | BOOT_MODE | RESET_BOOT_BUS_WIDTH | BOOT_BUS_WIDTH |
+--------------------------------------------------------------------+
Bit [4:3] : BOOT_MODE (non-volatile)
0x0 : Use single data rate + backward compatible timings in boot
operation (default)
0x1 : Use single data rate + high speed timings in boot operation mode
0x2 : Use dual data rate in boot operation
0x3 : Reserved
Bit [2]: RESET_BOOT_BUS_WIDTH (non-volatile)
0x0 : Reset bus width to x1, single data rate and backward compatible
timings after boot operation (default)
0x1 : Retain boot bus width and boot mode after boot operation
Bit[1:0] : BOOT_BUS_WIDTH (non-volatile)
0x0 : x1 (sdr) or x4 (ddr) bus width in boot operation mode (default)
0x1 : x4 (sdr/ddr) bus width in boot operation mode
0x2 : x8 (sdr/ddr) bus width in boot operation mode
0x3 : Reserved

- example of the boot_info:
boot_info:0x07;
  ALT_BOOT_MODE:1 - Supports alternate boot method
  DDR_BOOT_MODE:1 - Supports alternate dual data rate during boot
  HS_BOOTMODE:1 - Supports high speed timing during boot
boot_size:2048KB
  boot_partition:0x48;
  BOOT_ACK:1 - Boot acknowledge sent during boot operation
  BOOT_PARTITION-ENABLE: 1 - Boot partition 1 enabled
  PARTITION_ACCESS:0 - No access to boot partition
boot_bus:0x00
  BOOT_MODE:0 - Use single data rate + backward compatible timings
  in boot operation
  RESET_BOOT_BUS_WIDTH:0 - Reset bus width to x1, single data rate
  and backwardcompatible timings after boot operation
  BOOT_BUS_WIDTH:0 - x1 (sdr) or x4 (ddr) bus width in boot
  operation mode

Signed-off-by: Richard Zhu <r65037@freescale.com>

ENGR00323682 MMC: Fixed boot_config overwritten by switch partition

In MMC driver, two variables: boot_config and part_config  are used to
keep eCSD(179) PARTITION_CONFIG. The part_config is not updated when
set new boot_config, which causes the eCSD(179) is overwritten by
any following partition switching, so the new boot_config is lost.

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit e66d21ade29855299ce048c97830a4bb79373761)

Port NXP boot_options patch to new mmc API

Set stricter permissions for boot_config
2018-06-01 20:15:34 +02:00
Martin T. H. Sandsmark 4b17f12ebf wacom_i2c: the new wacom firmware reports tilt with 2 bytes 2018-05-29 15:23:36 +02:00
Martin T. H. Sandsmark b76e94e3d8 wacom_i2c: Remove some useless debug output from wacom_i2c driver 2018-05-29 15:23:34 +02:00
Martin T. H. Sandsmark ebb438d5e1 wacom_i2c: Add tilt and distance reporting to Wacom I2C 2018-05-29 15:23:33 +02:00
Martin T. H. Sandsmark 58fdf7e292 wacom_12c: Port wacom_i2c to device tree 2018-05-29 15:23:32 +02:00
Martin T. H. Sandsmark c19105143a defconfig
Add a default config based on imx6 default config
Update our default config
Update defconfig
Clean out unused stuff from defconfig
Re-add IMX serial to defconfig
Re-enable large files support
Enable PXPv2 in defconfig
Disable auto update mode in EPDC driver
Use correct poweroff driver
defconfig: switch to interactive cpu scheduler, enable cpu idle
defconfig: disable cyttsp debug output
defconfig: enable usb gadget support
defconfig: enable fsl_otp, remove some debug output
defconfig: Enable brcmfmac
defconfig: add reset controller for wifi for powering it up
defconfig: power management, support more USB devices, gpio charger support, CAAM support for RNG
defconfig: enable nbd for vfatbuse, enable reset by syscon, fuck around with spi
defconfig enable f2fs support
defconfig: Disable busfreq
defconfig: re-enable cpu frequency scaling
defconfig: use ethernet gadget by default
2018-05-29 15:23:05 +02:00
Martin T. H. Sandsmark e5eca72a57 Add our DTS to the Makefile 2018-05-29 15:22:43 +02:00
Martin T. H. Sandsmark 8097be0790 Initial device tree 2018-05-29 15:21:01 +02:00
Octavian Purdila 0e674a64b8 MLK-15083 watchdog: imx2_wdt: fallback to timeout reset if explicit reset fails
If explicit reset fails fallback using the watchdog timeout. We
already have set the timeout counter to 0, but we might need to ping
the watchdog to load the new timeout, if a previous watchdog timeout
value has already been set.

We also decrease the time we spend waiting, to give a chance to log
that the explicit reset failed and that we fallback to watchdog
timeout reset.

Signed-off-by: Octavian Purdila <octavian.purdila@nxp.com>
[fabio: Resolved conflict with 4.9.84]
Signed-off-by: Fabio Estevam <festevam@gmail.com>
2018-02-26 21:54:27 -03:00
Fabio Estevam 20ebb9fb81 This is the 4.9.84 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlqSio0ACgkQONu9yGCS
 aT7v/w/+OTmWpuavTV+sJz34t8UfnYtl7MnJhubkaCpaTryLXUDeWr5XGzjYRQTh
 2OhvqDqoFqrKeKsMSl9x5ZBzA4CUcl5b/Umr8bqMH2iLeVr159qHoqttJ7lMwhX4
 JR0avL4rZZlg/6Vbr8PjwNRn/6KF5UOQnTe4Yfpk89nDojeP5+tIZqhq7d6BFRis
 Bcsb3BZg4UuJZYlJXARoXyPb4kCSEpJ6TPRM5Z1OlqbBLSCecjyqhYzW32Yj3HhT
 FvV4pJLs/YBkD3GQTrWpNPmLIP/4anu+0geCviCV3SVC7UQJI46yzYLZFSaW1kg0
 ol7pNONRGFNxihk4jiKMi5ON3pOMKq3qfY9KDIjGa6R8OIiQLCmC09TFFdzUjCJE
 E9Q4av+KmUsCvrYtgpRTPjo/v2KGJRz8ZTuXdF9QjEIOdOomU4PMNNrXKx014goZ
 r7mlxK3qW9HToBp60AAinRvNRJyFr3QH9gXjLU8fZvTVJ45eQkIwIqm5Q40Nk/IL
 GrpCYkMcFouIYcpnYdurxYcaAeqwA/R4Df5WRHTaOzNXWZ5gsLRkS/muPVOL23cV
 kCmlZytacE6R4TDkXzrEVfnN+n3QJWybyrx8sQbhBkT7NiEuPcqU/iGZe3uWSPS8
 N2CVTW+keaPJijWeAPDqs+JEn6I/ARNq1gzw8tKjKWpEwyBa25g=
 =FVgu
 -----END PGP SIGNATURE-----

Merge tag 'v4.9.84' into 4.9-1.0.x-imx-stable-merge

This is the 4.9.84 stable release
2018-02-26 21:54:02 -03:00
Fabio Estevam 3c939d6f1d Revert "MLK-15083 watchdog: imx2_wdt: fallback to timeout reset if explicit reset fails"
This revert is only for fixing a conflict with the 4.9 stable tree merge.

Will be added after the 4.9.84 merge.

This reverts commit 378e9e0975.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2018-02-26 21:48:12 -03:00
Greg Kroah-Hartman 19c04ca5b2 Linux 4.9.84 2018-02-25 11:05:56 +01:00
Kamil Konieczny 266da9f8d0 crypto: s5p-sss - Fix kernel Oops in AES-ECB mode
commit c927b080c6 upstream.

In AES-ECB mode crypt is done with key only, so any use of IV
can cause kernel Oops. Use IV only in AES-CBC and AES-CTR.

Signed-off-by: Kamil Konieczny <k.konieczny@partner.samsung.com>
Reported-by: Anand Moon <linux.amoon@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Cc: stable@vger.kernel.org # can be applied after commit 8f9702aad1
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:56 +01:00
Jan Dakinevich 04c776eecc KVM: nVMX: invvpid handling improvements
commit bcdde302b8 upstream

 - Expose all invalidation types to the L1

 - Reject invvpid instruction, if L1 passed zero vpid value to single
   context invalidations

Signed-off-by: Jan Dakinevich <jan.dakinevich@gmail.com>
Tested-by: Ladi Prosek <lprosek@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
[jwang: port to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:56 +01:00
Jan Dakinevich f157269c06 KVM: VMX: clean up declaration of VPID/EPT invalidation types
commit 63f3ac4813 upstream

- Remove VMX_EPT_EXTENT_INDIVIDUAL_ADDR, since there is no such type of
   EPT invalidation

 - Add missing VPID types names

Signed-off-by: Jan Dakinevich <jan.dakinevich@gmail.com>
Tested-by: Ladi Prosek <lprosek@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
[jwang: port to 4.4]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:56 +01:00
Wanpeng Li afff83e673 KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously
commit 9a6e7c3981 upstream.

qemu-system-x86-8600  [004] d..1  7205.687530: kvm_entry: vcpu 2
qemu-system-x86-8600  [004] ....  7205.687532: kvm_exit: reason EXCEPTION_NMI rip 0xffffffffa921297d info ffffeb2c0e44e018 80000b0e
qemu-system-x86-8600  [004] ....  7205.687532: kvm_page_fault: address ffffeb2c0e44e018 error_code 0
qemu-system-x86-8600  [004] ....  7205.687620: kvm_try_async_get_page: gva = 0xffffeb2c0e44e018, gfn = 0x427e4e
qemu-system-x86-8600  [004] .N..  7205.687628: kvm_async_pf_not_present: token 0x8b002 gva 0xffffeb2c0e44e018
    kworker/4:2-7814  [004] ....  7205.687655: kvm_async_pf_completed: gva 0xffffeb2c0e44e018 address 0x7fcc30c4e000
qemu-system-x86-8600  [004] ....  7205.687703: kvm_async_pf_ready: token 0x8b002 gva 0xffffeb2c0e44e018
qemu-system-x86-8600  [004] d..1  7205.687711: kvm_entry: vcpu 2

After running some memory intensive workload in guest, I catch the kworker
which completes the GUP too quickly, and queues an "Page Ready" #PF exception
after the "Page not Present" exception before the next vmentry as the above
trace which will result in #DF injected to guest.

This patch fixes it by clearing the queue for "Page not Present" if "Page Ready"
occurs before the next vmentry since the GUP has already got the required page
and shadow page table has already been fixed by "Page Ready" handler.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Fixes: 7c90705bf2 ("KVM: Inject asynchronous page fault into a PV guest if page is swapped out.")
[Changed indentation and added clearing of injected. - Radim]
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
[port from upstream v4.14-rc1, Don't assign to kvm_queued_exception::injected or
 x86_exception::async_page_fault]
Signed-off-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:56 +01:00
Borislav Petkov 1acf767c21 x86/microcode/AMD: Change load_microcode_amd()'s param to bool to fix preemptibility bug
commit dac6ca243c upstream.

With CONFIG_DEBUG_PREEMPT enabled, I get:

  BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1
  caller is debug_smp_processor_id
  CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc2+ #2
  Call Trace:
   dump_stack
   check_preemption_disabled
   debug_smp_processor_id
   save_microcode_in_initrd_amd
   ? microcode_init
   save_microcode_in_initrd
   ...

because, well, it says it above, we're using smp_processor_id() in
preemptible code.

But passing the CPU number is not really needed. It is only used to
determine whether we're on the BSP, and, if so, to save the microcode
patch for early loading.

 [ We don't absolutely need to do it on the BSP but we do that
   customarily there. ]

Instead, convert that function parameter to a boolean which denotes
whether the patch should be saved or not, thereby avoiding the use of
smp_processor_id() in preemptible code.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170528200414.31305-1-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[arnd: rebased to 4.9, after running into warning:
 arch/x86/kernel/cpu/microcode/amd.c:881:30: self-comparison always evaluates to true]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:56 +01:00
Arnd Bergmann 353727e3b4 usb: phy: msm add regulator dependency
On linux-4.4 and linux-4.9 we get a warning about an array that is
never initialized when CONFIG_REGULATOR is disabled:

drivers/usb/phy/phy-msm-usb.c: In function 'msm_otg_probe':
drivers/usb/phy/phy-msm-usb.c:1911:14: error: 'regs[0].consumer' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  motg->vddcx = regs[0].consumer;
  ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
drivers/usb/phy/phy-msm-usb.c:1912:14: error: 'regs[1].consumer' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  motg->v3p3  = regs[1].consumer;
  ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
drivers/usb/phy/phy-msm-usb.c:1913:14: error: 'regs[2].consumer' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  motg->v1p8  = regs[2].consumer;

This adds a Kconfig dependency for it. In newer kernels, the driver no
longer exists, so this is only needed for stable kernels.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:56 +01:00
Arnd Bergmann fd2e662a75 arm64: fix warning about swapper_pg_dir overflow
commit 12f043ff2b upstream.

With 4 levels of 16KB pages, we get this warning about the fact that we are
copying a whole page into an array that is declared as having only two pointers
for the top level of the page table:

arch/arm64/mm/mmu.c: In function 'paging_init':
arch/arm64/mm/mmu.c:528:2: error: 'memcpy' writing 16384 bytes into a region of size 16 overflows the destination [-Werror=stringop-overflow=]

This is harmless since we actually reserve a whole page in the definition of the
array that comes from, and just the extern declaration is short. The pgdir
is initialized to zero either way, so copying the actual entries here seems
like the best solution.

Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
[slightly adapted to apply on 4.9]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:55 +01:00
Arnd Bergmann b7f3e605fc idle: i7300: add PCI dependency
GCC correctly points out an uninitialized variable use when CONFIG_PCI is disabled.

drivers/idle/i7300_idle.c: In function 'i7300_idle_notifier':
include/asm-generic/bug.h:119:5: error: 'got_ctl' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  if (unlikely(__ret_warn_once && !__warned)) {  \
     ^
drivers/idle/i7300_idle.c:415:5: note: 'got_ctl' was declared here
  u8 got_ctl;
     ^~~~~~~

The driver no longer exists in later kernels, so this patch only appplies to
linux-4.9.y and earlier.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:55 +01:00
Arnd Bergmann c30e6636ce spi: bcm-qspi: shut up warning about cfi header inclusion
When CONFIG_MTD_CFI is disabled, we get a warning for this spi driver:

include/linux/mtd/cfi.h:76:2: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. [-Werror=cpp]

The problem here is a layering violation that was fixed in mainline kernels with
a larger rework in commit 054e532f8f ("spi: bcm-qspi: Remove hardcoded settings
and spi-nor.h dependency"). We can't really backport that to stable kernels, so
this just adds a Kconfig dependency to make it either build cleanly or force it
to be disabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:55 +01:00
Arnd Bergmann 890c52ab3d binfmt_elf: compat: avoid unused function warning
When CONFIG_ELF_CORE is disabled, we get a harmless warning in the compat
version of binfmt_elf:

fs/compat_binfmt_elf.c:58:13: error: 'cputime_to_compat_timeval' defined but not used [-Werror=unused-function]

This was addressed in mainline Linux as part of a larger rework with commit
cd19c364b3 ("fs/binfmt: Convert obsolete cputime type to nsecs").

For 4.9 and earlier, this just shuts up the warning by adding an #ifdef
around the function definition.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:55 +01:00
Arnd Bergmann 5fe7514013 arm64: sunxi: always enable reset controller
commit 900a9020af upstream.

The sunxi clk driver causes a link error when the reset controller
subsystem is disabled:

drivers/clk/built-in.o: In function `sun4i_ve_clk_setup':
:(.init.text+0xd040): undefined reference to `reset_controller_register'
drivers/clk/built-in.o: In function `sun4i_a10_display_init':
:(.init.text+0xe5e0): undefined reference to `reset_controller_register'
drivers/clk/built-in.o: In function `sunxi_usb_clk_setup':
:(.init.text+0x10074): undefined reference to `reset_controller_register'

We already force it to be enabled on arm32 and some other arm64 platforms,
but not on arm64/sunxi. This adds the respective Kconfig statements to
also select it here.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
[arnd: manually rebased to 4.9]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:55 +01:00
Arnd Bergmann 6429e2f183 drm/i915: hide unused intel_panel_set_backlight function
commit fd94d53e55 upstream.

Building i915 without backlight support results in a harmless warning
for intel_panel_set_backlight:

drivers/gpu/drm/i915/intel_panel.c:653:13: error: 'intel_panel_set_backlight' defined but not used [-Werror=unused-function]

This moves it into the CONFIG_BACKLIGHT_CLASS_DEVICE section that
its caller is in.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171127151239.1813673-2-arnd@arndb.de
[arnd: manually rebased to 4.9]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:55 +01:00
Arnd Bergmann ef3af3465a kasan: rework Kconfig settings
commit e7c52b84fb upstream.

We get a lot of very large stack frames using gcc-7.0.1 with the default
-fsanitize-address-use-after-scope --param asan-stack=1 options, which can
easily cause an overflow of the kernel stack, e.g.

  drivers/gpu/drm/i915/gvt/handlers.c:2434:1: warning: the frame size of 46176 bytes is larger than 3072 bytes
  drivers/net/wireless/ralink/rt2x00/rt2800lib.c:5650:1: warning: the frame size of 23632 bytes is larger than 3072 bytes
  lib/atomic64_test.c:250:1: warning: the frame size of 11200 bytes is larger than 3072 bytes
  drivers/gpu/drm/i915/gvt/handlers.c:2621:1: warning: the frame size of 9208 bytes is larger than 3072 bytes
  drivers/media/dvb-frontends/stv090x.c:3431:1: warning: the frame size of 6816 bytes is larger than 3072 bytes
  fs/fscache/stats.c:287:1: warning: the frame size of 6536 bytes is larger than 3072 bytes

To reduce this risk, -fsanitize-address-use-after-scope is now split out
into a separate CONFIG_KASAN_EXTRA Kconfig option, leading to stack
frames that are smaller than 2 kilobytes most of the time on x86_64.  An
earlier version of this patch also prevented combining KASAN_EXTRA with
KASAN_INLINE, but that is no longer necessary with gcc-7.0.1.

All patches to get the frame size below 2048 bytes with CONFIG_KASAN=y
and CONFIG_KASAN_EXTRA=n have been merged by maintainers now, so we can
bring back that default now.  KASAN_EXTRA=y still causes lots of
warnings but now defaults to !COMPILE_TEST to disable it in
allmodconfig, and it remains disabled in all other defconfigs since it
is a new option.  I arbitrarily raise the warning limit for KASAN_EXTRA
to 3072 to reduce the noise, but an allmodconfig kernel still has around
50 warnings on gcc-7.

I experimented a bit more with smaller stack frames and have another
follow-up series that reduces the warning limit for 64-bit architectures
to 1280 bytes (without CONFIG_KASAN).

With earlier versions of this patch series, I also had patches to address
the warnings we get with KASAN and/or KASAN_EXTRA, using a
"noinline_if_stackbloat" annotation.

That annotation now got replaced with a gcc-8 bugfix (see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715) and a workaround for
older compilers, which means that KASAN_EXTRA is now just as bad as
before and will lead to an instant stack overflow in a few extreme
cases.

This reverts parts of commit 3f181b4d86 ("lib/Kconfig.debug: disable
-Wframe-larger-than warnings with KASAN=y").  Two patches in linux-next
should be merged first to avoid introducing warnings in an allmodconfig
build:
  3cd890dbe2 ("media: dvb-frontends: fix i2c access helpers for KASAN")
  16c3ada89c ("media: r820t: fix r820t_write_reg for KASAN")

Do we really need to backport this?

I think we do: without this patch, enabling KASAN will lead to
unavoidable kernel stack overflow in certain device drivers when built
with gcc-7 or higher on linux-4.10+ or any version that contains a
backport of commit c5caf21ab0.  Most people are probably still on
older compilers, but it will get worse over time as they upgrade their
distros.

The warnings we get on kernels older than this should all be for code
that uses dangerously large stack frames, though most of them do not
cause an actual stack overflow by themselves.The asan-stack option was
added in linux-4.0, and commit 3f181b4d86 ("lib/Kconfig.debug:
disable -Wframe-larger-than warnings with KASAN=y") effectively turned
off the warning for allmodconfig kernels, so I would like to see this
fix backported to any kernels later than 4.0.

I have done dozens of fixes for individual functions with stack frames
larger than 2048 bytes with asan-stack, and I plan to make sure that
all those fixes make it into the stable kernels as well (most are
already there).

Part of the complication here is that asan-stack (from 4.0) was
originally assumed to always require much larger stacks, but that
turned out to be a combination of multiple gcc bugs that we have now
worked around and fixed, but sanitize-address-use-after-scope (from
v4.10) has a much higher inherent stack usage and also suffers from at
least three other problems that we have analyzed but not yet fixed
upstream, each of them makes the stack usage more severe than it should
be.

Link: http://lkml.kernel.org/r/20171221134744.2295529-1-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrey Konovalov <andreyknvl@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[arnd: rebase to v4.9; only re-enable warning]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:55 +01:00
Tobias Regnery e4f0069c64 clk: meson: gxbb: fix build error without RESET_CONTROLLER
commit dbed87a9d3 upstream.

With CONFIG_RESET_CONTROLLER=n we see the following link error in the
meson gxbb clk driver:

drivers/built-in.o: In function 'gxbb_aoclkc_probe':
drivers/clk/meson/gxbb-aoclk.c:161: undefined reference to 'devm_reset_controller_register'

Fix this by selecting the reset controller subsystem.

Fixes: f8c11f7991 ("clk: meson: Add GXBB AO Clock and Reset controller driver")
Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
[narmstrong: Added fixes-by tag]
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:05:55 +01:00