Merge tag 'sh-for-4.8' of git://git.libc.org/linux-sh
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Aug 2016 13:00:05 +0000 (09:00 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Aug 2016 13:00:05 +0000 (09:00 -0400)
Pull arch/sh updates from Rich Felker:
 "These changes improve device tree support (including builtin DTB), add
  support for the J-Core J2 processor, an open source synthesizable
  reimplementation of the SH-2 ISA, resolve a longstanding sigcontext
  ABI mismatch issue, and fix various bugs including nommu-specific
  issues and minor regressions introduced in 4.6.

  The J-Core arch support is included here but to be usable it needs
  drivers that are waiting on approval/inclusion from their subsystem
  maintainers"

* tag 'sh-for-4.8' of git://git.libc.org/linux-sh: (23 commits)
  sh: add device tree source for J2 FPGA on Mimas v2 board
  sh: add defconfig for J-Core J2
  sh: use common clock framework with device tree boards
  sh: system call wire up
  sh: Delete unnecessary checks before the function call "mempool_destroy"
  sh: do not perform IPI-based cache flush except on boards that need it
  sh: add SMP support for J2
  sh: SMP support for SH2 entry.S
  sh: add working futex atomic ops on userspace addresses for smp
  sh: add J2 atomics using the cas.l instruction
  sh: add AT_HWCAP flag for J-Core cas.l instruction
  sh: add support for J-Core J2 processor
  sh: fix build regression with CONFIG_OF && !CONFIG_OF_FLATTREE
  sh: allow clocksource drivers to register sched_clock backends
  sh: make heartbeat driver explicitly non-modular
  sh: make board-secureedge5410 explicitly non-modular
  sh: make mm/asids-debugfs explicitly non-modular
  sh: make time.c explicitly non-modular
  sh: fix futex/robust_list on nommu models
  sh: disable aliased page logic on NOMMU models
  ...

1  2 
arch/sh/kernel/time.c

diff --combined arch/sh/kernel/time.c
index a4a7862b489a70ac7fe1b405a4586252e6b90ae1,bfe1de98d003f7f377b4a3013d4c7469b6c885c2..fcd5e41977d176709c3c8d14d89e32e31b4791c8
@@@ -11,7 -11,6 +11,6 @@@
   * for more details.
   */
  #include <linux/kernel.h>
- #include <linux/module.h>
  #include <linux/init.h>
  #include <linux/profile.h>
  #include <linux/timex.h>
@@@ -50,31 -49,27 +49,31 @@@ int update_persistent_clock(struct time
  }
  #endif
  
 -unsigned int get_rtc_time(struct rtc_time *tm)
 +static int rtc_generic_get_time(struct device *dev, struct rtc_time *tm)
  {
 -      if (rtc_sh_get_time != null_rtc_get_time) {
 -              struct timespec tv;
 +      struct timespec tv;
  
 -              rtc_sh_get_time(&tv);
 -              rtc_time_to_tm(tv.tv_sec, tm);
 -      }
 -
 -      return RTC_24H;
 +      rtc_sh_get_time(&tv);
 +      rtc_time_to_tm(tv.tv_sec, tm);
 +      return 0;
  }
 -EXPORT_SYMBOL(get_rtc_time);
  
 -int set_rtc_time(struct rtc_time *tm)
 +static int rtc_generic_set_time(struct device *dev, struct rtc_time *tm)
  {
        unsigned long secs;
  
        rtc_tm_to_time(tm, &secs);
 -      return rtc_sh_set_time(secs);
 +      if ((rtc_sh_set_time == null_rtc_set_time) ||
 +          (rtc_sh_set_time(secs) < 0))
 +              return -EOPNOTSUPP;
 +
 +      return 0;
  }
 -EXPORT_SYMBOL(set_rtc_time);
 +
 +static const struct rtc_class_ops rtc_generic_ops = {
 +      .read_time = rtc_generic_get_time,
 +      .set_time = rtc_generic_set_time,
 +};
  
  static int __init rtc_generic_init(void)
  {
        if (rtc_sh_get_time == null_rtc_get_time)
                return -ENODEV;
  
 -      pdev = platform_device_register_simple("rtc-generic", -1, NULL, 0);
 +      pdev = platform_device_register_data(NULL, "rtc-generic", -1,
 +                                           &rtc_generic_ops,
 +                                           sizeof(rtc_generic_ops));
 +
  
        return PTR_ERR_OR_ZERO(pdev);
  }
module_init(rtc_generic_init);
device_initcall(rtc_generic_init);
  
  void (*board_time_init)(void);
  
This page took 0.043924 seconds and 5 git commands to generate.