Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753599AbdF2WLu (ORCPT ); Thu, 29 Jun 2017 18:11:50 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35002 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752545AbdF2WLs (ORCPT ); Thu, 29 Jun 2017 18:11:48 -0400 Date: Thu, 29 Jun 2017 15:11:41 -0700 (PDT) X-Google-Original-Date: Thu, 29 Jun 2017 14:51:25 PDT (-0700) From: Palmer Dabbelt To: james.hogan@imgtec.com CC: peterz@infradead.org CC: mingo@redhat.com CC: mcgrof@kernel.org CC: viro@zeniv.linux.org.uk CC: sfr@canb.auug.org.au CC: nicolas.dichtel@6wind.com CC: rmk+kernel@armlinux.org.uk CC: msalter@redhat.com CC: tklauser@distanz.ch CC: will.deacon@arm.com CC: paul.gortmaker@windriver.com CC: linux@roeck-us.net CC: linux-kernel@vger.kernel.org CC: linux-arch@vger.kernel.org CC: albert@sifive.com Subject: Re: [PATCH 9/9] RISC-V: Build Infastructure In-Reply-To: <20170628225442.GP6973@jhogan-linux.le.imgtec.org> Message-ID: Mime-Version: 1.0 (MHng) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1760 Lines: 65 On Wed, 28 Jun 2017 15:54:42 PDT (-0700), james.hogan@imgtec.com wrote: > On Wed, Jun 28, 2017 at 11:55:38AM -0700, Palmer Dabbelt wrote: >> diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile >> new file mode 100644 >> index 000000000000..7f58cd251ab8 >> --- /dev/null >> +++ b/arch/riscv/kernel/Makefile >> @@ -0,0 +1,16 @@ >> +# >> +# Makefile for the RISC-V Linux kernel >> +# >> + >> +extra-y := head.o vmlinux.lds >> + >> +obj-y := cpu.o entry.o irq.o process.o ptrace.o reset.o setup.o \ >> + signal.o syscall_table.o sys_riscv.o time.o traps.o \ >> + riscv_ksyms.o stacktrace.o vdso.o cacheinfo.o vdso/ > > I would suggest splitting these sort of things onto separate lines. > It'll make later changes much more readable (especially when you're > escaping newlines) as well as avoiding conflicts. > >> + >> +CFLAGS_setup.o := -mcmodel=medany >> + >> +obj-$(CONFIG_SMP) += smpboot.o smp.o > > same here > >> +obj-$(CONFIG_MODULES) += module.o >> + >> +clean: > >> diff --git a/arch/riscv/lib/Makefile b/arch/riscv/lib/Makefile >> new file mode 100644 >> index 000000000000..120c38e77a46 >> --- /dev/null >> +++ b/arch/riscv/lib/Makefile >> @@ -0,0 +1,5 @@ >> +lib-y := delay.o memcpy.o memset.o uaccess.o > > and here > >> + >> +ifeq ($(CONFIG_64BIT),) >> +lib-y += udivdi3.o >> +endif > > Would this work? > > lib-$(CONFIG_32BIT) += udivdi3.o > >> diff --git a/arch/riscv/mm/Makefile b/arch/riscv/mm/Makefile >> new file mode 100644 >> index 000000000000..36ebe6feb5d6 >> --- /dev/null >> +++ b/arch/riscv/mm/Makefile >> @@ -0,0 +1 @@ >> +obj-y := init.o fault.o extable.o ioremap.o > > and here Sounds good. I'll include this in the v4 https://github.com/riscv/riscv-linux/commit/e5a3eee8cd3e493dcd9b81509b1aa9e0302b72da