Commit fbb3c22f authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'sparc-for-6.13-tag1' of...

Merge tag 'sparc-for-6.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc

Pull sparc updates from Andreas Larsson:

 - Make sparc64 compilable with clang

 - Replace one-element array with flexible array member

* tag 'sparc-for-6.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc:
  sparc/vdso: Add helper function for 64-bit right shift on 32-bit target
  sparc: Replace one-element array with flexible array member
  sparc/build: Add SPARC target flags for compiling with clang
  sparc/build: Put usage of -fcall-used* flags behind cc-option
parents f1516701 b6370b33
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -179,6 +179,9 @@ yet. Bug reports are always welcome at the issue tracker below!
   * - s390
     - Maintained
     - ``LLVM=1`` (LLVM >= 18.1.0), ``CC=clang`` (LLVM < 18.1.0)
   * - sparc (sparc64 only)
     - Maintained
     - ``CC=clang LLVM_IAS=0`` (LLVM >= 20)
   * - um (User Mode)
     - Maintained
     - ``LLVM=1``
+2 −2
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ UTS_MACHINE := sparc
# versions of gcc.  Some gcc versions won't pass -Av8 to binutils when you
# give -mcpu=v8.  This silently worked with older bintutils versions but
# does not any more.
KBUILD_CFLAGS  += -m32 -mcpu=v8 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
KBUILD_CFLAGS  += -m32 -mcpu=v8 -pipe -mno-fpu $(call cc-option,-fcall-used-g5) $(call cc-option,-fcall-used-g7)
KBUILD_CFLAGS  += -Wa,-Av8

KBUILD_AFLAGS  += -m32 -Wa,-Av8
@@ -45,7 +45,7 @@ export BITS := 64
UTS_MACHINE   := sparc64

KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow
KBUILD_CFLAGS += -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare
KBUILD_CFLAGS += -ffixed-g4 -ffixed-g5 $(call cc-option,-fcall-used-g7) -Wno-sign-compare
KBUILD_CFLAGS += -Wa,--undeclared-regs
KBUILD_CFLAGS += $(call cc-option,-mtune=ultrasparc3)
KBUILD_AFLAGS += -m64 -mcpu=ultrasparc -Wa,--undeclared-regs
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ struct hvtramp_descr {
	__u64			fault_info_va;
	__u64			fault_info_pa;
	__u64			thread_reg;
	struct hvtramp_mapping	maps[1];
	struct hvtramp_mapping	maps[];
};

void hv_cpu_startup(unsigned long hvdescr_pa);
+1 −3
Original line number Diff line number Diff line
@@ -297,9 +297,7 @@ static void ldom_startcpu_cpuid(unsigned int cpu, unsigned long thread_reg,
	unsigned long hv_err;
	int i;

	hdesc = kzalloc(sizeof(*hdesc) +
			(sizeof(struct hvtramp_mapping) *
			 num_kernel_image_mappings - 1),
	hdesc = kzalloc(struct_size(hdesc, maps, num_kernel_image_mappings),
			GFP_KERNEL);
	if (!hdesc) {
		printk(KERN_ERR "ldom_startcpu_cpuid: Cannot allocate "
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ CFL := $(PROFILING) -mcmodel=medlow -fPIC -O2 -fasynchronous-unwind-tables -m64
       -fno-omit-frame-pointer -foptimize-sibling-calls \
       -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO

SPARC_REG_CFLAGS = -ffixed-g4 -ffixed-g5 -fcall-used-g5 -fcall-used-g7
SPARC_REG_CFLAGS = -ffixed-g4 -ffixed-g5 $(call cc-option,-fcall-used-g5) $(call cc-option,-fcall-used-g7)

$(vobjs): KBUILD_CFLAGS := $(filter-out $(RANDSTRUCT_CFLAGS) $(GCC_PLUGINS_CFLAGS) $(SPARC_REG_CFLAGS),$(KBUILD_CFLAGS)) $(CFL)

Loading