public inbox for linux-parisc@vger.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Helge Deller <deller@gmx.de>,
	Randy Dunlap <rdunlap@infradead.org>,
	Parisc List <linux-parisc@vger.kernel.org>,
	Meelis Roos <mroos@linux.ee>,
	Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: linux-parisc compile failure in current git
Date: Fri, 19 Aug 2022 19:58:15 +0200	[thread overview]
Message-ID: <Yv/PLFLga51+T9xg@p100> (raw)
In-Reply-To: <CAK7LNAQceFhO1-vupRAJy3rU+p+MK97vRuswVXvVEgF7q0akDA@mail.gmail.com>

* Masahiro Yamada <masahiroy@kernel.org>:
> > > The reason is 64BIT depends on PA8X00.
> > >
> > > allmodconfig chooses PA7000 instead of PA8X00
> > > in the "Processor type" choice since
> > > PA7000 is the default.
> > >
> > >
> > > If you apply this patch,
> > >
> > >
> > >
> > > diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
> > > index 7f059cd1196a..458b8e22e240 100644
> > > --- a/arch/parisc/Kconfig
> > > +++ b/arch/parisc/Kconfig
> > > @@ -146,7 +146,7 @@ menu "Processor type and features"
> > >
> > >  choice
> > >         prompt "Processor type"
> > > -       default PA7000
> > > +       default PA8X00
> > >
> > >  config PA7000
> > >         bool "PA7000/PA7100"
> > >
> > > allmodconfig will start enabling CONFIG_64BIT,
> > > but it is up to Helge.
> >
> > That patch "partly" works, in the sense that with:
> > make ARCH=parisc64 randconfig
> >
> > you randomly end up with a 32- or 64-bit kernel.
> > Since "ARCH=parisc64" was given, one probably would expect a 64-bit-enabled kernel randconfig,
> > and with "ARCH=parisc" a 32-bit randconfig.
> > But, I'm not sure if this intended or not and works that way on other arches as well.
>
>
> Ah, OK.
>
> Then, you can mimic sparc code.
>
> In the top Makefile:
>
>
> ifeq ($(ARCH),sparc32)
>        SRCARCH := sparc
> endif
> ifeq ($(ARCH),sparc64)
>        SRCARCH := sparc
> endif
>
>
>
>
> In arch/sparc/Kconfig:
>
>
> config 64BIT
>         bool "64-bit kernel" if "$(ARCH)" = "sparc"
>         default "$(ARCH)" = "sparc64"
>
> "make ARCH=sparc32 randconfig" always disables
> CONFIG_64BIT, and randomizes the rest of options.
>
>
> "make ARCH=sparc64 randconfig" always enables
> CONFIG_64BIT, and randomizes the rest of options.
>
>
> "make ARCH=sparc randconfig" randomizes all options,
> including CONFIG_64BIT.

Ah, cool.
Thank you!

> I suggest to introduce ARCH=parisc32

No need. We already have ARCH=parisc64 or ARCH=parisc.

The patch below fixes it nicely and I've pushed it into the parisc
for-next git tree.

@Randy: Maybe you could try it as well. With that approach
you get what you want. Maybe that's a better approach for riscv64 as
well?

Helge



From a529c0a388f74a243363976af8535b10d3d69d20 Mon Sep 17 00:00:00 2001
From: Helge Deller <deller@gmx.de>
Date: Fri, 19 Aug 2022 19:30:50 +0200
Subject: [PATCH] parisc: Enable CONFIG_64BIT for ARCH=parisc64 only

With this patch the ARCH= parameter decides if the
CONFIG_64BIT option will be set or not. This means, the
ARCH= parameter will give:

	ARCH=parisc	-> 32-bit kernel
	ARCH=parisc64	-> 64-bit kernel

This simplifies the usage of the other config options like
randconfig, allmodconfig and allyesconfig a lot and produces
the output which is expected for parisc64 (64-bit) vs. parisc (32-bit).

Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 7f059cd1196a..9aede2447011 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -146,10 +146,10 @@ menu "Processor type and features"

 choice
 	prompt "Processor type"
-	default PA7000
+	default PA7000 if "$(ARCH)" = "parisc"

 config PA7000
-	bool "PA7000/PA7100"
+	bool "PA7000/PA7100" if "$(ARCH)" = "parisc"
 	help
 	  This is the processor type of your CPU.  This information is
 	  used for optimizing purposes.  In order to compile a kernel
@@ -160,21 +160,21 @@ config PA7000
 	  which is required on some machines.

 config PA7100LC
-	bool "PA7100LC"
+	bool "PA7100LC" if "$(ARCH)" = "parisc"
 	help
 	  Select this option for the PCX-L processor, as used in the
 	  712, 715/64, 715/80, 715/100, 715/100XC, 725/100, 743, 748,
 	  D200, D210, D300, D310 and E-class

 config PA7200
-	bool "PA7200"
+	bool "PA7200" if "$(ARCH)" = "parisc"
 	help
 	  Select this option for the PCX-T' processor, as used in the
 	  C100, C110, J100, J110, J210XC, D250, D260, D350, D360,
 	  K100, K200, K210, K220, K400, K410 and K420

 config PA7300LC
-	bool "PA7300LC"
+	bool "PA7300LC" if "$(ARCH)" = "parisc"
 	help
 	  Select this option for the PCX-L2 processor, as used in the
 	  744, A180, B132L, B160L, B180L, C132L, C160L, C180L,
@@ -224,17 +224,8 @@ config MLONGCALLS
 	  Enabling this option will probably slow down your kernel.

 config 64BIT
-	bool "64-bit kernel"
+	def_bool "$(ARCH)" = "parisc64"
 	depends on PA8X00
-	help
-	  Enable this if you want to support 64bit kernel on PA-RISC platform.
-
-	  At the moment, only people willing to use more than 2GB of RAM,
-	  or having a 64bit-only capable PA-RISC machine should say Y here.
-
-	  Since there is no 64bit userland on PA-RISC, there is no point to
-	  enable this option otherwise. The 64bit kernel is significantly bigger
-	  and slower than the 32bit one.

 choice
 	prompt "Kernel page size"

  reply	other threads:[~2022-08-19 18:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 10:21 linux-parisc compile failure in current git Meelis Roos
     [not found] ` <1ebff319-ad1d-0b83-d0b8-e3c88a8f3e48@gmx.de>
2021-06-09 15:31   ` Meelis Roos
2021-06-09 16:34     ` John David Anglin
2021-06-09 22:49 ` Helge Deller
2021-06-10  2:03   ` Masahiro Yamada
2021-06-10  7:03     ` Helge Deller
2021-06-17  1:47       ` Masahiro Yamada
2021-06-23 20:33         ` Helge Deller
2022-08-17 20:59           ` Randy Dunlap
2022-08-19 10:38             ` Helge Deller
2022-08-19 12:45             ` Masahiro Yamada
2022-08-19 13:54               ` Helge Deller
2022-08-19 16:41                 ` Masahiro Yamada
2022-08-19 17:58                   ` Helge Deller [this message]
2022-08-20  1:22                     ` Randy Dunlap
2022-08-20  1:17                   ` Randy Dunlap
2021-06-10 15:13     ` Meelis Roos

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=Yv/PLFLga51+T9xg@p100 \
    --to=deller@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mroos@linux.ee \
    --cc=rdunlap@infradead.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