From: Denis Orlov <denorl2009@gmail.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: Re: [PATCH 02/17] MIPS: malta: use CKSEG instead of KSEG macros
Date: Tue, 6 Jun 2023 12:14:30 +0300 [thread overview]
Message-ID: <CALHb5ug3kGt5vFpdBO=oiZ15yL6YUuumXWWdPYAxnveAjMRGAQ@mail.gmail.com> (raw)
In-Reply-To: <5d5c5f27-6c1c-8808-4db6-b7e10de500dc@pengutronix.de>
On Tue, 6 Jun 2023 at 11:03, Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
>
> On 05.06.23 22:10, Denis Orlov wrote:
> > KSEG macro is not available when compiling with CONFIG_64BIT enabled, so
> > use CKSEG instead.
>
> If they're interchangeable, why do we need KSEG?
Hmm, I think maybe we don't. We can replace every instance of KSEG with
CKSEG without any change in functionality, except for the fact that the
latter will compile with 64BIT enabled. Overall, it seems that a lot of
MIPS-specific headers were taken from Linux as is back when the support
for MIPS was being added to barebox. Those were already old and crufty
back then but there are also a lot of definitions that we neither need
nor use, yet which unnecessarily complicate the code. I might try
cleaning up those headers sometime in the future.
Regards,
Denis
>
> >
> > Signed-off-by: Denis Orlov <denorl2009@gmail.com>
> > ---
> > arch/mips/boards/qemu-malta/lowlevel.S | 4 ++--
> > arch/mips/mach-malta/pci.c | 2 +-
> > 2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/mips/boards/qemu-malta/lowlevel.S b/arch/mips/boards/qemu-malta/lowlevel.S
> > index 98821e0426..541d62fc2a 100644
> > --- a/arch/mips/boards/qemu-malta/lowlevel.S
> > +++ b/arch/mips/boards/qemu-malta/lowlevel.S
> > @@ -56,14 +56,14 @@ __start:
> > */
> >
> > /* move GT64120 registers to 0x1be00000 */
> > - li t1, KSEG1ADDR(GT_DEF_BASE)
> > + li t1, CKSEG1ADDR(GT_DEF_BASE)
> > li t0, GT_LD(MIPS_GT_BASE)
> > sw t0, GT_ISD_OFS(t1)
> >
> > /*
> > * setup MEM-to-PCI0 mapping
> > */
> > - li t1, KSEG1ADDR(MIPS_GT_BASE)
> > + li t1, CKSEG1ADDR(MIPS_GT_BASE)
> >
> > /* setup PCI0 io window */
> > li t0, GT_LD(0x18000000)
> > diff --git a/arch/mips/mach-malta/pci.c b/arch/mips/mach-malta/pci.c
> > index 113b94fe23..0ab239f509 100644
> > --- a/arch/mips/mach-malta/pci.c
> > +++ b/arch/mips/mach-malta/pci.c
> > @@ -136,7 +136,7 @@ static int gt64xxx_pci0_pcibios_write(struct pci_bus *bus, unsigned int devfn,
> > static resource_size_t gt64xxx_res_start(struct pci_bus *bus,
> > resource_size_t res_addr)
> > {
> > - return KSEG0ADDR(res_addr);
> > + return CKSEG0ADDR(res_addr);
> > }
> >
> > struct pci_ops gt64xxx_pci0_ops = {
>
> --
> Pengutronix e.K. | |
> Steuerwalder Str. 21 | http://www.pengutronix.de/ |
> 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
next prev parent reply other threads:[~2023-06-06 9:17 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 20:10 [PATCH 00/17] MIPS: fix and improve 64BIT support Denis Orlov
2023-06-05 20:10 ` [PATCH 01/17] MIPS: malta: allow to choose MIPS64 target CPU in config Denis Orlov
2023-06-06 8:06 ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 02/17] MIPS: malta: use CKSEG instead of KSEG macros Denis Orlov
2023-06-06 8:03 ` Ahmad Fatoum
2023-06-06 9:14 ` Denis Orlov [this message]
2023-06-05 20:10 ` [PATCH 03/17] MIPS: reloc: fix relocation with CONFIG_64BIT enabled Denis Orlov
2023-06-06 8:08 ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 04/17] MIPS: o32: provide ta0..ta3 register definitions Denis Orlov
2023-06-06 8:13 ` Ahmad Fatoum
2023-06-06 9:38 ` Denis Orlov
2023-06-05 20:10 ` [PATCH 05/17] MIPS: pbl: use o32/n64 compatible " Denis Orlov
2023-06-06 8:20 ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 06/17] MIPS: pbl: fix linking errors with CONFIG_64BIT Denis Orlov
2023-06-05 20:10 ` [PATCH 07/17] MIPS: use MIPS32/MIPS64 generic instruction macros Denis Orlov
2023-06-06 8:23 ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 08/17] MIPS: malta: fix GT64120 base virtual address on 64BIT Denis Orlov
2023-06-06 8:35 ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 09/17] MIPS: fix addresses of exception vectors in 64-bit mode Denis Orlov
2023-06-06 8:36 ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 10/17] MIPS: fix *ADDR macro usage warnings on CONFIG_64BIT Denis Orlov
2023-06-05 20:10 ` [PATCH 11/17] MIPS: Makefile: sign-extend TEXT_BASE value " Denis Orlov
2023-06-06 9:04 ` Ahmad Fatoum
2023-06-06 9:23 ` Denis Orlov
2023-06-09 6:40 ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 12/17] MIPS: enable 64-bit kernel segment addressing " Denis Orlov
2023-06-06 9:06 ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 13/17] MIPS: traps: fix passing wrong sp when returning from exception Denis Orlov
2023-06-05 20:10 ` [PATCH 14/17] MIPS: pbl_macros: use generic load/store macros in copy_to_link_location Denis Orlov
2023-06-06 9:07 ` Ahmad Fatoum
2023-06-05 20:10 ` [PATCH 15/17] MIPS: add 64-bit support for optimized string functions Denis Orlov
2023-06-05 20:10 ` [PATCH 16/17] MIPS: make setjmp/longjmp/initjmp available in 64BIT builds Denis Orlov
2023-06-05 20:10 ` [PATCH 17/17] MIPS: main_entry-pbl: fix conversion warnings on CONFIG_64BIT Denis Orlov
2023-06-06 8:02 ` [PATCH 00/17] MIPS: fix and improve 64BIT support Ahmad Fatoum
2023-06-06 8:43 ` Denis Orlov
2023-06-09 6:43 ` Sascha Hauer
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='CALHb5ug3kGt5vFpdBO=oiZ15yL6YUuumXWWdPYAxnveAjMRGAQ@mail.gmail.com' \
--to=denorl2009@gmail.com \
--cc=a.fatoum@pengutronix.de \
/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