Commit Graph

3587 Commits

Author SHA1 Message Date
Tao Huang
485221e0b9 rk: scripts: mkbootimg: support header_version and recovery_dtbo
Merge AOSP 26e01bbdc5cb ("Populate recovery DTBO offset correctly")

Change-Id: Icfc8957b5101d86a1c70bd9c6676824aaaeb75e4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-06-21 10:42:52 +08:00
Tao Huang
ca74123c69 Merge tag 'lsk-v4.4-18.05-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
LSK 18.05 v4.4-android

* tag 'lsk-v4.4-18.05-android': (605 commits)
  ANDROID: sdcardfs: Don't d_drop in d_revalidate
  goldfish: pipe: ANDROID: mark local functions static
  UPSTREAM: ANDROID: binder: prevent transactions into own process.
  goldfish: pipe: ANDROID: Add DMA support
  UPSTREAM: f2fs: clear PageError on writepage - part 2
  UPSTREAM: f2fs: avoid fsync() failure caused by EAGAIN in writepage()
  ANDROID: x86_64_cuttlefish_defconfig: Disable KPTI
  UPSTREAM: mac80211: ibss: Fix channel type enum in ieee80211_sta_join_ibss()
  UPSTREAM: mac80211: Fix clang warning about constant operand in logical operation
  UPSTREAM: nl80211: Fix enum type of variable in nl80211_put_sta_rate()
  UPSTREAM: sysfs: remove signedness from sysfs_get_dirent
  UPSTREAM: tracing: Use cpumask_available() to check if cpumask variable may be used
  BACKPORT: clocksource: Use GENMASK_ULL in definition of CLOCKSOURCE_MASK
  UPSTREAM: netpoll: Fix device name check in netpoll_setup()
  FROMLIST: staging: Fix sparse warnings in vsoc driver.
  FROMLIST: staging: vsoc: Fix a i386-randconfig warning.
  FROMLIST: staging: vsoc: Create wc kernel mapping for region shm.
  goldfish: pipe: ANDROID: Replace writel with gf_write_ptr
  goldfish: pipe: ANDROID: Use dev_ logging instead of pr_
  goldfish: pipe: ANDROID: fix checkpatch warnings
  ...

Conflicts:
	fs/f2fs/node.c
	scripts/Makefile.lib

Change-Id: Ib92d11938a383464249fe6f2dad3ab2a05bc4770
2018-06-04 20:16:28 +08:00
Frank Rowand
2a578fc2da UPSTREAM: scripts/dtc: dtx_diff - update include dts paths to match build
Update the cpp include flags for compiling device tree dts files
to match the changes made to the kernel build process in
commit d5d332d3f7e8 ("devicetree: Move include prefixes from arch
to separate directory").

Change-Id: Ia0ea81369757b9de902b3fe4ab0a1af17ccccf56
Cc: <stable@vger.kernel.org> # 4.12
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit b4b201d88b7c9b3c6acdd03f9adec0c9857548ce)
2018-05-28 17:18:36 +08:00
Olof Johansson
9820464afd UPSTREAM: devicetree: Move include prefixes from arch to separate directory
We use a directory under arch/$ARCH/boot/dts as an include path
that has links outside of the subtree to find dt-bindings from under
include/dt-bindings. That's been working well, but new DT architectures
haven't been adding them by default.

Recently there's been a desire to share some of the DT material between
arm and arm64, which originally caused developers to create symlinks or
relative includes between the subtrees. This isn't ideal -- it breaks
if the DT files aren't stored in the exact same hierarchy as the kernel
tree, and generally it's just icky.

As a somewhat cleaner solution we decided to add a $ARCH/ prefix link
once, and allow DTS files to reference dtsi (and dts) files in other
architectures that way.

Original approach was to create these links under each architecture,
but it lead to the problem of recursive symlinks.

As a remedy, move the include link directories out of the architecture
trees into a common location. At the same time, they can now share one
directory and one dt-bindings/ link as well.

Change-Id: Ib1ad9c86fe4eb2669ae2515c863979fa8e700e4f
Fixes: 4027494ae6e3 ('ARM: dts: add arm/arm64 include symlinks')
Reported-by: Russell King <linux@armlinux.org.uk>
Reported-by: Omar Sandoval <osandov@osandov.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Rob Herring <robh@kernel.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: linux-arch <linux-arch@vger.kernel.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit d5d332d3f7e8435e264a71b90178dee69428d630)
2018-05-28 17:12:38 +08:00
Rob Herring
8a9538c297 dtc: turn off dtc unit address warnings by default
The newly added dtc warning to check DT unit-address without reg
property and vice-versa generates lots of warnings. Turn off the check
unless building with W=1 or W=2.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Michal Marek <mmarek@suse.com>
Cc: linux-kbuild@vger.kernel.org
(cherry picked from commit bc553986a2f7c56d0de811485d5312ea29692d5d)
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>

Change-Id: Ief2e68988f6cf32cb4e98f489fa4079f523c0887
2018-05-20 16:40:16 +05:30
Amit Pundir
f620a275d4 Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
* linux-linaro-lsk-v4.4: (515 commits)
  Linux 4.4.132
  perf/x86: Fix possible Spectre-v1 indexing for x86_pmu::event_map()
  perf/core: Fix possible Spectre-v1 indexing for ->aux_pages[]
  perf/x86/msr: Fix possible Spectre-v1 indexing in the MSR driver
  perf/x86/cstate: Fix possible Spectre-v1 indexing for pkg_msr
  perf/x86: Fix possible Spectre-v1 indexing for hw_perf_event cache_*
  tracing/uprobe_event: Fix strncpy corner case
  Revert "Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174"
  atm: zatm: Fix potential Spectre v1
  net: atm: Fix potential Spectre v1
  can: kvaser_usb: Increase correct stats counter in kvaser_usb_rx_can_msg()
  tracing: Fix regex_match_front() to not over compare the test string
  libata: Apply NOLPM quirk for SanDisk SD7UB3Q*G1001 SSDs
  rfkill: gpio: fix memory leak in probe error path
  xfrm_user: fix return value from xfrm_user_rcv_msg
  f2fs: fix a dead loop in f2fs_fiemap()
  bdi: Fix oops in wb_workfn()
  tcp: fix TCP_REPAIR_QUEUE bound checking
  perf: Remove superfluous allocation error check
  soreuseport: initialise timewait reuseport field
  ...

Conflicts:
  arch/s390/kernel/module.c
  arch/x86/kernel/kprobes/core.c
  fs/proc/task_mmu.c
  net/ipv6/route.c

  Trivial conflicts between AOSP/LSK and backported/rebased LTS changes.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
2018-05-20 13:36:03 +05:30
Mark Brown
0e7fcfff8d Merge tag 'v4.4.132' into linux-linaro-lsk-v4.4
This is the 4.4.132 stable release
2018-05-18 11:44:19 +01:00
Andy Yan
8e5c859386 scripts: add mkmultidtb.py to package multiple dtbs to resource.img
People sometimes want to package multiple dtbs to resource.img for
a baseboard which may has several hardware variants. And on the
hardware design side, may use adc value or gpio level to indicate
the hardware id, so we encode the hardware id information at the
suffix of the dtb file name.

For example:

DTBS['PX30-EVB'] = OrderedDict([('px30-evb-ddr3-v10', '#_saradc_ch0=1024'),
                                ('px30-evb-ddr3-lvds-v10', '#_saradc_ch0=512')])

DTBS['RK3308-EVB'] = OrderedDict([('rk3308-evb-dmic-i2s-v10', '#_saradc_ch3=288'),
                                  ('rk3308-evb-dmic-pdm-v10', '#_saradc_ch3=1024'),
                                  ('rk3308-evb-amic-v10', '#_saradc_ch3=407')])

DTBS['RK3308-SWEEPER'] = OrderedDict([('rk3308-sweeper-v10', '#gpio0a2=0'),
				      ('rk3308-sweeper-v11', '#gpio0a2=1')])

When you run the script like:
$ scripts/mkmultidtb.py RK3308-EVB

The script will package all the dtbs you list in DTBS['PX30-EVB']
to resource.img with a new name that suffix with hardware id
information:

rk3308-evb-dmic-pdm-v10#_saradc_ch3=1024.dtb
rk3308-evb-dmic-i2s-v10#_saradc_ch3=288.dtb
rk3308-evb-amic-v10#_saradc_ch3=407.dtb

And the script will also make another copy of the fist dtb
file which you list in the OrderedDict named as rk-kernel.dtb

Check the content of resource.img by command: hd resource.img | less

00000000  52 53 43 45 00 00 00 00  01 01 01 00 06 00 00 00  |RSCE............|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

00000200  45 4e 54 52 72 6b 2d 6b  65 72 6e 65 6c 2e 64 74  |ENTRrk-kernel.dt|
00000210  62 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |b...............|
00000220  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000300  00 00 00 00 07 00 00 00  d4 a3 00 00 00 00 00 00  |................|
00000310  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000400  45 4e 54 52 72 6b 33 33  30 38 2d 65 76 62 2d 64  |ENTRrk3308-evb-d|
00000410  6d 69 63 2d 70 64 6d 2d  76 31 30 23 5f 73 61 72  |mic-pdm-v10#_sar|
00000420  61 64 63 5f 63 68 33 3d  31 30 32 34 2e 64 74 62  |adc_ch3=1024.dtb|
00000430  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000500  00 00 00 00 59 00 00 00  d4 a3 00 00 00 00 00 00  |....Y...........|
00000510  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000600  45 4e 54 52 72 6b 33 33  30 38 2d 65 76 62 2d 64  |ENTRrk3308-evb-d|
00000610  6d 69 63 2d 69 32 73 2d  76 31 30 23 5f 73 61 72  |mic-i2s-v10#_sar|
00000620  61 64 63 5f 63 68 33 3d  32 38 38 2e 64 74 62 00  |adc_ch3=288.dtb.|
00000630  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000700  00 00 00 00 ab 00 00 00  e0 a3 00 00 00 00 00 00  |................|
00000710  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000800  45 4e 54 52 72 6b 33 33  30 38 2d 65 76 62 2d 61  |ENTRrk3308-evb-a|
00000810  6d 69 63 2d 76 31 30 23  5f 73 61 72 61 64 63 5f  |mic-v10#_saradc_|
00000820  63 68 33 3d 34 30 37 2e  64 74 62 00 00 00 00 00  |ch3=407.dtb.....|

Note: the scripts is run on python2.6

Change-Id: I89d96d629511024c32267be46c1c72748bf04e49
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2018-05-08 17:28:51 +08:00
Robert Jarzmik
04e22d2e31 tags: honor COMPILED_SOURCE with apart output directory
[ Upstream commit cbf52a3e6a8a92beec6e0c70abf4111cd8f8faf7 ]

When the kernel is compiled with an "O=" argument, the object files are
not in the source tree, but in the build tree.

This patch fixes O= build by looking for object files in the build tree.

Fixes: 923e02ecf3 ("scripts/tags.sh: Support compiled source")
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-13 19:50:18 +02:00
Tao Huang
0b3ed0efcd Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (395 commits)
  Linux 4.4.126
  net: systemport: Rewrite __bcm_sysport_tx_reclaim()
  net: fec: Fix unbalanced PM runtime calls
  ieee802154: 6lowpan: fix possible NULL deref in lowpan_device_event()
  s390/qeth: on channel error, reject further cmd requests
  s390/qeth: lock read device while queueing next buffer
  s390/qeth: when thread completes, wake up all waiters
  s390/qeth: free netdevice when removing a card
  team: Fix double free in error path
  skbuff: Fix not waking applications when errors are enqueued
  net: Only honor ifindex in IP_PKTINFO if non-0
  netlink: avoid a double skb free in genlmsg_mcast()
  net/iucv: Free memory obtained by kzalloc
  net: ethernet: ti: cpsw: add check for in-band mode setting with RGMII PHY interface
  net: ethernet: arc: Fix a potential memory leak if an optional regulator is deferred
  l2tp: do not accept arbitrary sockets
  ipv6: fix access to non-linear packet in ndisc_fill_redirect_hdr_option()
  dccp: check sk for closed state in dccp_sendmsg()
  net: Fix hlist corruptions in inet_evict_bucket()
  Revert "genirq: Use irqd_get_trigger_type to compare the trigger type for shared IRQs"
  ...

Conflicts:
	include/linux/usb/quirks.h

Change-Id: I125065cef66846e4cdee799f4b34d07c309d353e
2018-04-08 18:28:30 +08:00
Tao Huang
1079fa97eb scripts/gcc-wrapper.py: ignore some warnings when W=1
Change-Id: I9d9651c077ee025d2f4fbe8faf22f8bed19b0cdd
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-28 19:51:34 +08:00
Rob Herring
2783b7940e UPSTREAM: scripts/dtc: Update to upstream version v1.4.5-6-gc1e55a5513e9
Pickup the fix for handling unresolved phandles in overlays.

This adds the following commits from upstream:

c1e55a5513e9 checks: fix handling of unresolved phandles for dts plugins
f8872e29ce06 tests: Avoid 64-bit arithmetic in assembler
48c91c08bcfa libfdt: add stringlist functions to linker script

Change-Id: I81a0cc9a936f8d1da810460ea5df4472fa27dd5c
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit e45fe7f788dd1395befe5639149ad8dacfbd94ab)
2018-03-28 19:51:34 +08:00
Rob Herring
057c7706cb UPSTREAM: scripts/dtc: Update to upstream version v1.4.5-3-gb1a60033c110
This adds the following commits from upstream:

b1a60033c110 tests: Add a test for overlays syntactic sugar
737b2df39cc8 overlay: Add syntactic sugar version of overlays
497432fd2131 checks: Use proper format modifier for size_t
22a65c5331c2 dtc: Bump version to v1.4.5
c575d8059fff Add fdtoverlay to .gitignore
b6a6f9490d19 fdtoverlay: Sanity check blob size
8c1eb1526d2d pylibfdt: Use Python2 explicitly
ee3d26f6960b checks: add interrupts property check
c1e7738988f5 checks: add gpio binding properties check
b3bbac02d5e3 checks: add phandle with arg property checks
fe50bd1ecc1d fdtget: Split out cell list display into a new function
62d812308d11 README: Add a note about test_tree1.dts
5bed86aee9e8 pylibfdt: Add support for fdt_subnode_offset()
46f31b65b3b3 pylibfdt: Add support for fdt_node_offset_by_phandle()
a3ae43723687 pylibfdt: Add support for fdt_parent_offset()
a198af80344c pylibfdt: Add support for fdt_get_phandle()
b9eba92ea50f tests: Return a failure code when any tests fail
155faf6cc209 pylibfdt: Use local pylibfdt module
50e5cd07f325 pylibfdt: Add a test for use of uint32_t
ab78860f09f5 pylibfdt: Add stdint include to fix uint32_t
36f511fb1113 tests: Add stacked overlay tests on fdtoverlay
1bb00655d3e5 fdt: Allow stacked overlays phandle references
a33c2247ac8d Introduce fdt_setprop_placeholder() method
0016f8c2aa32 dtc: change default phandles to ePAPR style instead of both
e3b9a9588a35 tests: fdtoverlay unit test
42409146f2db fdtoverlay: A tool that applies overlays
aae22722fc8d manual: Document missing options
13ce6e1c2fc4 dtc: fix sprintf() format string error, again
d990b8013889 Makefile: Fix build on MSYS2 and Cygwin
51f56dedf8ea Clean up shared library compile/link options
21a2bc896e3d Suppress expected error message in fdtdump test
2a42b14d0d03 dtc: check.c fix compile error
a10cb3c818d3 Fix get_node_by_path string equality check
548aea2c436a fdtdump: Discourage use of fdtdump
c2258841a785 fdtdump: Fix over-zealous version check
9067ee4be0e6 Fix a few whitespace and style nits
e56f2b07be38 pylibfdt: Use setup.py to build the swig file
896f1c133265 pylibfdt: Use Makefile constructs to implement NO_PYTHON
90db6d9989ca pylibfdt: Allow setup.py to operate stand-alone
e20d9658cd8f Add Coverity Scan support
b04a2cf08862 pylibfdt: Fix code style in setup.py
1c5170d3a466 pylibfdt: Rename libfdt.swig to libfdt.i
580a9f6c2880 Add a libfdt function to write a property placeholder
ab15256d8d02 pylibfdt: Use the call function to simplify the Makefile
9f2e3a3a1f19 pylibfdt: Use the correct libfdt version in the module
e91c652af215 pylibfdt: Enable installation of Python module
8a892fd85d94 pylibfdt: Allow building to be disabled
741cdff85d3e .travis.yml: Add builds with and without Python library prerequisites
14c4171f4f9a pylibfdt: Use package_dir to set the package directory
89a5062ab231 pylibfdt: Use environment to pass C flags and files
4e0e0d049757 pylibfdt: Allow pkg-config to be supplied in the environment
6afd7d9688f5 Correct typo: s/pylibgfdt/pylibfdt/

Change-Id: I0591bb1fe4e76051deae3318011927b350271f6c
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 4201d057ea91c3d6efd2db65219bc91fae413bc2)
2018-03-28 19:51:34 +08:00
Russell King
2c342a2ca4 UPSTREAM: scripts/dtc: fix '%zx' warning
dtc uses an incorrect format specifier for printing a uint64_t value.
uint64_t may be either 'unsigned long' or 'unsigned long long' depending
on the host architecture.

Fix this by using %llx and casting to unsigned long long, which ensures
that we always have a wide enough variable to print 64 bits of hex.

    HOSTCC  scripts/dtc/checks.o
  scripts/dtc/checks.c: In function 'check_simple_bus_reg':
  scripts/dtc/checks.c:876:2: warning: format '%zx' expects argument of type 'size_t', but argument 4 has type 'uint64_t' [-Wformat=]
    snprintf(unit_addr, sizeof(unit_addr), "%zx", reg);
    ^
  scripts/dtc/checks.c:876:2: warning: format '%zx' expects argument of type 'size_t', but argument 4 has type 'uint64_t' [-Wformat=]

Link: http://lkml.kernel.org/r/20170829222034.GJ20805@n2100.armlinux.org.uk
Change-Id: Ic485917e85d7ddab7e7711e5f4e7038ceb6675c0
Fixes: 828d4cdd012c ("dtc: check.c fix compile error")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit e66186920bff278b18ebe460c710c7b0e0cfdf6e)
2018-03-28 19:51:34 +08:00
Geert Uytterhoeven
15b8da6906 UPSTREAM: scripts/dtc: dtx_diff - Show real file names in diff header
As the comparison uses process substitution to pass files after
conversion to DTS format, the diff header doesn't show the real
filenames, but the names of the file descriptors used:

    --- /dev/fd/63  2017-06-22 11:21:47.531637188 +0200
    +++ /dev/fd/62  2017-06-22 11:21:47.531637188 +0200

This is especially annoying when comparing a bunch of DT files in a
loop, as the output doesn't show a clue about which files it refers to.

Fix this by explicitly passing the original file names to the diff
command using the --label option, giving e.g.:

    --- arch/arm/boot/dts/r8a7791-koelsch.dtb
    +++ arch/arm/boot/dts/r8a7791-porter.dtb

Change-Id: Ic07c743027d42c04f865e1a79f61cd44103a2d80
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 7782b1444645768f5f213eaff6994604c6c0e635)
2018-03-28 19:51:34 +08:00
Shuah Khan
29b79c4588 UPSTREAM: dtc: check.c fix compile error
Fix the following compile error found on odroid-xu4:

checks.c: In function ‘check_simple_bus_reg’:
checks.c:876:41: error: format ‘%lx’ expects argument of type
‘long unsigned int’, but argument 4 has type
‘uint64_t{aka long long unsigned int}’ [-Werror=format=]
  snprintf(unit_addr, sizeof(unit_addr), "%lx", reg);
                                         ^
checks.c:876:41: error: format ‘%lx’ expects argument of type
‘long unsigned int’, but argument 4 has type
‘uint64_t {aka long long unsigned int}’ [-Werror=format=]
cc1: all warnings being treated as errors
Makefile:304: recipe for target 'checks.o' failed
make: *** [checks.o] Error 1

Change-Id: I08896cc9ecd828822ba9bd8e1b6d382faf7cd95d
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
[dwg: Correct new format to be correct in general]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
[robh: cherry-picked from upstream dtc commit 2a42b14d0d03]
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 828d4cdd012c8ffbf76625c3ff164312e8666784)
2018-03-28 19:51:34 +08:00
Rob Herring
e7448a56d1 UPSTREAM: dtc: update warning settings for new bus and node/property name checks
dtc gained new warnings checking PCI and simple buses, unit address
formatting, and stricter node and property name checking. Disable the
new dtc warnings by default as there are 1000s. As before, warnings are
enabled with W=1 or W=2. The strict node and property name checks are a
bit subjective, so they are only enabled for W=2.

Change-Id: I1928d0fcb0a6fb82ec4a68d092121809cd23c1a0
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 8654cb8d0371de3f119c657531abf2ee4423cb44)
2018-03-28 19:51:34 +08:00
Rob Herring
6a4e8d52a2 UPSTREAM: dtc: turn off dtc unit address warnings by default
The newly added dtc warning to check DT unit-address without reg
property and vice-versa generates lots of warnings. Turn off the check
unless building with W=1 or W=2.

Change-Id: I423d16369f982e7691fb0921133b5e9d673b74c0
Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Michal Marek <mmarek@suse.com>
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit bc553986a2f7c56d0de811485d5312ea29692d5d)
2018-03-28 19:51:34 +08:00
Rob Herring
a3b92c0f92 UPSTREAM: scripts/dtc: Update to upstream version v1.4.4-8-g756ffc4f52f6
This adds the following commits from upstream:

756ffc4f52f6 Build pylibfdt as part of the normal build process
8cb3896358e9 Adjust libfdt.h to work with swig
b40aa8359aff Mention pylibfdt in the documentation
12cfb740cc76 Add tests for pylibfdt
50f250701631 Add an initial Python library for libfdt
cdbb2b6c7a3a checks: Warn on node name unit-addresses with '0x' or leading 0s
4c15d5da17cc checks: Add bus checks for simple-bus buses
33c3985226d3 checks: Add bus checks for PCI buses
558cd81bdd43 dtc: Bump version to v1.4.4
c17a811c62eb fdtput: Remove star from value_len documentation
194d5caaefcb fdtget: Use @return to document the return value
d922ecdd017b tests: Make realloc_fdt() really allocate *fdt
921cc17fec29 libfdt: overlay: Check the value of the right variable
9ffdf60bf463 dtc: Simplify asm_emit_string() implementation
881012e44386 libfdt: Change names of sparse helper macros
bad5b28049e5 Fix assorted sparse warnings
672ac09ea04d Clean up gcc attributes
49300f2ade6a dtc: Don't abuse struct fdt_reserve_entry
fa8bc7f928ac dtc: Bump version to v1.4.3
34a9886a177f Add printf format attributes
f72508e2b6ca Correct some broken printf() like format mismatches
397d5ef0203c libfdt: Add fdt_setprop_empty()
69a1bd6ad3f9 libfdt: Remove undefined behaviour setting empty properties
acd1b534a592 Print output filename as part of warning messages
120775eb1cf3 dtc: Use streq() in preference to strcmp()
852e9ecbe197 checks: Add Warning for stricter node name character checking
ef0e8f061534 checks: Add Warning for stricter property name character checking
00d7bb1f4b0e dtc: pos parameter to srcpos_string() can't be NULL
95d57726bca4 livetree.c: Fix memory leak
3b9c97093d6e dtc: Fix NULL pointer use in dtlabel + dtref case
43eb551426ea manual: Fix typo it -> in
4baf15f7f13f Makefile: Add tags rule

Change-Id: Ifb54361ee3f13e124e6728a095dc73b0fe2724d5
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 89d123106a97bf412a4c10482044c822f4b069f7)
2018-03-28 19:51:34 +08:00
Rob Herring
210d77e4cd UPSTREAM: scripts/dtc: automate getting dtc version and log in update script
Further automate the dtc update script to fill in the dtc version and
commit log.

Change-Id: Ib52a9d54ffbe57c82cb2aa752e3cdd0f6b564e7a
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 86cef6144d273404d8cb5c0b215ada8d23e5dbeb)
2018-03-28 19:51:34 +08:00
Tao Huang
984c3db82e rk: scripts: add mkbootimg
From AOSP 294eb9dac3c0 ("mkbootimg: use int for os_version and os_patch_level")

Change-Id: I5026049859df121d0a034085c2563cfc4ef98230
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-03-22 15:19:30 +08:00
Alex Shi
9ad0ea90a1 Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android 2018-03-19 12:01:32 +08:00
Alex Shi
06eb38abaf Merge tag 'v4.4.122' into linux-linaro-lsk-v4.4
This is the 4.4.122 stable release
2018-03-19 12:01:28 +08:00
James Hogan
edcb61577c kbuild: Handle builtin dtb file names containing hyphens
commit 55fe6da9efba102866e2fb5b40b04b6a4b26c19e upstream.

cmd_dt_S_dtb constructs the assembly source to incorporate a devicetree
FDT (that is, the .dtb file) as binary data in the kernel image. This
assembly source contains labels before and after the binary data. The
label names incorporate the file name of the corresponding .dtb file.
Hyphens are not legal characters in labels, so .dtb files built into the
kernel with hyphens in the file name result in errors like the
following:

bcm3368-netgear-cvg834g.dtb.S: Assembler messages:
bcm3368-netgear-cvg834g.dtb.S:5: Error: : no such section
bcm3368-netgear-cvg834g.dtb.S:5: Error: junk at end of line, first unrecognized character is `-'
bcm3368-netgear-cvg834g.dtb.S:6: Error: unrecognized opcode `__dtb_bcm3368-netgear-cvg834g_begin:'
bcm3368-netgear-cvg834g.dtb.S:8: Error: unrecognized opcode `__dtb_bcm3368-netgear-cvg834g_end:'
bcm3368-netgear-cvg834g.dtb.S:9: Error: : no such section
bcm3368-netgear-cvg834g.dtb.S:9: Error: junk at end of line, first unrecognized character is `-'

Fix this by updating cmd_dt_S_dtb to transform all hyphens from the file
name to underscores when constructing the labels.

As of v4.16-rc2, 1139 .dts files across ARM64, ARM, MIPS and PowerPC
contain hyphens in their names, but the issue only currently manifests
on Broadcom MIPS platforms, as that is the only place where such files
are built into the kernel. For example when CONFIG_DT_NETGEAR_CVG834G=y,
or on BMIPS kernels when the dtbs target is used (in the latter case it
admittedly shouldn't really build all the dtb.o files, but thats a
separate issue).

Fixes: 695835511f96 ("MIPS: BMIPS: rename bcm96358nb4ser to bcm6358-neufbox4-sercom")
Signed-off-by: James Hogan <jhogan@kernel.org>
Reviewed-by: Frank Rowand <frowand.list@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: <stable@vger.kernel.org> # 4.9+
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-18 11:17:49 +01:00
Tao Huang
3430c68a33 Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git
* linux-linaro-lsk-v4.4-android: (660 commits)
  ANDROID: keychord: Check for write data size
  ANDROID: sdcardfs: Set num in extension_details during make_item
  ANDROID: sdcardfs: Hold i_mutex for i_size_write
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck64-XTS
  BACKPORT, FROMGIT: crypto: speck - add test vectors for Speck128-XTS
  BACKPORT, FROMGIT: crypto: arm/speck - add NEON-accelerated implementation of Speck-XTS
  FROMGIT: crypto: speck - export common helpers
  BACKPORT, FROMGIT: crypto: speck - add support for the Speck block cipher
  UPSTREAM: ANDROID: binder: synchronize_rcu() when using POLLFREE.
  f2fs: updates on v4.16-rc1
  BACKPORT: tee: shm: Potential NULL dereference calling tee_shm_register()
  BACKPORT: tee: shm: don't put_page on null shm->pages
  BACKPORT: tee: shm: make function __tee_shm_alloc static
  BACKPORT: tee: optee: check type of registered shared memory
  BACKPORT: tee: add start argument to shm_register callback
  BACKPORT: tee: optee: fix header dependencies
  BACKPORT: tee: shm: inline tee_shm_get_id()
  BACKPORT: tee: use reference counting for tee_context
  BACKPORT: tee: optee: enable dynamic SHM support
  BACKPORT: tee: optee: add optee-specific shared pool implementation
  ...

Conflicts:
	drivers/irqchip/Kconfig
	drivers/media/i2c/tc35874x.c
	drivers/media/v4l2-core/v4l2-compat-ioctl32.c
	drivers/usb/gadget/function/f_fs.c
	fs/f2fs/node.c

Change-Id: Icecd73a515821b536fa3d81ea91b63d9b3699916
2018-03-09 19:10:14 +08:00