Skip to content

Commit c19e6e1

Browse files
Greg Ungerergregkh
Greg Ungerer
authored andcommitted
m68knommu: fix undefined reference to `mach_get_rtc_pll'
[ Upstream commit 1300eec ] Configuring for a nommu classic m68k target and enabling the generic rtc driver (CONFIG_RTC_DRV_GENERIC) will result in the following compile error: m68k-linux-ld: arch/m68k/kernel/time.o: in function `rtc_ioctl': time.c:(.text+0x82): undefined reference to `mach_get_rtc_pll' m68k-linux-ld: time.c:(.text+0xbc): undefined reference to `mach_set_rtc_pll' m68k-linux-ld: time.c:(.text+0xf4): undefined reference to `mach_set_rtc_pll' There are no definitions of "mach_set_rtc_pll" and "mach_get_rtc_pll" in the nommu code paths. Move these definitions and the associated "mach_hwclk", so that they are around their use case in time.c. This means they will always be defined on the builds that require them, and not on those that cannot use them - such as ColdFire (both with and without MMU enabled). Reported-by: kernel test robot <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Ungerer <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 3ba83e4 commit c19e6e1

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

arch/m68k/kernel/setup_mm.c

-7
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,8 @@ void (*mach_sched_init) (void) __initdata = NULL;
8787
void (*mach_init_IRQ) (void) __initdata = NULL;
8888
void (*mach_get_model) (char *model);
8989
void (*mach_get_hardware_list) (struct seq_file *m);
90-
/* machine dependent timer functions */
91-
int (*mach_hwclk) (int, struct rtc_time*);
92-
EXPORT_SYMBOL(mach_hwclk);
9390
unsigned int (*mach_get_ss)(void);
94-
int (*mach_get_rtc_pll)(struct rtc_pll_info *);
95-
int (*mach_set_rtc_pll)(struct rtc_pll_info *);
9691
EXPORT_SYMBOL(mach_get_ss);
97-
EXPORT_SYMBOL(mach_get_rtc_pll);
98-
EXPORT_SYMBOL(mach_set_rtc_pll);
9992
void (*mach_reset)( void );
10093
void (*mach_halt)( void );
10194
void (*mach_power_off)( void );

arch/m68k/kernel/setup_no.c

-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ char __initdata command_line[COMMAND_LINE_SIZE];
5050

5151
/* machine dependent timer functions */
5252
void (*mach_sched_init)(void) __initdata = NULL;
53-
int (*mach_hwclk) (int, struct rtc_time*);
5453

5554
/* machine dependent reboot functions */
5655
void (*mach_reset)(void);

arch/m68k/kernel/time.c

+9
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ void timer_heartbeat(void)
6363
#endif /* CONFIG_HEARTBEAT */
6464

6565
#ifdef CONFIG_M68KCLASSIC
66+
/* machine dependent timer functions */
67+
int (*mach_hwclk) (int, struct rtc_time*);
68+
EXPORT_SYMBOL(mach_hwclk);
69+
70+
int (*mach_get_rtc_pll)(struct rtc_pll_info *);
71+
int (*mach_set_rtc_pll)(struct rtc_pll_info *);
72+
EXPORT_SYMBOL(mach_get_rtc_pll);
73+
EXPORT_SYMBOL(mach_set_rtc_pll);
74+
6675
#if !IS_BUILTIN(CONFIG_RTC_DRV_GENERIC)
6776
void read_persistent_clock64(struct timespec64 *ts)
6877
{

0 commit comments

Comments
 (0)