Skip to content

Commit 47ce834

Browse files
committed
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
2 parents c4c6044 + a03cd76 commit 47ce834

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

arch/xtensa/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ config XTENSA_VARIANT_CUSTOM_NAME
144144
depends on XTENSA_VARIANT_CUSTOM
145145
help
146146
Provide the name of a custom Xtensa processor variant.
147-
This CORENAME selects arch/xtensa/variant/CORENAME.
147+
This CORENAME selects arch/xtensa/variants/CORENAME.
148148
Don't forget you have to select MMU if you have one.
149149

150150
config XTENSA_VARIANT_NAME

arch/xtensa/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,19 @@ KBUILD_CFLAGS += -ffreestanding -D__linux__
3535
KBUILD_CFLAGS += -pipe -mlongcalls -mtext-section-literals
3636
KBUILD_CFLAGS += $(call cc-option,-mforce-no-pic,)
3737
KBUILD_CFLAGS += $(call cc-option,-mno-serialize-volatile,)
38+
KBUILD_CFLAGS += $(call cc-option,-mno-fdpic,)
3839
ifneq ($(CONFIG_KERNEL_ABI_CALL0),)
3940
KBUILD_CFLAGS += -mabi=call0
4041
KBUILD_AFLAGS += -mabi=call0
4142
endif
4243

4344
KBUILD_AFLAGS += -mlongcalls -mtext-section-literals
45+
KBUILD_AFLAGS += $(call cc-option,-mno-fdpic,)
46+
47+
KBUILD_LDFLAGS += -m elf32xtensa
4448

4549
ifneq ($(CONFIG_LD_NO_RELAX),)
46-
KBUILD_LDFLAGS := --no-relax
50+
KBUILD_LDFLAGS += --no-relax
4751
endif
4852

4953
CHECKFLAGS += -D$(if $(CONFIG_CPU_BIG_ENDIAN),__XTENSA_EB__,__XTENSA_EL__)

arch/xtensa/include/asm/asmmacro.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#ifndef _XTENSA_ASMMACRO_H
1212
#define _XTENSA_ASMMACRO_H
1313

14-
#include <asm-generic/export.h>
14+
#include <linux/export.h>
1515
#include <asm/core.h>
1616

1717
/*

arch/xtensa/lib/pci-auto.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* Based on work from Matt Porter <mporter@mvista.com>
1212
*/
1313

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

223224
int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus)
224225
{
225-
int sub_bus, pci_devfn, pci_class, cmdstat, found_multi=0;
226+
int sub_bus, pci_devfn, pci_class, cmdstat;
226227
unsigned short vid;
227228
unsigned char header_type;
228229
struct pci_dev *dev = &pciauto_dev;
230+
bool found_multi = false;
229231

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

263265
if (!PCI_FUNC(pci_devfn))
264-
found_multi = header_type & 0x80;
266+
found_multi = FIELD_GET(PCI_HEADER_TYPE_MFD, header_type);
265267
pci_read_config_word(dev, PCI_VENDOR_ID, &vid);
266268

267269
if (vid == 0xffff || vid == 0x0000) {
268-
found_multi = 0;
270+
found_multi = false;
269271
continue;
270272
}
271273

0 commit comments

Comments
 (0)