lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1c7894fe-4cf4-1ad9-5ed2-aaab4351ff4c@linux-m68k.org>
Date:   Fri, 8 Sep 2023 09:44:21 +1000 (AEST)
From:   Finn Thain <fthain@...ux-m68k.org>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
cc:     linux-m68k@...ts.linux-m68k.org, Arnd Bergmann <arnd@...db.de>,
        Michael Schmitz <schmitzmic@...il.com>,
        Philip Blundell <philb@....org>,
        Greg Ungerer <gerg@...ux-m68k.org>,
        Joshua Thompson <funaho@...ai.org>,
        Sam Creasey <sammy@...my.net>,
        Laurent Vivier <laurent@...ier.eu>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 32/52] m68k: mac: Add and use "mac.h"


On Thu, 7 Sep 2023, Geert Uytterhoeven wrote:

> diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
> index a7d280220662c747..5c97a7058bcdee2e 100644
> --- a/arch/m68k/mac/baboon.c
> +++ b/arch/m68k/mac/baboon.c
> @@ -15,6 +15,8 @@
>  #include <asm/macints.h>
>  #include <asm/mac_baboon.h>
>  
> +#include "mac.h"
> +
>  int baboon_present;
>  static volatile struct baboon *baboon;
>  
> diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
> index d56affefd5cabeb5..e324410ef239c09f 100644
> --- a/arch/m68k/mac/config.c
> +++ b/arch/m68k/mac/config.c
> @@ -50,22 +50,14 @@
>  #include <asm/mac_psc.h>
>  #include <asm/config.h>
>  
> +#include "mac.h"
> +
>  /* Mac bootinfo struct */
>  struct mac_booter_data mac_bi_data;
>  
>  /* The phys. video addr. - might be bogus on some machines */
>  static unsigned long mac_orig_videoaddr;
>  
> -extern int mac_hwclk(int, struct rtc_time *);
> -extern void iop_init(void);
> -extern void via_init(void);
> -extern void via_init_clock(void);
> -extern void oss_init(void);
> -extern void psc_init(void);
> -extern void baboon_init(void);
> -
> -extern void mac_mksound(unsigned int, unsigned int);
> -
>  static void mac_get_model(char *str);
>  static void mac_identify(void);
>  static void mac_report_hardware(void);
> diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c
> index 010b3b5ae8e8584a..a92740d530ac4fbe 100644
> --- a/arch/m68k/mac/iop.c
> +++ b/arch/m68k/mac/iop.c
> @@ -119,6 +119,8 @@
>  #include <asm/macints.h>
>  #include <asm/mac_iop.h>
>  
> +#include "mac.h"
> +
>  #ifdef DEBUG
>  #define iop_pr_debug(fmt, ...) \
>  	printk(KERN_DEBUG "%s: " fmt, __func__, ##__VA_ARGS__)
> diff --git a/arch/m68k/mac/mac.h b/arch/m68k/mac/mac.h
> new file mode 100644
> index 0000000000000000..d3d142cea3b4b911
> --- /dev/null
> +++ b/arch/m68k/mac/mac.h
> @@ -0,0 +1,25 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +
> +struct rtc_time;
> +

I don't think we need a new header file. Related function prototypes 
already have homes in existing header files --

> +/* baboon.c */
> +void baboon_init(void);
> +

this could go into mac_baboon.h

> +/* iop.c */
> +void iop_init(void);
> +

mac_iop.h

> +/* misc.c */
> +int mac_hwclk(int op, struct rtc_time *t);
> +

macintosh.h

> +/* macboing.c */
> +void mac_mksound(unsigned int freq, unsigned int length);
> +

mac_asc.h

> +/* oss.c */
> +void oss_init(void);
> +

mac_oss.h

> +/* psc.c */
> +void psc_init(void);
> +

mac_psc.h

> +/* via.c */
> +void via_init(void);
> +void via_init_clock(void);

mac_via.h

> diff --git a/arch/m68k/mac/macboing.c b/arch/m68k/mac/macboing.c
> index 76431241347682fc..faea2265a540192d 100644
> --- a/arch/m68k/mac/macboing.c
> +++ b/arch/m68k/mac/macboing.c
> @@ -16,6 +16,8 @@
>  #include <asm/macintosh.h>
>  #include <asm/mac_asc.h>
>  
> +#include "mac.h"
> +
>  static int mac_asc_inited;
>  /*
>   * dumb triangular wave table
> diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c
> index 65107abc8848232c..4c8f8cbfa05f3404 100644
> --- a/arch/m68k/mac/misc.c
> +++ b/arch/m68k/mac/misc.c
> @@ -25,6 +25,8 @@
>  
>  #include <asm/machdep.h>
>  
> +#include "mac.h"
> +
>  /*
>   * Offset between Unix time (1970-based) and Mac time (1904-based). Cuda and PMU
>   * times wrap in 2040. If we need to handle later times, the read_time functions
> diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
> index 921e6c092f2c6626..1641607f300d981c 100644
> --- a/arch/m68k/mac/oss.c
> +++ b/arch/m68k/mac/oss.c
> @@ -27,6 +27,8 @@
>  #include <asm/mac_via.h>
>  #include <asm/mac_oss.h>
>  
> +#include "mac.h"
> +
>  int oss_present;
>  volatile struct mac_oss *oss;
>  
> diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c
> index 0d0965b19c09b439..b4183cf66efef7f5 100644
> --- a/arch/m68k/mac/psc.c
> +++ b/arch/m68k/mac/psc.c
> @@ -26,6 +26,8 @@
>  #include <asm/macints.h>
>  #include <asm/mac_psc.h>
>  
> +#include "mac.h"
> +
>  #define DEBUG_PSC
>  
>  volatile __u8 *psc;
> diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
> index 3d11d6219cdd56da..01e6b0e37f8dd0e8 100644
> --- a/arch/m68k/mac/via.c
> +++ b/arch/m68k/mac/via.c
> @@ -38,6 +38,8 @@
>  #include <asm/mac_psc.h>
>  #include <asm/mac_oss.h>
>  
> +#include "mac.h"
> +
>  volatile __u8 *via1, *via2;
>  int rbv_present;
>  int via_alt_mapping;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ