The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
	sparclinux@vger.kernel.org, linux-parport@lists.infradead.org,
	"David S. Miller" <davem@davemloft.net>,
	Andreas Larsson <andreas@gaisler.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/6] sparc32: Do not select GENERIC_ISA_DMA
Date: Sat, 24 Feb 2024 08:59:18 +0100	[thread overview]
Message-ID: <20240224075918.GB2959352@ravnborg.org> (raw)
In-Reply-To: <alpine.DEB.2.21.2402240458100.61493@angie.orcam.me.uk>

Hi Marciej,

On Sat, Feb 24, 2024 at 05:29:43AM +0000, Maciej W. Rozycki wrote:
> On Sat, 24 Feb 2024, Maciej W. Rozycki wrote:
> 
> > > sparc32 do not support generic isa dma, so do not select the symbol.
> > > Without this fix, the following patch would break the build with a
> > > missing prototype.
> > 
> >  Not according to my observations, kernel/dma.c is always built for 
> > GENERIC_ISA_DMA configurations, so:
> > 
> > kernel/dma.c:70:5: error: no previous prototype for 'request_dma' [-Werror=missing-prototypes]
> >    70 | int request_dma(unsigned int dmanr, const char * device_id)
> >       |     ^~~~~~~~~~~
> > kernel/dma.c:88:6: error: no previous prototype for 'free_dma' [-Werror=missing-prototypes]
> >    88 | void free_dma(unsigned int dmanr)
> >       |      ^~~~~~~~
> > 
> > are issued regardless (and FAOD with PARPORT_PC unset).
> > 
> >  I can't speak for SPARC support for ISA DMA, but it seems to me like the 
> > second sentence would best be removed, as would the Fixes: tag (in favour 
> > to:
> > 
> > Fixes: 0fcb70851fbf ("Makefile.extrawarn: turn on missing-prototypes globally")
> > 
> > I presume), and possibly the messages quoted above included instead.

Thanks, I will update in v2.

> 
>  Actually I think ZONE_DMA should go too (it's linked to GENERIC_ISA_DMA, 
> isn't it? -- cf. commit 5ac6da669e24 ("[PATCH] Set CONFIG_ZONE_DMA for 
> arches with GENERIC_ISA_DMA")), and the whole thing use:
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> 
> The GENERIC_ISA_DMA option itself was added to arch/sparc/config.in with 
> 2.5.31 as:
> 
> define_bool CONFIG_GENERIC_ISA_DMA y
> 
> despite of:
> 
> define_bool CONFIG_ISA n
> 
> for a reason not clear to me (BLK_DEV_FD? -- but on SPARC that uses some 
> hacks to work in the absence of ISA DMA anyway).
> 
>  Am I missing anything here?
Nice find - the code below conforms you are right:

	max_zone_pfn[ZONE_DMA] = max_low_pfn;
	max_zone_pfn[ZONE_NORMAL] = max_low_pfn;

As they are set to the same value there is no smaller ZONE_DMA area.
I will add an extra patch for this in v2.

	Sam

  reply	other threads:[~2024-02-24  7:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-23 19:36 [PATCH 0/6] sparc32: build fixes for all{yes,mod}config builds Sam Ravnborg via B4 Relay
2024-02-23 19:36 ` [PATCH 1/6] sparc32: Use generic cmpdi2/ucmpdi2 variants Sam Ravnborg via B4 Relay
2024-02-24  0:27   ` Randy Dunlap
2024-02-24  2:54   ` Maciej W. Rozycki
2024-02-23 19:36 ` [PATCH 2/6] sparc32: Fix build with trapbase Sam Ravnborg via B4 Relay
2024-02-24  0:29   ` Randy Dunlap
2024-02-23 19:36 ` [PATCH 3/6] mtd: maps: sun_uflash: Declare uflash_devinit static Sam Ravnborg via B4 Relay
2024-02-24  0:30   ` Randy Dunlap
2024-02-23 19:36 ` [PATCH 4/6] usb: host: uhci-grlib.c: Fix build, add platform_device Sam Ravnborg via B4 Relay
2024-02-24  0:31   ` Randy Dunlap
2024-02-23 19:36 ` [PATCH 5/6] sparc32: Do not select GENERIC_ISA_DMA Sam Ravnborg via B4 Relay
2024-02-24  0:32   ` Randy Dunlap
2024-02-24  2:55   ` Maciej W. Rozycki
2024-02-24  5:29     ` Maciej W. Rozycki
2024-02-24  7:59       ` Sam Ravnborg [this message]
2024-02-24 11:24       ` Arnd Bergmann
2024-02-24 17:14         ` Sam Ravnborg
2024-02-23 19:36 ` [PATCH 6/6] sparc32: Fix parport build with sparc32 Sam Ravnborg via B4 Relay
2024-02-24  0:34   ` Randy Dunlap
2024-02-24  3:02   ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240224075918.GB2959352@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=andreas@gaisler.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parport@lists.infradead.org \
    --cc=macro@orcam.me.uk \
    --cc=miquel.raynal@bootlin.com \
    --cc=rdunlap@infradead.org \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox