diff --git a/Makefile b/Makefile index f4de30b6dfc772beeeb613e7705e29345e57a3fe..10c5d0600f22ab0e40f4413a0ceb7daafc85e12c 100644 --- a/Makefile +++ b/Makefile @@ -983,7 +983,7 @@ ifneq ($(CONFIG_DM_MMC)$(CONFIG_OF_CONTROL)$(CONFIG_BLK),yyy) @echo >&2 "This board does not use CONFIG_DM_MMC. Please update" @echo >&2 "the board to use CONFIG_DM_MMC before the v2019.04 release." @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/MIGRATION.txt for more info." + @echo >&2 "See doc/driver-model/migration.rst for more info." @echo >&2 "====================================================" endif endif @@ -993,7 +993,7 @@ ifneq ($(CONFIG_DM_USB)$(CONFIG_OF_CONTROL)$(CONFIG_BLK),yyy) @echo >&2 "This board does not use CONFIG_DM_USB. Please update" @echo >&2 "the board to use CONFIG_DM_USB before the v2019.07 release." @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/MIGRATION.txt for more info." + @echo >&2 "See doc/driver-model/migration.rst for more info." @echo >&2 "====================================================" endif endif @@ -1004,7 +1004,7 @@ ifeq ($(CONFIG_MVSATA_IDE),y) @echo >&2 "controller driver to use CONFIG_AHCI before the v2019.07" @echo >&2 "release." @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/MIGRATION.txt for more info." + @echo >&2 "See doc/driver-model/migration.rst for more info." @echo >&2 "====================================================" endif ifeq ($(CONFIG_LIBATA),y) @@ -1014,7 +1014,7 @@ ifneq ($(CONFIG_AHCI),y) @echo >&2 "enabled. Please update the storage controller driver to use" @echo >&2 "CONFIG_AHCI before the v2019.07 release." @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/MIGRATION.txt for more info." + @echo >&2 "See doc/driver-model/migration.rst for more info." @echo >&2 "====================================================" endif endif @@ -1024,7 +1024,7 @@ ifneq ($(CONFIG_DM_PCI),y) @echo >&2 "This board does not use CONFIG_DM_PCI Please update" @echo >&2 "the board to use CONFIG_DM_PCI before the v2019.07 release." @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/MIGRATION.txt for more info." + @echo >&2 "See doc/driver-model/migration.rst for more info." @echo >&2 "====================================================" endif endif @@ -1034,7 +1034,7 @@ ifneq ($(CONFIG_DM_VIDEO),y) @echo >&2 "This board does not use CONFIG_DM_VIDEO Please update" @echo >&2 "the board to use CONFIG_DM_VIDEO before the v2019.07 release." @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/MIGRATION.txt for more info." + @echo >&2 "See doc/driver-model/migration.rst for more info." @echo >&2 "====================================================" endif endif @@ -1052,7 +1052,7 @@ ifneq ($(CONFIG_DM_SPI_FLASH)$(CONFIG_OF_CONTROL),yy) @echo >&2 "This board does not use CONFIG_DM_SPI_FLASH. Please update" @echo >&2 "the board to use CONFIG_SPI_FLASH before the v2019.07 release." @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/MIGRATION.txt for more info." + @echo >&2 "See doc/driver-model/migration.rst for more info." @echo >&2 "====================================================" endif endif @@ -1063,7 +1063,7 @@ ifneq ($(CONFIG_WDT),y) @echo >&2 "Please update the board to use CONFIG_WDT before the" @echo >&2 "v2019.10 release." @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/MIGRATION.txt for more info." + @echo >&2 "See doc/driver-model/migration.rst for more info." @echo >&2 "====================================================" endif endif diff --git a/board/hisilicon/hikey/build-tf.mak b/board/hisilicon/hikey/build-tf.mak index cebb34b61bdfe9871602f7a6e146b1998feea0c2..cde04827e8ea9d528a03f936e07a139084dbb45a 100644 --- a/board/hisilicon/hikey/build-tf.mak +++ b/board/hisilicon/hikey/build-tf.mak @@ -1,6 +1,6 @@ CROSS_COMPILE := aarch64-linux-gnu- output_dir := $(PWD)/../bin -makejobs := $(shell grep '^processor' /proc/cpuinfo | sort -u | wc -l) +makejobs := $(nproc) makethreads := $(shell dc -e "$(makejobs) 1 + p") make_options := GCC49_AARCH64_PREFIX=$CROSS_COMPILE \ -j$(makethreads) -l$(makejobs) diff --git a/board/hisilicon/poplar/MAINTAINERS b/board/hisilicon/poplar/MAINTAINERS index 622e5cb18edf7f66884dfee89f1263d9b7e4b325..9c045eaeb13ebed879c3ef629b0d6953495385fc 100644 --- a/board/hisilicon/poplar/MAINTAINERS +++ b/board/hisilicon/poplar/MAINTAINERS @@ -1,5 +1,5 @@ Poplar BOARD -M: Jorge Ramirez-Ortiz +M: Jorge Ramirez-Ortiz M: Shawn Guo S: Maintained F: board/hisilicon/poplar diff --git a/board/qualcomm/dragonboard820c/MAINTAINERS b/board/qualcomm/dragonboard820c/MAINTAINERS index a157033bf01ab0e95bccb2c4f40db3f4efc67851..7ef905bdf69cf495428d03cd63af80d2eb91cd1c 100644 --- a/board/qualcomm/dragonboard820c/MAINTAINERS +++ b/board/qualcomm/dragonboard820c/MAINTAINERS @@ -1,5 +1,5 @@ DRAGONBOARD820C BOARD -M: Jorge Ramirez-Ortiz +M: Jorge Ramirez-Ortiz S: Maintained F: board/qualcomm/dragonboard820c/ F: include/configs/dragonboard820c.h diff --git a/cmd/gpt.c b/cmd/gpt.c index 0c4349f4b2494a2bc6a4045e3eca62ee278b1691..964702bad43e91281d4e0a937143babdd5250dd0 100644 --- a/cmd/gpt.c +++ b/cmd/gpt.c @@ -633,21 +633,6 @@ static int do_disk_guid(struct blk_desc *dev_desc, char * const namestr) } #ifdef CONFIG_CMD_GPT_RENAME -/* - * There are 3 malloc() calls in set_gpt_info() and there is no info about which - * failed. - */ -static void set_gpt_cleanup(char **str_disk_guid, - disk_partition_t **partitions) -{ -#ifdef CONFIG_RANDOM_UUID - if (str_disk_guid) - free(str_disk_guid); -#endif - if (partitions) - free(partitions); -} - static int do_rename_gpt_parts(struct blk_desc *dev_desc, char *subcomm, char *name1, char *name2) { @@ -655,7 +640,7 @@ static int do_rename_gpt_parts(struct blk_desc *dev_desc, char *subcomm, struct disk_part *curr; disk_partition_t *new_partitions = NULL; char disk_guid[UUID_STR_LEN + 1]; - char *partitions_list, *str_disk_guid; + char *partitions_list, *str_disk_guid = NULL; u8 part_count = 0; int partlistlen, ret, numparts = 0, partnum, i = 1, ctr1 = 0, ctr2 = 0; @@ -697,14 +682,8 @@ static int do_rename_gpt_parts(struct blk_desc *dev_desc, char *subcomm, /* set_gpt_info allocates new_partitions and str_disk_guid */ ret = set_gpt_info(dev_desc, partitions_list, &str_disk_guid, &new_partitions, &part_count); - if (ret < 0) { - del_gpt_info(); - free(partitions_list); - if (ret == -ENOMEM) - set_gpt_cleanup(&str_disk_guid, &new_partitions); - else - goto out; - } + if (ret < 0) + goto out; if (!strcmp(subcomm, "swap")) { if ((strlen(name1) > PART_NAME_LEN) || (strlen(name2) > PART_NAME_LEN)) { @@ -766,14 +745,8 @@ static int do_rename_gpt_parts(struct blk_desc *dev_desc, char *subcomm, * Even though valid pointers are here passed into set_gpt_info(), * it mallocs again, and there's no way to tell which failed. */ - if (ret < 0) { - del_gpt_info(); - free(partitions_list); - if (ret == -ENOMEM) - set_gpt_cleanup(&str_disk_guid, &new_partitions); - else - goto out; - } + if (ret < 0) + goto out; debug("Writing new partition table\n"); ret = gpt_restore(dev_desc, disk_guid, new_partitions, numparts); @@ -795,10 +768,14 @@ static int do_rename_gpt_parts(struct blk_desc *dev_desc, char *subcomm, } printf("new partition table with %d partitions is:\n", numparts); print_gpt_info(); - del_gpt_info(); out: - free(new_partitions); - free(str_disk_guid); + del_gpt_info(); +#ifdef CONFIG_RANDOM_UUID + if (str_disk_guid) + free(str_disk_guid); +#endif + if (new_partitions) + free(new_partitions); free(partitions_list); return ret; } diff --git a/common/board_f.c b/common/board_f.c index 3f0132a6e339fd23e88857c0a83dae1ad8825d79..8fa26e3ca5488ab6aa22ee8f078195b89b400f7e 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -862,6 +862,11 @@ __weak int arch_cpu_init_dm(void) return 0; } +__weak int checkcpu(void) +{ + return 0; +} + static const init_fnc_t init_sequence_f[] = { setup_mon_len, #ifdef CONFIG_OF_CONTROL @@ -904,9 +909,7 @@ static const init_fnc_t init_sequence_f[] = { console_init_f, /* stage 1 init of console */ display_options, /* say that we are here */ display_text_info, /* show debugging info if required */ -#if defined(CONFIG_PPC) || defined(CONFIG_SH) || defined(CONFIG_X86) checkcpu, -#endif #if defined(CONFIG_SYSRESET) print_resetinfo, #endif diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c index 917d06b6e0d44d22047692e60fed0463caad3756..b234b41956a81bb749766d1670fd387415f710e5 100644 --- a/drivers/net/mvpp2.c +++ b/drivers/net/mvpp2.c @@ -580,7 +580,7 @@ enum mv_netc_lanes { /* Default number of TXQs in use */ #define MVPP2_DEFAULT_TXQ 1 -/* Dfault number of RXQs in use */ +/* Default number of RXQs in use */ #define MVPP2_DEFAULT_RXQ 1 #define CONFIG_MV_ETH_RXQ 8 /* increment by 8 */ diff --git a/lib/libfdt/fdt_ro.c b/lib/libfdt/fdt_ro.c index 560041b603e1a7a1928a5816bf76dc91bed38122..be03aea9eb006f4bf9d3f908003bd30ef1ca9363 100644 --- a/lib/libfdt/fdt_ro.c +++ b/lib/libfdt/fdt_ro.c @@ -183,8 +183,8 @@ int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size) if (fdt_chk_extra() && !re) return -FDT_ERR_BADOFFSET; - *address = fdt64_ld(&re->address); - *size = fdt64_ld(&re->size); + *address = fdt64_to_cpu(re->address); + *size = fdt64_to_cpu(re->size); return 0; } @@ -194,7 +194,7 @@ int fdt_num_mem_rsv(const void *fdt) const struct fdt_reserve_entry *re; for (i = 0; (re = fdt_mem_rsv(fdt, i)) != NULL; i++) { - if (fdt64_ld(&re->size) == 0) + if (fdt64_to_cpu(re->size) == 0) return i; } return -FDT_ERR_TRUNCATED; @@ -372,7 +372,7 @@ static const struct fdt_property *fdt_get_property_by_offset_(const void *fdt, prop = fdt_offset_ptr_(fdt, offset); if (lenp) - *lenp = fdt32_ld(&prop->len); + *lenp = fdt32_to_cpu(prop->len); return prop; } @@ -410,7 +410,7 @@ static const struct fdt_property *fdt_get_property_namelen_(const void *fdt, offset = -FDT_ERR_INTERNAL; break; } - if (fdt_string_eq_(fdt, fdt32_ld(&prop->nameoff), + if (fdt_string_eq_(fdt, fdt32_to_cpu(prop->nameoff), name, namelen)) { if (poffset) *poffset = offset; @@ -463,7 +463,7 @@ const void *fdt_getprop_namelen(const void *fdt, int nodeoffset, /* Handle realignment */ if (fdt_chk_version() && fdt_version(fdt) < 0x10 && - (poffset + sizeof(*prop)) % 8 && fdt32_ld(&prop->len) >= 8) + (poffset + sizeof(*prop)) % 8 && fdt32_to_cpu(prop->len) >= 8) return prop->data + 4; return prop->data; } @@ -481,7 +481,7 @@ const void *fdt_getprop_by_offset(const void *fdt, int offset, int namelen; if (fdt_chk_extra()) { - name = fdt_get_string(fdt, fdt32_ld(&prop->nameoff), + name = fdt_get_string(fdt, fdt32_to_cpu(prop->nameoff), &namelen); if (!name) { if (lenp) @@ -490,13 +490,13 @@ const void *fdt_getprop_by_offset(const void *fdt, int offset, } *namep = name; } else { - *namep = fdt_string(fdt, fdt32_ld(&prop->nameoff)); + *namep = fdt_string(fdt, fdt32_to_cpu(prop->nameoff)); } } /* Handle realignment */ if (fdt_chk_version() && fdt_version(fdt) < 0x10 && - (offset + sizeof(*prop)) % 8 && fdt32_ld(&prop->len) >= 8) + (offset + sizeof(*prop)) % 8 && fdt32_to_cpu(prop->len) >= 8) return prop->data + 4; return prop->data; } @@ -521,7 +521,7 @@ uint32_t fdt_get_phandle(const void *fdt, int nodeoffset) return 0; } - return fdt32_ld(php); + return fdt32_to_cpu(*php); } const char *fdt_get_alias_namelen(const void *fdt, diff --git a/lib/optee/optee.c b/lib/optee/optee.c index 9b49eb8ee760ae7bb3424f5d2e6e57d6b92364fc..d4355c6d0337781f25f0fc157100653f26ce0831 100644 --- a/lib/optee/optee.c +++ b/lib/optee/optee.c @@ -92,7 +92,7 @@ static int optee_copy_firmware_node(const void *old_blob, void *fdt_blob) offs = fdt_add_subnode(fdt_blob, offs, "optee"); if (offs < 0) - return ret; + return offs; /* copy the compatible property */ prop = fdt_getprop(old_blob, old_offs, "compatible", &len); diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l index fd825ebba69cb25e160e057f53bef994970093fc..24af549977584c33b302a470fe90fd9b42e6539d 100644 --- a/scripts/dtc/dtc-lexer.l +++ b/scripts/dtc/dtc-lexer.l @@ -38,7 +38,6 @@ LINECOMMENT "//".*\n #include "srcpos.h" #include "dtc-parser.tab.h" -YYLTYPE yylloc; extern bool treesource_error; /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ diff --git a/scripts/dtc/libfdt/fdt_ro.c b/scripts/dtc/libfdt/fdt_ro.c index e398815485d6d9a467c86f116575e7a348c17863..d9d52e0d56e6c22dc926584e28513623cabf0fc1 100644 --- a/scripts/dtc/libfdt/fdt_ro.c +++ b/scripts/dtc/libfdt/fdt_ro.c @@ -179,8 +179,8 @@ int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t *size) if (fdt_chk_extra() && !re) return -FDT_ERR_BADOFFSET; - *address = fdt64_ld(&re->address); - *size = fdt64_ld(&re->size); + *address = fdt64_to_cpu(re->address); + *size = fdt64_to_cpu(re->size); return 0; } @@ -190,7 +190,7 @@ int fdt_num_mem_rsv(const void *fdt) const struct fdt_reserve_entry *re; for (i = 0; (re = fdt_mem_rsv(fdt, i)) != NULL; i++) { - if (fdt64_ld(&re->size) == 0) + if (fdt64_to_cpu(re->size) == 0) return i; } return -FDT_ERR_TRUNCATED; @@ -368,7 +368,7 @@ static const struct fdt_property *fdt_get_property_by_offset_(const void *fdt, prop = fdt_offset_ptr_(fdt, offset); if (lenp) - *lenp = fdt32_ld(&prop->len); + *lenp = fdt32_to_cpu(prop->len); return prop; } @@ -406,7 +406,7 @@ static const struct fdt_property *fdt_get_property_namelen_(const void *fdt, offset = -FDT_ERR_INTERNAL; break; } - if (fdt_string_eq_(fdt, fdt32_ld(&prop->nameoff), + if (fdt_string_eq_(fdt, fdt32_to_cpu(prop->nameoff), name, namelen)) { if (poffset) *poffset = offset; @@ -459,7 +459,7 @@ const void *fdt_getprop_namelen(const void *fdt, int nodeoffset, /* Handle realignment */ if (fdt_chk_version() && fdt_version(fdt) < 0x10 && - (poffset + sizeof(*prop)) % 8 && fdt32_ld(&prop->len) >= 8) + (poffset + sizeof(*prop)) % 8 && fdt32_to_cpu(prop->len) >= 8) return prop->data + 4; return prop->data; } @@ -477,7 +477,7 @@ const void *fdt_getprop_by_offset(const void *fdt, int offset, int namelen; if (fdt_chk_extra()) { - name = fdt_get_string(fdt, fdt32_ld(&prop->nameoff), + name = fdt_get_string(fdt, fdt32_to_cpu(prop->nameoff), &namelen); if (!name) { if (lenp) @@ -486,13 +486,13 @@ const void *fdt_getprop_by_offset(const void *fdt, int offset, } *namep = name; } else { - *namep = fdt_string(fdt, fdt32_ld(&prop->nameoff)); + *namep = fdt_string(fdt, fdt32_to_cpu(prop->nameoff)); } } /* Handle realignment */ if (fdt_chk_version() && fdt_version(fdt) < 0x10 && - (offset + sizeof(*prop)) % 8 && fdt32_ld(&prop->len) >= 8) + (offset + sizeof(*prop)) % 8 && fdt32_to_cpu(prop->len) >= 8) return prop->data + 4; return prop->data; } @@ -517,7 +517,7 @@ uint32_t fdt_get_phandle(const void *fdt, int nodeoffset) return 0; } - return fdt32_ld(php); + return fdt32_to_cpu(*php); } const char *fdt_get_alias_namelen(const void *fdt, diff --git a/scripts/dtc/libfdt/libfdt.h b/scripts/dtc/libfdt/libfdt.h index 36fadcdea516a2294212e5aa002f485f03e06d4b..fa63fffe28e96899f3a5fb80fbc4df52990a96a5 100644 --- a/scripts/dtc/libfdt/libfdt.h +++ b/scripts/dtc/libfdt/libfdt.h @@ -117,23 +117,6 @@ static inline void *fdt_offset_ptr_w(void *fdt, int offset, int checklen) uint32_t fdt_next_tag(const void *fdt, int offset, int *nextoffset); -/* - * Alignment helpers: - * These helpers access words from a device tree blob. They're - * built to work even with unaligned pointers on platforms (ike - * ARM) that don't like unaligned loads and stores - */ - -static inline uint32_t fdt32_ld(const fdt32_t *p) -{ - const uint8_t *bp = (const uint8_t *)p; - - return ((uint32_t)bp[0] << 24) - | ((uint32_t)bp[1] << 16) - | ((uint32_t)bp[2] << 8) - | bp[3]; -} - static inline void fdt32_st(void *property, uint32_t value) { uint8_t *bp = (uint8_t *)property; @@ -144,20 +127,6 @@ static inline void fdt32_st(void *property, uint32_t value) bp[3] = value & 0xff; } -static inline uint64_t fdt64_ld(const fdt64_t *p) -{ - const uint8_t *bp = (const uint8_t *)p; - - return ((uint64_t)bp[0] << 56) - | ((uint64_t)bp[1] << 48) - | ((uint64_t)bp[2] << 40) - | ((uint64_t)bp[3] << 32) - | ((uint64_t)bp[4] << 24) - | ((uint64_t)bp[5] << 16) - | ((uint64_t)bp[6] << 8) - | bp[7]; -} - static inline void fdt64_st(void *property, uint64_t value) { uint8_t *bp = (uint8_t *)property; @@ -232,7 +201,7 @@ int fdt_next_subnode(const void *fdt, int offset); /* General functions */ /**********************************************************************/ #define fdt_get_header(fdt, field) \ - (fdt32_ld(&((const struct fdt_header *)(fdt))->field)) + (fdt32_to_cpu(((const struct fdt_header *)(fdt))->field)) #define fdt_magic(fdt) (fdt_get_header(fdt, magic)) #define fdt_totalsize(fdt) (fdt_get_header(fdt, totalsize)) #define fdt_off_dt_struct(fdt) (fdt_get_header(fdt, off_dt_struct)) diff --git a/test/common.sh b/test/common.sh index 702d1ed0513f51090143bc16c00f83bba93f4e24..904d579b7bfefcc5cbb1bba5afe61e396a26f472 100644 --- a/test/common.sh +++ b/test/common.sh @@ -13,7 +13,7 @@ fail() { build_uboot() { echo "Build sandbox" OPTS="O=${OUTPUT_DIR} $1" - NUM_CPUS=$(grep -c processor /proc/cpuinfo) + NUM_CPUS=$(nproc) echo ${OPTS} make ${OPTS} sandbox_config make ${OPTS} -s -j${NUM_CPUS} diff --git a/test/fs/fs-test.sh b/test/fs/fs-test.sh index 721af71d44ca659539c3537fd47248f446db9ca0..b87748106c7a3c9b3be6dcf405366aa33e7cd036 100755 --- a/test/fs/fs-test.sh +++ b/test/fs/fs-test.sh @@ -87,7 +87,7 @@ function check_clean() { # Generate sandbox U-Boot - gleaned from /test/dm/test-dm.sh function compile_sandbox() { unset CROSS_COMPILE - NUM_CPUS=$(cat /proc/cpuinfo |grep -c processor) + NUM_CPUS=$(nproc) make O=sandbox sandbox_config make O=sandbox -s -j${NUM_CPUS} diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index 784c64122ba67285f2552926527126b52ae6b1b8..3fd4fac6955349c9bbcc120ff4b9f74fcdf9f623 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -979,7 +979,7 @@ class Builder: The summary takes the form of one line per architecture. The line contains deltas for each of the sections (+ means the section - got bigger, - means smaller). The nunmbers are the average number + got bigger, - means smaller). The numbers are the average number of bytes that a board in this section increased by. For example: diff --git a/tools/concurrencytest/README.md b/tools/concurrencytest/README.md index 8e65776f178d8abb1b8fe5488986b42f128f517f..2d7fe75df536390a1e858d16cb255fd1227f36f0 100644 --- a/tools/concurrencytest/README.md +++ b/tools/concurrencytest/README.md @@ -16,8 +16,8 @@ pip install concurrencytest Requires: - * [testtools](https://pypi.python.org/pypi/testtools) : `pip install testtools` - * [python-subunit](https://pypi.python.org/pypi/python-subunit) : `pip install python-subunit` +* [testtools](https://pypi.python.org/pypi/testtools) : `pip install testtools` +* [python-subunit](https://pypi.python.org/pypi/python-subunit) : `pip install python-subunit` ----