]> Git Repo - linux.git/commitdiff
Merge tag 'm68knommu-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <[email protected]>
Mon, 30 May 2022 17:56:18 +0000 (10:56 -0700)
committerLinus Torvalds <[email protected]>
Mon, 30 May 2022 17:56:18 +0000 (10:56 -0700)
Pull m68knommu updates from Greg Ungerer:
 "A collection of changes to add elf-fdpic loader support for m68k.

  Also a collection of various fixes. They include typo corrections,
  undefined symbol compilation fixes, removal of the ISA_DMA_API support
  and removal of unused code.

  Summary:

   - correctly set up ZERO_PAGE pointer

   - drop ISA_DMA_API support

   - fix comment typos

   - fixes for undefined symbols

   - remove unused code and variables

   - elf-fdpic loader support for m68k"

* tag 'm68knommu-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
  m68knommu: fix 68000 CPU link with no platform selected
  m68k: removed unused "mach_get_ss"
  m68knommu: fix undefined reference to `mach_get_rtc_pll'
  m68knommu: fix undefined reference to `_init_sp'
  m68knommu: allow elf_fdpic loader to be selected
  m68knommu: add definitions to support elf_fdpic program loader
  m68knommu: implement minimal regset support
  m68knommu: use asm-generic/mmu.h for nommu setups
  m68k: fix typos in comments
  m68k: coldfire: drop ISA_DMA_API support
  m68knommu: set ZERO_PAGE() to the allocated zeroed page

1  2 
arch/m68k/Kconfig.cpu
arch/m68k/Kconfig.machine
arch/m68k/kernel/ptrace.c
arch/m68k/kernel/setup_mm.c
fs/Kconfig.binfmt

diff --combined arch/m68k/Kconfig.cpu
index 3d5da25c73b5af8aa70f5dbe745557bd6298b49b,ed719a855e6a9126f74827fbba65330124fd18a0..f3aa44156969b523554d24f46733b979a1d4b391
@@@ -37,7 -37,7 +37,7 @@@ endchoic
  if M68KCLASSIC
  
  config M68000
-       bool
+       def_bool y
        depends on !MMU
        select CPU_HAS_NO_BITFIELDS
        select CPU_HAS_NO_CAS
@@@ -327,7 -327,7 +327,7 @@@ comment "Processor Specific Options
  
  config M68KFPU_EMU
        bool "Math emulation support"
 -      depends on MMU
 +      depends on M68KCLASSIC && FPU
        help
          At some point in the future, this will cause floating-point math
          instructions to be emulated by the kernel on machines that lack a
index 188a8f8a0104ae545dfed5e268df88fd2765a5e7,946853a08502e5d73bdd1fb986a90c0e6e764984..a1042568b9ad1590231b4e5cd488b79131bee24f
@@@ -149,23 -149,6 +149,23 @@@ config SUN
  
          If you don't want to compile a kernel exclusively for a Sun 3, say N.
  
 +config VIRT
 +      bool "Virtual M68k Machine support"
 +      depends on MMU
 +      select GENERIC_CLOCKEVENTS
 +      select GOLDFISH
 +      select GOLDFISH_TIMER
 +      select GOLDFISH_TTY
 +      select M68040
 +      select MMU_MOTOROLA if MMU
 +      select RTC_CLASS
 +      select RTC_DRV_GOLDFISH
 +      select TTY
 +      select VIRTIO_MMIO
 +      help
 +        This options enable a pure virtual machine based on m68k,
 +        VIRTIO MMIO devices and GOLDFISH interfaces (TTY, RTC, PIC)
 +
  config PILOT
        bool
  
@@@ -352,6 -335,7 +352,7 @@@ comment "Machine Options
  
  config UBOOT
        bool "Support for U-Boot command line parameters"
+       depends on COLDFIRE
        help
          If you say Y here kernel will try to collect command
          line parameters from the initial u-boot stack.
index daebccdd2c09398d8ebe61b46b830f1fe0602c94,4349b9c4dd680e46f8c51acfe6d985ced3b8b097..0a4184a37461b0ab40fe559e07ce57dd46664abb
@@@ -19,6 -19,8 +19,8 @@@
  #include <linux/ptrace.h>
  #include <linux/user.h>
  #include <linux/signal.h>
+ #include <linux/regset.h>
+ #include <linux/elf.h>
  
  #include <linux/uaccess.h>
  #include <asm/page.h>
@@@ -270,6 -272,12 +272,6 @@@ out_eio
        return -EIO;
  }
  
 -asmlinkage void syscall_trace(void)
 -{
 -      ptrace_report_syscall(0);
 -}
 -
 -#if defined(CONFIG_COLDFIRE) || !defined(CONFIG_MMU)
  asmlinkage int syscall_trace_enter(void)
  {
        int ret = 0;
@@@ -284,3 -292,60 +286,59 @@@ asmlinkage void syscall_trace_leave(voi
        if (test_thread_flag(TIF_SYSCALL_TRACE))
                ptrace_report_syscall_exit(task_pt_regs(current), 0);
  }
 -#endif /* CONFIG_COLDFIRE */
+ #if defined(CONFIG_BINFMT_ELF_FDPIC) && defined(CONFIG_ELF_CORE)
+ /*
+  * Currently the only thing that needs to use regsets for m68k is the
+  * coredump support of the elf_fdpic loader. Implement the minimum
+  * definitions required for that.
+  */
+ static int m68k_regset_get(struct task_struct *target,
+                          const struct user_regset *regset,
+                          struct membuf to)
+ {
+       struct pt_regs *ptregs = task_pt_regs(target);
+       u32 uregs[ELF_NGREG];
+       ELF_CORE_COPY_REGS(uregs, ptregs);
+       return membuf_write(&to, uregs, sizeof(uregs));
+ }
+ enum m68k_regset {
+       REGSET_GPR,
+ #ifdef CONFIG_FPU
+       REGSET_FPU,
+ #endif
+ };
+ static const struct user_regset m68k_user_regsets[] = {
+       [REGSET_GPR] = {
+               .core_note_type = NT_PRSTATUS,
+               .n = ELF_NGREG,
+               .size = sizeof(u32),
+               .align = sizeof(u16),
+               .regset_get = m68k_regset_get,
+       },
+ #ifdef CONFIG_FPU
+       [REGSET_FPU] = {
+               .core_note_type = NT_PRFPREG,
+               .n = sizeof(struct user_m68kfp_struct) / sizeof(u32),
+               .size = sizeof(u32),
+               .align = sizeof(u32),
+       }
+ #endif /* CONFIG_FPU */
+ };
+ static const struct user_regset_view user_m68k_view = {
+       .name = "m68k",
+       .e_machine = EM_68K,
+       .ei_osabi = ELF_OSABI,
+       .regsets = m68k_user_regsets,
+       .n = ARRAY_SIZE(m68k_user_regsets)
+ };
+ const struct user_regset_view *task_user_regset_view(struct task_struct *task)
+ {
+       return &user_m68k_view;
+ }
+ #endif /* CONFIG_BINFMT_ELF_FDPIC && CONFIG_ELF_CORE */
index 78ab562beb315f87b9abb7aed46db92056c1074a,0593bf345b34a035405fb3f6bcede0cbc055bc90..656841defd2aabd0f756efd2c4a12168b8344c12
@@@ -87,15 -87,6 +87,6 @@@ void (*mach_sched_init) (void) __initda
  void (*mach_init_IRQ) (void) __initdata = NULL;
  void (*mach_get_model) (char *model);
  void (*mach_get_hardware_list) (struct seq_file *m);
- /* machine dependent timer functions */
- int (*mach_hwclk) (int, struct rtc_time*);
- EXPORT_SYMBOL(mach_hwclk);
- unsigned int (*mach_get_ss)(void);
- int (*mach_get_rtc_pll)(struct rtc_pll_info *);
- int (*mach_set_rtc_pll)(struct rtc_pll_info *);
- EXPORT_SYMBOL(mach_get_ss);
- EXPORT_SYMBOL(mach_get_rtc_pll);
- EXPORT_SYMBOL(mach_set_rtc_pll);
  void (*mach_reset)( void );
  void (*mach_halt)( void );
  void (*mach_power_off)( void );
@@@ -181,8 -172,6 +172,8 @@@ static void __init m68k_parse_bootinfo(
                                unknown = hp300_parse_bootinfo(record);
                        else if (MACH_IS_APOLLO)
                                unknown = apollo_parse_bootinfo(record);
 +                      else if (MACH_IS_VIRT)
 +                              unknown = virt_parse_bootinfo(record);
                        else
                                unknown = 1;
                }
@@@ -313,11 -302,6 +304,11 @@@ void __init setup_arch(char **cmdline_p
                cf_mmu_context_init();
                config_BSP(NULL, 0);
                break;
 +#endif
 +#ifdef CONFIG_VIRT
 +      case MACH_VIRT:
 +              config_virt();
 +              break;
  #endif
        default:
                panic("No configuration setup");
diff --combined fs/Kconfig.binfmt
index 32dff7ba3ddaaf12ff34505c679c62fda5a2d738,fb325b3aa4b01f95381fb7d4eaa13389f59aefc7..21e154516bf297e35bfbd9884731110609315698
@@@ -58,7 -58,7 +58,7 @@@ config ARCH_USE_GNU_PROPERT
  config BINFMT_ELF_FDPIC
        bool "Kernel support for FDPIC ELF binaries"
        default y if !BINFMT_ELF
-       depends on (ARM || (SUPERH && !MMU))
+       depends on ARM || ((M68K || SUPERH) && !MMU)
        select ELFCORE
        help
          ELF FDPIC binaries are based on ELF, but allow the individual load
@@@ -142,6 -142,12 +142,6 @@@ config BINFMT_ZFLA
        help
          Support FLAT format compressed binaries
  
 -config BINFMT_SHARED_FLAT
 -      bool "Enable shared FLAT support"
 -      depends on BINFMT_FLAT
 -      help
 -        Support FLAT shared libraries
 -
  config HAVE_AOUT
         def_bool n
  
This page took 0.091155 seconds and 4 git commands to generate.