Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Nov 2023 01:32:53 +0000 (15:32 -1000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 3 Nov 2023 01:32:53 +0000 (15:32 -1000)
Pull ARM updates from Russell King:

 - fix some kernel-doc warnings

 - fix stack depot IRQ stack filter

 - cast memset() byte to unsigned char

 - explicitly include correct DI includes

 - fix ARCH_LOW_ADDRESS_LIMIT with CONFIG_ZONE_DMA

 - fix get_user() problems when linker uses a veneer

 - make including linux/uaccess.h self-contained on ARM

* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: 9326/1: make <linux/uaccess.h> self-contained for ARM
  ARM: 9324/1: fix get_user() broken with veneer
  ARM: 9323/1: mm: Fix ARCH_LOW_ADDRESS_LIMIT when CONFIG_ZONE_DMA
  ARM: 9322/1: Explicitly include correct DT includes
  ARM: 9321/1: memset: cast the constant byte to unsigned char
  ARM: 9320/1: fix stack depot IRQ stack filter
  ARM: 9319/1: sa1111: fix sa1111_probe kernel-doc warnings

arch/arm/common/sa1111.c
arch/arm/include/asm/dma.h
arch/arm/include/asm/domain.h
arch/arm/include/asm/exception.h
arch/arm/include/asm/traps.h
arch/arm/include/asm/uaccess.h
arch/arm/kernel/devtree.c
arch/arm/kernel/setup.c
arch/arm/lib/memset.S

index 77c83ba..1fbd736 100644 (file)
@@ -785,19 +785,6 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
        return ret;
 }
 
-/**
- *     sa1111_probe - probe for a single SA1111 chip.
- *     @phys_addr: physical address of device.
- *
- *     Probe for a SA1111 chip.  This must be called
- *     before any other SA1111-specific code.
- *
- *     Returns:
- *     %-ENODEV        device not found.
- *     %-EBUSY         physical address already marked in-use.
- *     %-EINVAL        no platform data passed
- *     %0              successful.
- */
 static int __sa1111_probe(struct device *me, struct resource *mem, int irq)
 {
        struct sa1111_platform_data *pd = me->platform_data;
@@ -1108,6 +1095,20 @@ static int sa1111_resume_noirq(struct device *dev)
 #define sa1111_resume_noirq  NULL
 #endif
 
+/**
+ *     sa1111_probe - probe for a single SA1111 chip.
+ *     @pdev: platform device.
+ *
+ *     Probe for a SA1111 chip.  This must be called
+ *     before any other SA1111-specific code.
+ *
+ *     Returns:
+ *     * %-ENODEV      - device not found.
+ *     * %-ENOMEM      - memory allocation failure.
+ *     * %-EBUSY       - physical address already marked in-use.
+ *     * %-EINVAL      - no platform data passed
+ *     * %0            - successful.
+ */
 static int sa1111_probe(struct platform_device *pdev)
 {
        struct resource *mem;
index c6aded1..e2a1916 100644 (file)
@@ -12,6 +12,9 @@
        extern phys_addr_t arm_dma_zone_size; \
        arm_dma_zone_size && arm_dma_zone_size < (0x100000000ULL - PAGE_OFFSET) ? \
                (PAGE_OFFSET + arm_dma_zone_size) : 0xffffffffUL; })
+
+extern phys_addr_t arm_dma_limit;
+#define ARCH_LOW_ADDRESS_LIMIT arm_dma_limit
 #endif
 
 #ifdef CONFIG_ISA_DMA_API
index 41536fe..d48859f 100644 (file)
@@ -8,8 +8,8 @@
 #define __ASM_PROC_DOMAIN_H
 
 #ifndef __ASSEMBLY__
+#include <linux/thread_info.h>
 #include <asm/barrier.h>
-#include <asm/thread_info.h>
 #endif
 
 /*
index 58e039a..3c82975 100644 (file)
 
 #include <linux/interrupt.h>
 
-#ifdef CONFIG_FUNCTION_GRAPH_TRACER
 #define __exception_irq_entry  __irq_entry
-#else
-#define __exception_irq_entry
-#endif
 
 #endif /* __ASM_ARM_EXCEPTION_H */
index 0aaefe3..2621b9f 100644 (file)
@@ -2,6 +2,7 @@
 #ifndef _ASMARM_TRAP_H
 #define _ASMARM_TRAP_H
 
+#include <linux/linkage.h>
 #include <linux/list.h>
 
 struct pt_regs;
@@ -28,7 +29,7 @@ static inline int __in_irqentry_text(unsigned long ptr)
               ptr < (unsigned long)&__irqentry_text_end;
 }
 
-extern void __init early_trap_init(void *);
+extern void early_trap_init(void *);
 extern void dump_backtrace_entry(unsigned long where, unsigned long from,
                                 unsigned long frame, const char *loglvl);
 extern void ptrace_break(struct pt_regs *regs);
index bb5c818..9556d04 100644 (file)
@@ -8,6 +8,7 @@
 /*
  * User space memory access functions
  */
+#include <linux/kernel.h>
 #include <linux/string.h>
 #include <asm/page.h>
 #include <asm/domain.h>
@@ -109,16 +110,6 @@ extern int __get_user_64t_1(void *);
 extern int __get_user_64t_2(void *);
 extern int __get_user_64t_4(void *);
 
-#define __GUP_CLOBBER_1        "lr", "cc"
-#ifdef CONFIG_CPU_USE_DOMAINS
-#define __GUP_CLOBBER_2        "ip", "lr", "cc"
-#else
-#define __GUP_CLOBBER_2 "lr", "cc"
-#endif
-#define __GUP_CLOBBER_4        "lr", "cc"
-#define __GUP_CLOBBER_32t_8 "lr", "cc"
-#define __GUP_CLOBBER_8        "lr", "cc"
-
 #define __get_user_x(__r2, __p, __e, __l, __s)                         \
           __asm__ __volatile__ (                                       \
                __asmeq("%0", "r0") __asmeq("%1", "r2")                 \
@@ -126,7 +117,7 @@ extern int __get_user_64t_4(void *);
                "bl     __get_user_" #__s                               \
                : "=&r" (__e), "=r" (__r2)                              \
                : "0" (__p), "r" (__l)                                  \
-               : __GUP_CLOBBER_##__s)
+               : "ip", "lr", "cc")
 
 /* narrowing a double-word get into a single 32bit word register: */
 #ifdef __ARMEB__
@@ -148,7 +139,7 @@ extern int __get_user_64t_4(void *);
                "bl     __get_user_64t_" #__s                           \
                : "=&r" (__e), "=r" (__r2)                              \
                : "0" (__p), "r" (__l)                                  \
-               : __GUP_CLOBBER_##__s)
+               : "ip", "lr", "cc")
 #else
 #define __get_user_x_64t __get_user_x
 #endif
index 2648272..fdb74e6 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/of.h>
 #include <linux/of_fdt.h>
 #include <linux/of_irq.h>
-#include <linux/of_platform.h>
 #include <linux/smp.h>
 
 #include <asm/cputype.h>
index c66b560..15eca80 100644 (file)
 #include <linux/console.h>
 #include <linux/seq_file.h>
 #include <linux/screen_info.h>
-#include <linux/of_platform.h>
 #include <linux/init.h>
 #include <linux/kexec.h>
 #include <linux/libfdt.h>
+#include <linux/of.h>
 #include <linux/of_fdt.h>
 #include <linux/cpu.h>
 #include <linux/interrupt.h>
index d71ab61..de75ae4 100644 (file)
@@ -17,6 +17,7 @@ ENTRY(__memset)
 ENTRY(mmioset)
 WEAK(memset)
 UNWIND( .fnstart         )
+       and     r1, r1, #255            @ cast to unsigned char
        ands    r3, r0, #3              @ 1 unaligned?
        mov     ip, r0                  @ preserve r0 as return value
        bne     6f                      @ 1