All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Fix FIXMAP_TOP to avoid overlap with VMALLOC area
@ 2019-03-22 10:04 ` Anup Patel
  0 siblings, 0 replies; 12+ messages in thread
From: Anup Patel @ 2019-03-22 10:04 UTC (permalink / raw)
  To: Palmer Dabbelt, Albert Ou
  Cc: Atish Patra, Christoph Hellwig, Paul Walmsley, Mike Rapoport,
	linux-riscv, linux-kernel, Anup Patel

The FIXMAP area overlaps with VMALLOC area in Linux-5.1-rc1 hence we get
below warning in Linux RISC-V 32bit kernel. This warning does not show-up
in Linux RISC-V 64bit kernel due to large VMALLOC area.

WARNING: CPU: 0 PID: 22 at mm/vmalloc.c:150 vmap_page_range_noflush+0x134/0x15c
Modules linked in:
CPU: 0 PID: 22 Comm: kworker/0:1 Not tainted 5.1.0-rc1-00005-gebc2f658040e #1
Workqueue: events pcpu_balance_workfn
Call Trace:
[<c002b950>] walk_stackframe+0x0/0xa0
[<c002baac>] show_stack+0x28/0x32
[<c0587354>] dump_stack+0x62/0x7e
[<c002fdee>] __warn+0x98/0xce
[<c002fe52>] warn_slowpath_null+0x2e/0x3c
[<c00e71ce>] vmap_page_range_noflush+0x134/0x15c
[<c00e7886>] map_kernel_range_noflush+0xc/0x14
[<c00d54b8>] pcpu_populate_chunk+0x19e/0x236
[<c00d610e>] pcpu_balance_workfn+0x448/0x464
[<c00408d6>] process_one_work+0x16c/0x2ea
[<c0040b46>] worker_thread+0xf2/0x3b2
[<c004519a>] kthread+0xce/0xdc
[<c002a974>] ret_from_exception+0x0/0xc

This patch fixes above warning by placing FIXMAP area below VMALLOC area.

Fixes: f2c17aabc917 ("RISC-V: Implement compile-time fixed mappings")
Signed-off-by: Anup Patel <anup.patel@wdc.com>
---
 arch/riscv/include/asm/fixmap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/include/asm/fixmap.h b/arch/riscv/include/asm/fixmap.h
index 5cf53dd882e5..9c66033c3a54 100644
--- a/arch/riscv/include/asm/fixmap.h
+++ b/arch/riscv/include/asm/fixmap.h
@@ -31,7 +31,7 @@ enum fixed_addresses {
 };
 
 #define FIXADDR_SIZE		(__end_of_fixed_addresses * PAGE_SIZE)
-#define FIXADDR_TOP		(PAGE_OFFSET)
+#define FIXADDR_TOP		(VMALLOC_START)
 #define FIXADDR_START		(FIXADDR_TOP - FIXADDR_SIZE)
 
 #define FIXMAP_PAGE_IO		PAGE_KERNEL
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH] RISC-V: Fix FIXMAP_TOP to avoid overlap with VMALLOC area
@ 2019-03-22 10:04 ` Anup Patel
  0 siblings, 0 replies; 12+ messages in thread
From: Anup Patel @ 2019-03-22 10:04 UTC (permalink / raw)
  To: Palmer Dabbelt, Albert Ou
  Cc: Anup Patel, linux-kernel, Mike Rapoport, Christoph Hellwig,
	Atish Patra, Paul Walmsley, linux-riscv

The FIXMAP area overlaps with VMALLOC area in Linux-5.1-rc1 hence we get
below warning in Linux RISC-V 32bit kernel. This warning does not show-up
in Linux RISC-V 64bit kernel due to large VMALLOC area.

WARNING: CPU: 0 PID: 22 at mm/vmalloc.c:150 vmap_page_range_noflush+0x134/0x15c
Modules linked in:
CPU: 0 PID: 22 Comm: kworker/0:1 Not tainted 5.1.0-rc1-00005-gebc2f658040e #1
Workqueue: events pcpu_balance_workfn
Call Trace:
[<c002b950>] walk_stackframe+0x0/0xa0
[<c002baac>] show_stack+0x28/0x32
[<c0587354>] dump_stack+0x62/0x7e
[<c002fdee>] __warn+0x98/0xce
[<c002fe52>] warn_slowpath_null+0x2e/0x3c
[<c00e71ce>] vmap_page_range_noflush+0x134/0x15c
[<c00e7886>] map_kernel_range_noflush+0xc/0x14
[<c00d54b8>] pcpu_populate_chunk+0x19e/0x236
[<c00d610e>] pcpu_balance_workfn+0x448/0x464
[<c00408d6>] process_one_work+0x16c/0x2ea
[<c0040b46>] worker_thread+0xf2/0x3b2
[<c004519a>] kthread+0xce/0xdc
[<c002a974>] ret_from_exception+0x0/0xc

This patch fixes above warning by placing FIXMAP area below VMALLOC area.

Fixes: f2c17aabc917 ("RISC-V: Implement compile-time fixed mappings")
Signed-off-by: Anup Patel <anup.patel@wdc.com>
---
 arch/riscv/include/asm/fixmap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/include/asm/fixmap.h b/arch/riscv/include/asm/fixmap.h
index 5cf53dd882e5..9c66033c3a54 100644
--- a/arch/riscv/include/asm/fixmap.h
+++ b/arch/riscv/include/asm/fixmap.h
@@ -31,7 +31,7 @@ enum fixed_addresses {
 };
 
 #define FIXADDR_SIZE		(__end_of_fixed_addresses * PAGE_SIZE)
-#define FIXADDR_TOP		(PAGE_OFFSET)
+#define FIXADDR_TOP		(VMALLOC_START)
 #define FIXADDR_START		(FIXADDR_TOP - FIXADDR_SIZE)
 
 #define FIXMAP_PAGE_IO		PAGE_KERNEL
-- 
2.17.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] RISC-V: Fix FIXMAP_TOP to avoid overlap with VMALLOC area
  2019-03-22 10:04 ` Anup Patel
@ 2019-03-22 13:25   ` Christoph Hellwig
  -1 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2019-03-22 13:25 UTC (permalink / raw)
  To: Anup Patel
  Cc: Palmer Dabbelt, Albert Ou, Atish Patra, Christoph Hellwig,
	Paul Walmsley, Mike Rapoport, linux-riscv, linux-kernel

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

Btw, what is the 32-bit test vehicle of choice?  qemu with the
virt machine?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] RISC-V: Fix FIXMAP_TOP to avoid overlap with VMALLOC area
@ 2019-03-22 13:25   ` Christoph Hellwig
  0 siblings, 0 replies; 12+ messages in thread
From: Christoph Hellwig @ 2019-03-22 13:25 UTC (permalink / raw)
  To: Anup Patel
  Cc: Albert Ou, Palmer Dabbelt, linux-kernel, Mike Rapoport,
	Christoph Hellwig, Atish Patra, Paul Walmsley, linux-riscv

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

Btw, what is the 32-bit test vehicle of choice?  qemu with the
virt machine?

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] RISC-V: Fix FIXMAP_TOP to avoid overlap with VMALLOC area
  2019-03-22 13:25   ` Christoph Hellwig
@ 2019-03-22 13:40     ` Anup Patel
  -1 siblings, 0 replies; 12+ messages in thread
From: Anup Patel @ 2019-03-22 13:40 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Anup Patel, Palmer Dabbelt, Albert Ou, Atish Patra,
	Paul Walmsley, Mike Rapoport, linux-riscv, linux-kernel

On Fri, Mar 22, 2019 at 6:55 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> Looks good,
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> Btw, what is the 32-bit test vehicle of choice?  qemu with the
> virt machine?

Yes, for now QEMU seems to be only the option.

I am not aware of any board we can purchase for RV32.

Regards,
Anup

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] RISC-V: Fix FIXMAP_TOP to avoid overlap with VMALLOC area
@ 2019-03-22 13:40     ` Anup Patel
  0 siblings, 0 replies; 12+ messages in thread
From: Anup Patel @ 2019-03-22 13:40 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Palmer Dabbelt, Anup Patel, linux-kernel, Mike Rapoport,
	Atish Patra, Albert Ou, Paul Walmsley, linux-riscv

On Fri, Mar 22, 2019 at 6:55 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> Looks good,
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> Btw, what is the 32-bit test vehicle of choice?  qemu with the
> virt machine?

Yes, for now QEMU seems to be only the option.

I am not aware of any board we can purchase for RV32.

Regards,
Anup

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] RISC-V: Fix FIXMAP_TOP to avoid overlap with VMALLOC area
  2019-03-22 13:25   ` Christoph Hellwig
@ 2019-03-29  6:18     ` Palmer Dabbelt
  -1 siblings, 0 replies; 12+ messages in thread
From: Palmer Dabbelt @ 2019-03-29  6:18 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Anup Patel, aou, Atish Patra, Christoph Hellwig, Paul Walmsley,
	rppt, linux-riscv, linux-kernel

On Fri, 22 Mar 2019 06:25:09 PDT (-0700), Christoph Hellwig wrote:
> Looks good,
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks.  I've added this to my fixes list for the next RC.

>
> Btw, what is the 32-bit test vehicle of choice?  qemu with the
> virt machine?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] RISC-V: Fix FIXMAP_TOP to avoid overlap with VMALLOC area
@ 2019-03-29  6:18     ` Palmer Dabbelt
  0 siblings, 0 replies; 12+ messages in thread
From: Palmer Dabbelt @ 2019-03-29  6:18 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: aou, Anup Patel, linux-kernel, rppt, Christoph Hellwig,
	Atish Patra, Paul Walmsley, linux-riscv

On Fri, 22 Mar 2019 06:25:09 PDT (-0700), Christoph Hellwig wrote:
> Looks good,
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Thanks.  I've added this to my fixes list for the next RC.

>
> Btw, what is the 32-bit test vehicle of choice?  qemu with the
> virt machine?

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] RISC-V: Fix FIXMAP_TOP to avoid overlap with VMALLOC area
  2019-03-29  6:18     ` Palmer Dabbelt
@ 2019-03-29  6:50       ` Anup Patel
  -1 siblings, 0 replies; 12+ messages in thread
From: Anup Patel @ 2019-03-29  6:50 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: Christoph Hellwig, Anup Patel, Albert Ou, Atish Patra,
	Paul Walmsley, Mike Rapoport, linux-riscv,
	linux-kernel@vger.kernel.org List

Hi Palmer,

On Fri, Mar 29, 2019 at 11:48 AM Palmer Dabbelt <palmer@sifive.com> wrote:
>
> On Fri, 22 Mar 2019 06:25:09 PDT (-0700), Christoph Hellwig wrote:
> > Looks good,
> >
> > Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> Thanks.  I've added this to my fixes list for the next RC.

I have another RC fix as well:

"[PATCH v4] RISC-V: Always compile mm/init.c with cmodel=medany and notrace "

https://patchwork.kernel.org/patch/10870605/

Regards,
Anup

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] RISC-V: Fix FIXMAP_TOP to avoid overlap with VMALLOC area
@ 2019-03-29  6:50       ` Anup Patel
  0 siblings, 0 replies; 12+ messages in thread
From: Anup Patel @ 2019-03-29  6:50 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: Albert Ou, Anup Patel, linux-kernel@vger.kernel.org List,
	Mike Rapoport, Christoph Hellwig, Atish Patra, Paul Walmsley,
	linux-riscv

Hi Palmer,

On Fri, Mar 29, 2019 at 11:48 AM Palmer Dabbelt <palmer@sifive.com> wrote:
>
> On Fri, 22 Mar 2019 06:25:09 PDT (-0700), Christoph Hellwig wrote:
> > Looks good,
> >
> > Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> Thanks.  I've added this to my fixes list for the next RC.

I have another RC fix as well:

"[PATCH v4] RISC-V: Always compile mm/init.c with cmodel=medany and notrace "

https://patchwork.kernel.org/patch/10870605/

Regards,
Anup

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] RISC-V: Fix FIXMAP_TOP to avoid overlap with VMALLOC area
  2019-03-29  6:50       ` Anup Patel
@ 2019-03-29  7:08         ` Palmer Dabbelt
  -1 siblings, 0 replies; 12+ messages in thread
From: Palmer Dabbelt @ 2019-03-29  7:08 UTC (permalink / raw)
  To: anup
  Cc: Christoph Hellwig, Anup Patel, aou, Atish Patra, Paul Walmsley,
	rppt, linux-riscv, linux-kernel

On Thu, 28 Mar 2019 23:50:09 PDT (-0700), anup@brainfault.org wrote:
> Hi Palmer,
>
> On Fri, Mar 29, 2019 at 11:48 AM Palmer Dabbelt <palmer@sifive.com> wrote:
>>
>> On Fri, 22 Mar 2019 06:25:09 PDT (-0700), Christoph Hellwig wrote:
>> > Looks good,
>> >
>> > Reviewed-by: Christoph Hellwig <hch@lst.de>
>>
>> Thanks.  I've added this to my fixes list for the next RC.
>
> I have another RC fix as well:
>
> "[PATCH v4] RISC-V: Always compile mm/init.c with cmodel=medany and notrace "
>
> https://patchwork.kernel.org/patch/10870605/

That one is already in:

    https://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux.git/log/?h=for-linus

I just didn't have time to get an actual PR together for the RC this week 
because I didn't get a chance to properly test everything.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] RISC-V: Fix FIXMAP_TOP to avoid overlap with VMALLOC area
@ 2019-03-29  7:08         ` Palmer Dabbelt
  0 siblings, 0 replies; 12+ messages in thread
From: Palmer Dabbelt @ 2019-03-29  7:08 UTC (permalink / raw)
  To: anup
  Cc: aou, Anup Patel, linux-kernel, rppt, Christoph Hellwig,
	Atish Patra, Paul Walmsley, linux-riscv

On Thu, 28 Mar 2019 23:50:09 PDT (-0700), anup@brainfault.org wrote:
> Hi Palmer,
>
> On Fri, Mar 29, 2019 at 11:48 AM Palmer Dabbelt <palmer@sifive.com> wrote:
>>
>> On Fri, 22 Mar 2019 06:25:09 PDT (-0700), Christoph Hellwig wrote:
>> > Looks good,
>> >
>> > Reviewed-by: Christoph Hellwig <hch@lst.de>
>>
>> Thanks.  I've added this to my fixes list for the next RC.
>
> I have another RC fix as well:
>
> "[PATCH v4] RISC-V: Always compile mm/init.c with cmodel=medany and notrace "
>
> https://patchwork.kernel.org/patch/10870605/

That one is already in:

    https://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux.git/log/?h=for-linus

I just didn't have time to get an actual PR together for the RC this week 
because I didn't get a chance to properly test everything.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-03-29  7:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-22 10:04 [PATCH] RISC-V: Fix FIXMAP_TOP to avoid overlap with VMALLOC area Anup Patel
2019-03-22 10:04 ` Anup Patel
2019-03-22 13:25 ` Christoph Hellwig
2019-03-22 13:25   ` Christoph Hellwig
2019-03-22 13:40   ` Anup Patel
2019-03-22 13:40     ` Anup Patel
2019-03-29  6:18   ` Palmer Dabbelt
2019-03-29  6:18     ` Palmer Dabbelt
2019-03-29  6:50     ` Anup Patel
2019-03-29  6:50       ` Anup Patel
2019-03-29  7:08       ` Palmer Dabbelt
2019-03-29  7:08         ` Palmer Dabbelt

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.