Commit 47ce834f authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'xtensa-20240117' of https://github.com/jcmvbkbc/linux-xtensa

Pull Xtensa updates from Max Filippov:

 - small cleanups in the xtensa PCI and asmmacro code

 - fix kernel build with FDPIC toolchain

* tag 'xtensa-20240117' of https://github.com/jcmvbkbc/linux-xtensa:
  xtensa: don't produce FDPIC output with fdpic toolchain
  xtensa: Use PCI_HEADER_TYPE_MFD instead of literal
  xtensa: replace <asm-generic/export.h> with <linux/export.h>
  xtensa: fix variants path in the Kconfig help
parents c4c6044d a03cd760
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@ config XTENSA_VARIANT_CUSTOM_NAME
	depends on XTENSA_VARIANT_CUSTOM
	help
	  Provide the name of a custom Xtensa processor variant.
	  This CORENAME selects arch/xtensa/variant/CORENAME.
	  This CORENAME selects arch/xtensa/variants/CORENAME.
	  Don't forget you have to select MMU if you have one.

config XTENSA_VARIANT_NAME
+5 −1
Original line number Diff line number Diff line
@@ -35,15 +35,19 @@ KBUILD_CFLAGS += -ffreestanding -D__linux__
KBUILD_CFLAGS += -pipe -mlongcalls -mtext-section-literals
KBUILD_CFLAGS += $(call cc-option,-mforce-no-pic,)
KBUILD_CFLAGS += $(call cc-option,-mno-serialize-volatile,)
KBUILD_CFLAGS += $(call cc-option,-mno-fdpic,)
ifneq ($(CONFIG_KERNEL_ABI_CALL0),)
KBUILD_CFLAGS += -mabi=call0
KBUILD_AFLAGS += -mabi=call0
endif

KBUILD_AFLAGS += -mlongcalls -mtext-section-literals
KBUILD_AFLAGS += $(call cc-option,-mno-fdpic,)

KBUILD_LDFLAGS += -m elf32xtensa

ifneq ($(CONFIG_LD_NO_RELAX),)
KBUILD_LDFLAGS := --no-relax
KBUILD_LDFLAGS += --no-relax
endif

CHECKFLAGS += -D$(if $(CONFIG_CPU_BIG_ENDIAN),__XTENSA_EB__,__XTENSA_EL__)
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
#ifndef _XTENSA_ASMMACRO_H
#define _XTENSA_ASMMACRO_H

#include <asm-generic/export.h>
#include <linux/export.h>
#include <asm/core.h>

/*
+5 −3
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
 * Based on work from Matt Porter <mporter@mvista.com>
 */

#include <linux/bitfield.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/pci.h>
@@ -222,10 +223,11 @@ pciauto_postscan_setup_bridge(struct pci_dev *dev, int current_bus, int sub_bus,

int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus)
{
	int sub_bus, pci_devfn, pci_class, cmdstat, found_multi=0;
	int sub_bus, pci_devfn, pci_class, cmdstat;
	unsigned short vid;
	unsigned char header_type;
	struct pci_dev *dev = &pciauto_dev;
	bool found_multi = false;

	pciauto_dev.bus = &pciauto_bus;
	pciauto_dev.sysdata = pci_ctrl;
@@ -261,11 +263,11 @@ int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus)
			continue;

		if (!PCI_FUNC(pci_devfn))
			found_multi = header_type & 0x80;
			found_multi = FIELD_GET(PCI_HEADER_TYPE_MFD, header_type);
		pci_read_config_word(dev, PCI_VENDOR_ID, &vid);

		if (vid == 0xffff || vid == 0x0000) {
			found_multi = 0;
			found_multi = false;
			continue;
		}