All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: kernel test robot <lkp@intel.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Tom Lendacky <thomas.lendacky@amd.com>
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
	kbuild-all@lists.01.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: arch/arm64/kernel/acpi.c:99:30: sparse: sparse: incorrect type in return expression (different address spaces)
Date: Tue, 23 Jun 2020 00:55:43 +0300	[thread overview]
Message-ID: <CAHp75VeE=BrT5haBt8EL+ARGKah6D48XznTPf8RGseyXi=jRcw@mail.gmail.com> (raw)
In-Reply-To: <CAHp75Vc-+NCA=1CX+0GQfUNK-Mn1Y6-aj8TdCvm+pNBKF-Ax1g@mail.gmail.com>

On Tue, Jun 23, 2020 at 12:42 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Mon, Jun 22, 2020 at 11:53 PM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   dd0d718152e4c65b173070d48ea9dfc06894c3e5
> > commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
> > date:   4 days ago
> > config: arm64-randconfig-s031-20200622 (attached as .config)
> > compiler: aarch64-linux-gcc (GCC) 9.3.0
> > reproduce:
> >         # apt-get install sparse
> >         # sparse version: v0.6.2-rc1-18-g27caae40-dirty
> >         git checkout 670d0a4b10704667765f7d18f7592993d02783aa
> >         # save the attached .config to linux build tree
> >         make W=1 C=1 ARCH=arm64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> >
> > sparse warnings: (new ones prefixed by >>)
> >
> > >> arch/arm64/kernel/acpi.c:99:30: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected void [noderef] __iomem * @@     got void * @@
> > >> arch/arm64/kernel/acpi.c:99:30: sparse:     expected void [noderef] __iomem *
> >    arch/arm64/kernel/acpi.c:99:30: sparse:     got void *
> > >> arch/arm64/kernel/acpi.c:107:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem *map @@
> >    arch/arm64/kernel/acpi.c:107:24: sparse:     expected void *addr
> > >> arch/arm64/kernel/acpi.c:107:24: sparse:     got void [noderef] __iomem *map
>
> ...
>
> > 6c9a58e84e59a2 Andy Shevchenko 2017-07-18   94  void __init __iomem *__acpi_map_table(unsigned long phys, unsigned long size)
> > 6c9a58e84e59a2 Andy Shevchenko 2017-07-18  102  void __init __acpi_unmap_table(void __iomem *map, unsigned long size)
>
> Seems like a new sparse fixed some sparse issues and reveals that the
> above was a mistake and should be reverted.

Either this patch
f7750a79568788473c5e8092ee58a52248f34329 x86, mpparse, x86/acpi,
x86/PCI, x86/dmi, SFI: Use memremap() for RAM mappings
shouldn't change to memremap(), or

void __iomem __ref *acpi_os_map_iomem(acpi_physical_address phys,
acpi_size size);
void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size);

Should be cleaned so they either not working with __iomem, or in
special cases force address space for above mentioned functions.

-- 
With Best Regards,
Andy Shevchenko

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: kbuild-all@lists.01.org
Subject: Re: arch/arm64/kernel/acpi.c:99:30: sparse: sparse: incorrect type in return expression (different address spaces)
Date: Tue, 23 Jun 2020 00:55:43 +0300	[thread overview]
Message-ID: <CAHp75VeE=BrT5haBt8EL+ARGKah6D48XznTPf8RGseyXi=jRcw@mail.gmail.com> (raw)
In-Reply-To: <CAHp75Vc-+NCA=1CX+0GQfUNK-Mn1Y6-aj8TdCvm+pNBKF-Ax1g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2632 bytes --]

On Tue, Jun 23, 2020 at 12:42 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Mon, Jun 22, 2020 at 11:53 PM kernel test robot <lkp@intel.com> wrote:
> >
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head:   dd0d718152e4c65b173070d48ea9dfc06894c3e5
> > commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
> > date:   4 days ago
> > config: arm64-randconfig-s031-20200622 (attached as .config)
> > compiler: aarch64-linux-gcc (GCC) 9.3.0
> > reproduce:
> >         # apt-get install sparse
> >         # sparse version: v0.6.2-rc1-18-g27caae40-dirty
> >         git checkout 670d0a4b10704667765f7d18f7592993d02783aa
> >         # save the attached .config to linux build tree
> >         make W=1 C=1 ARCH=arm64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@intel.com>
> >
> >
> > sparse warnings: (new ones prefixed by >>)
> >
> > >> arch/arm64/kernel/acpi.c:99:30: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected void [noderef] __iomem * @@     got void * @@
> > >> arch/arm64/kernel/acpi.c:99:30: sparse:     expected void [noderef] __iomem *
> >    arch/arm64/kernel/acpi.c:99:30: sparse:     got void *
> > >> arch/arm64/kernel/acpi.c:107:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem *map @@
> >    arch/arm64/kernel/acpi.c:107:24: sparse:     expected void *addr
> > >> arch/arm64/kernel/acpi.c:107:24: sparse:     got void [noderef] __iomem *map
>
> ...
>
> > 6c9a58e84e59a2 Andy Shevchenko 2017-07-18   94  void __init __iomem *__acpi_map_table(unsigned long phys, unsigned long size)
> > 6c9a58e84e59a2 Andy Shevchenko 2017-07-18  102  void __init __acpi_unmap_table(void __iomem *map, unsigned long size)
>
> Seems like a new sparse fixed some sparse issues and reveals that the
> above was a mistake and should be reverted.

Either this patch
f7750a79568788473c5e8092ee58a52248f34329 x86, mpparse, x86/acpi,
x86/PCI, x86/dmi, SFI: Use memremap() for RAM mappings
shouldn't change to memremap(), or

void __iomem __ref *acpi_os_map_iomem(acpi_physical_address phys,
acpi_size size);
void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size);

Should be cleaned so they either not working with __iomem, or in
special cases force address space for above mentioned functions.

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2020-06-22 21:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22 20:44 arch/arm64/kernel/acpi.c:99:30: sparse: sparse: incorrect type in return expression (different address spaces) kernel test robot
2020-06-22 20:44 ` kernel test robot
2020-06-22 21:42 ` Andy Shevchenko
2020-06-22 21:42   ` Andy Shevchenko
2020-06-22 21:55   ` Andy Shevchenko [this message]
2020-06-22 21:55     ` Andy Shevchenko
2020-07-08 13:14     ` Tom Lendacky
2020-07-08 13:14       ` Tom Lendacky

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='CAHp75VeE=BrT5haBt8EL+ARGKah6D48XznTPf8RGseyXi=jRcw@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=thomas.lendacky@amd.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.