···9191 compensate for the board being designed with the lanes9292 swapped.93939494+ enet-phy-lane-no-swap:9595+ $ref: /schemas/types.yaml#/definitions/flag9696+ description:9797+ If set, indicates that PHY will disable swap of the9898+ TX/RX lanes. This property allows the PHY to work correcly after9999+ e.g. wrong bootstrap configuration caused by issues in PCB100100+ layout design.101101+94102 eee-broken-100tx:95103 $ref: /schemas/types.yaml#/definitions/flag96104 description:
···235235 }236236237237 reserve_regions();238238+ /*239239+ * For memblock manipulation, the cap should come after the memblock_add().240240+ * And now, memblock is fully populated, it is time to do capping.241241+ */242242+ early_init_dt_check_for_usable_mem_range();238243 efi_esrt_init();239244 efi_mokvar_table_init();240245
+13-6
drivers/of/fdt.c
···967967 elfcorehdr_addr, elfcorehdr_size);968968}969969970970-static phys_addr_t cap_mem_addr;971971-static phys_addr_t cap_mem_size;970970+static unsigned long chosen_node_offset = -FDT_ERR_NOTFOUND;972971973972/**974973 * early_init_dt_check_for_usable_mem_range - Decode usable memory range975974 * location from flat tree976976- * @node: reference to node containing usable memory range location ('chosen')977975 */978978-static void __init early_init_dt_check_for_usable_mem_range(unsigned long node)976976+void __init early_init_dt_check_for_usable_mem_range(void)979977{980978 const __be32 *prop;981979 int len;980980+ phys_addr_t cap_mem_addr;981981+ phys_addr_t cap_mem_size;982982+ unsigned long node = chosen_node_offset;983983+984984+ if ((long)node < 0)985985+ return;982986983987 pr_debug("Looking for usable-memory-range property... ");984988···995991996992 pr_debug("cap_mem_start=%pa cap_mem_size=%pa\n", &cap_mem_addr,997993 &cap_mem_size);994994+995995+ memblock_cap_memory_range(cap_mem_addr, cap_mem_size);998996}9999971000998#ifdef CONFIG_SERIAL_EARLYCON···11491143 if (node < 0)11501144 return -ENOENT;1151114511461146+ chosen_node_offset = node;11471147+11521148 early_init_dt_check_for_initrd(node);11531149 early_init_dt_check_for_elfcorehdr(node);11541154- early_init_dt_check_for_usable_mem_range(node);1155115011561151 /* Retrieve command line */11571152 p = of_get_flat_dt_prop(node, "bootargs", &l);···12871280 early_init_dt_scan_memory();1288128112891282 /* Handle linux,usable-memory-range property */12901290- memblock_cap_memory_range(cap_mem_addr, cap_mem_size);12831283+ early_init_dt_check_for_usable_mem_range();12911284}1292128512931286bool __init early_init_dt_scan(void *params)
+25-2
drivers/of/irq.c
···7676}7777EXPORT_SYMBOL_GPL(of_irq_find_parent);78787979+/*8080+ * These interrupt controllers abuse interrupt-map for unspeakable8181+ * reasons and rely on the core code to *ignore* it (the drivers do8282+ * their own parsing of the property).8383+ *8484+ * If you think of adding to the list for something *new*, think8585+ * again. There is a high chance that you will be sent back to the8686+ * drawing board.8787+ */8888+static const char * const of_irq_imap_abusers[] = {8989+ "CBEA,platform-spider-pic",9090+ "sti,platform-spider-pic",9191+ "realtek,rtl-intc",9292+ "fsl,ls1021a-extirq",9393+ "fsl,ls1043a-extirq",9494+ "fsl,ls1088a-extirq",9595+ "renesas,rza1-irqc",9696+ NULL,9797+};9898+7999/**80100 * of_irq_parse_raw - Low level interrupt tree parsing81101 * @addr: address specifier (start of "reg" property of the device) in be32 format···179159 /*180160 * Now check if cursor is an interrupt-controller and181161 * if it is then we are done, unless there is an182182- * interrupt-map which takes precedence.162162+ * interrupt-map which takes precedence except on one163163+ * of these broken platforms that want to parse164164+ * interrupt-map themselves for $reason.183165 */184166 bool intc = of_property_read_bool(ipar, "interrupt-controller");185167186168 imap = of_get_property(ipar, "interrupt-map", &imaplen);187187- if (imap == NULL && intc) {169169+ if (intc &&170170+ (!imap || of_device_compatible_match(ipar, of_irq_imap_abusers))) {188171 pr_debug(" -> got it !\n");189172 return 0;190173 }