Re: Mutli-directory module Makefiles

2018-01-25 Thread Sam Ravnborg
Hi Jakub. On Mon, Jan 22, 2018 at 01:46:07PM -0800, Jakub Kicinski wrote: > Hi! > > in drivers/net/ethernet/netronome/nfp there is a module which is built > from C sources in 4 directories. What is the best way to handle that? Move all .c files to th same directory - like done for almost all ot

Re: [PATCH 0/2] kconfig: 'if' and automatic submenu creation documentation

2018-01-14 Thread Sam Ravnborg
Hi Ulf. On Sun, Jan 14, 2018 at 12:33:43PM +0100, Ulf Magnusson wrote: > These together should make the automatic submenu logic a lot clearer. > > Ulf Magnusson (2): > kconfig: Document 'if' flattening logic > kconfig: Improve auto. menu documentation accuracy > > scripts/kconfig/menu.c | 3

Re: [PATCH] kconfig: Sync zconf.y with zconf.tab.c_shipped

2018-01-12 Thread Sam Ravnborg
Hi Ulf, Masahiro > > > > BTW, I do not know the historical reason > > why zconf instead of kconf in the first place... > > I have no idea either. kconfig.{l,y} and kconfig_*() would be a lot > less confusing. zconf was the name originally invented by Roman Zippel. kconfig had the name "lc" in th

Re: [PATCH v2] fixdep: exit with error code in error branches of do_config_file()

2018-01-01 Thread Sam Ravnborg
> > > And would that file be acceptable if it were actually empty There have been cases with empty files in the source tree. And it is not the job of fixdep to do anything special about them. fixdep shall do what it is requested to do, and not more than that. Sam

Re: [PATCH v5 1/8] arch: enable relative relocations for arm64, power, x86, s390 and x86

2017-12-25 Thread Sam Ravnborg
Hi Ard. On Mon, Dec 25, 2017 at 08:54:33PM +, Ard Biesheuvel wrote: > Before updating certain subsystems to use place relative 32-bit > relocations in special sections, to save space and reduce the > number of absolute relocations that need to be processed at runtime > by relocatable kernels,

Re: [PATCH 0/3] kbuild,kconfig: generate lexer/parser C files instead of copying _shipped files

2017-12-15 Thread Sam Ravnborg
Hi Masahiro. > > In Linux build system convention, pre-generated files are version- > > controlled with a "_shipped" suffix. During the kernel building, > > they are simply shipped (copied) removing the suffix. > > > > From users' point of view, this approach can reduce external tool > > dependen

Re: [PATCH] sparc32,leon: Use CASA when available for atomic operations

2017-12-13 Thread Sam Ravnborg
Hi Andreas. On Mon, Dec 11, 2017 at 03:58:10PM +0100, Andreas Larsson wrote: > This probes for CASA support, that is commonly present in LEON > processors, and when available, uses the CASA instruction for atomic > operations rather than the spinlock based emulated atomic operations. > > All CASA

Re: [PATCH 1/2] kbuild: create built-in.o automatically if parent directory wants it

2017-11-09 Thread Sam Ravnborg
Hi Masahiro. On Thu, Nov 09, 2017 at 02:53:04PM +0900, Masahiro Yamada wrote: > Hi Sam, > > Thanks for your review. > > 2017-11-09 14:35 GMT+09:00 Sam Ravnborg : > > Hi Masahiro. > > > > Thanks for picking this up. > > > >> A key point is, the pa

Re: [PATCH 1/2] kbuild: create built-in.o automatically if parent directory wants it

2017-11-08 Thread Sam Ravnborg
eed-builtin=1 The need-bultin may also be required for the shortcuts that allows one to use: make / example: make net/ And maybe selftest, documentation shortcuts too? Other than that - looks good. Reviewed-by: Sam Ravnborg Sam

Re: [PATCH 2/2] kbuild: handle dtb-y and CONFIG_OF_ALL_DTBS natively in Makefile.lib

2017-11-05 Thread Sam Ravnborg
Hi Masahiro Nice cleanup - looks good. > --- a/arch/mips/boot/dts/brcm/Makefile > +++ b/arch/mips/boot/dts/brcm/Makefile > @@ -37,5 +37,3 @@ obj-y += $(patsubst %.dtb, > %.dtb.o, $(dtb-y)) > > # Force kbuild to make empty built-in.o if necessary > obj-

Re: [PATCH v2 1/2] sparc64: Define SPARC default fls and __fls

2017-09-27 Thread Sam Ravnborg
> > + > > +EXPORT_SYMBOL(__fls) > > +EXPORT_SYMBOL(fls) > > + > > +fls: > Use ENTRY(), ENDPROC() for assembler functions. And locate EXPORT_SYMBOL() right after ENDPROC(). Sam

Re: [PATCH v2 2/2] sparc64: Use lzcnt instruction for fls and __fls

2017-09-27 Thread Sam Ravnborg
Hi Vijay. On Wed, Sep 27, 2017 at 01:25:26PM -0600, Vijay Kumar wrote: > For T4 and above, patch fls and __fls functions > at the boot time to use lzcnt instruction. > > Signed-off-by: Vijay Kumar > Reviewed-by: Babu Moger > --- > arch/sparc/Makefile |1 + > arch/sparc/kernel/head_

Re: [PATCH v2 1/2] sparc64: Define SPARC default fls and __fls

2017-09-27 Thread Sam Ravnborg
Hi Vijay. Some feedback - see below. The comment about ENTRY() ENDPROC() is also valid for patch 2/2 Sam > > diff --git a/arch/sparc/include/asm/bitops_64.h > b/arch/sparc/include/asm/bitops_64.h > index 2d52240..946c236 100644 > --- a/arch/sparc/include/asm/bitops_64.h > +++ b/arch/sp

Re: [RFC PATCH 0/3] kbuild: generate intermediate C files instead of copying _shipped files

2017-09-08 Thread Sam Ravnborg
On Fri, Sep 08, 2017 at 02:38:23PM -0700, Linus Torvalds wrote: > On Fri, Sep 8, 2017 at 11:39 AM, Linus Torvalds > wrote: > > > > Strange. Does anybody see what the pattern to the failure is? > > Found it. Stupid special case for 'typeof()' that used > is_reserved_word() in ways I hadn't realize

Re: [PATCH] Fix compat_sys_sigpending breakage introduced by v4.13-rc1~6^2~12

2017-08-28 Thread Sam Ravnborg
Hi Al. On Mon, Aug 28, 2017 at 05:41:49AM +0100, Al Viro wrote: > On Sun, Aug 06, 2017 at 07:22:03PM +0100, Al Viro wrote: > > > assuming I'll have any sanity left by that time). > > ... and that hope had turned out to be far too optimistic. Ohh, looking forward to what impact this will have on

Re: special handle of scripts/kconfig/zconf.tab.o

2017-08-19 Thread Sam Ravnborg
> > The difference between with/without _shipped is, > > zconf.{tab,hash,lex}.c_shipped reside under $(srctree), > > whereas zconf.{tab,hash,lex}.c under $(objtree). > > The whole idea behind the *_shipped file was to have less dependencies > on the host system buildign the kernel. > So we did not

Re: special handle of scripts/kconfig/zconf.tab.o

2017-08-19 Thread Sam Ravnborg
Hi Masahiro On Sat, Aug 19, 2017 at 09:42:40PM +0900, Masahiro Yamada wrote: > Hi. > (+CC Sam) > > 2017-08-15 20:02 GMT+09:00 Cao jin : > > Masahiro-san, > > > > I have a question about make *config. In scripts/kconfig/Makefile, there > > is following statement: > > > > $(obj)/zconf.tab.o: $(obj)

Re: make clean all broken with -j? + question regarding modpost

2017-08-12 Thread Sam Ravnborg
Hi Masahiro > > Kbuild does not cater to the mixture of clean targets and build targets, > but I do not know why. The details has long escaped me but in general we do not want to have a job deleting all .o files running in parallel with a job that creates .o files. So we wanted the following to

Re: strace-4.18 test suite oopses sparc64 4.12 and 4.13-rc kernels

2017-08-03 Thread Sam Ravnborg
_and_7_plus_GS_plus_8) > add GLOBAL_SPARE, 8, GLOBAL_SPARE > and %o2, 7, %o2 > retl > - add%o2, GLOBAL_SPARE, %o2 > + add%o2, GLOBAL_SPARE, %o0 > ENDPROC(U3_retl_o2_and_7_plus_GS_plus_8) > #endif > Patch looks obviously correct, and I

Re: [v5 09/15] sparc64: optimized struct page zeroing

2017-08-03 Thread Sam Ravnborg
Hi Pavel. On Thu, Aug 03, 2017 at 05:23:47PM -0400, Pavel Tatashin wrote: > Add an optimized mm_zero_struct_page(), so struct page's are zeroed without > calling memset(). We do eight regular stores, thus avoid cost of membar. The commit message does no longer reflect the implementation, and shou

Re: strace-4.18 test suite oopses sparc64 4.12 and 4.13-rc kernels

2017-08-02 Thread Sam Ravnborg
On Tue, Aug 01, 2017 at 10:58:29PM +0200, Sam Ravnborg wrote: > Hi Mikael. > > I think this translates to the following code > from linux/uaccess.h > > first part is the inlined _copy_from_user() > > > > > (gdb) x/10i do_sys_poll+0x80-16 > >0x516ed

Re: strace-4.18 test suite oopses sparc64 4.12 and 4.13-rc kernels

2017-08-01 Thread Sam Ravnborg
Hi Mikael. I think this translates to the following code from linux/uaccess.h first part is the inlined _copy_from_user() > > (gdb) x/10i do_sys_poll+0x80-16 >0x516ed0 : brz %o0, 0x5170fc if (unlikely(res)) >0x516ed4 : mov %o0, %o2 >0x516ed8 : sub %i4, %o0, %i4 >0x516edc

Re: [RESEND PATCH] sparc: defconfig: Cleanup from old Kconfig options

2017-07-20 Thread Sam Ravnborg
On Thu, Jul 20, 2017 at 07:00:55AM +0200, Krzysztof Kozlowski wrote: > Remove old, dead Kconfig options (in order appearing in this commit): > - EXPERIMENTAL is gone since v3.9; > - INET_LRO: commit 7bbf3cae65b6 ("ipv4: Remove inet_lro library"); > - AUTOFS_FS: commit 561c5cf9236a ("staging: Rem

Re: [PATCH v2 00/28] kbuild: complete UAPI de-coupling and cleanup scripts/Makefile.headersinst

2017-07-10 Thread Sam Ravnborg
Hi Masahiro. On Mon, Jul 10, 2017 at 03:32:32AM +0900, Masahiro Yamada wrote: > In v4.12-rc1, we had a big progress for headers_install. > All (and only) headers under UAPI directories are exported. > However, asm-generic wrappers are still exceptions because > most of arch/*/include/asm/Kbuild in

Re: [PATCH 08/35] sparc: Convert remaining use of pr_warning to pr_warn

2017-02-17 Thread Sam Ravnborg
gt; + pcpu_fc_names[pcpu_chosen_fc], rc); Good to see that the string is now on one line. Acked-by: Sam Ravnborg

Re: [PATCH 01/50] x86/boot/e820: Introduce arch/x86/include/asm/e820/types.h

2017-01-31 Thread Sam Ravnborg
Hi Ingo. > > > > In this thread we have covered one rational reason to push thus > > burden to user space - to give the kernel the freedom to repair > > past stupidity (being that in naming or some other sort). > > There's no real "burden" for heaven's sake: it's having to execute a 'cp' > every

Re: [PATCH 01/50] x86/boot/e820: Introduce arch/x86/include/asm/e820/types.h

2017-01-31 Thread Sam Ravnborg
> > > > So just to repeat - it is an error prone design to let users > > of the kernel uapi maintain their own copies of the kernel > > uapi header. It is the job of the kernel. > > But "random copies" is not what perf does. Tell me, how is the perf mechanism > of > using the headers "error-pro

Re: [PATCH 01/50] x86/boot/e820: Introduce arch/x86/include/asm/e820/types.h

2017-01-30 Thread Sam Ravnborg
On Mon, Jan 30, 2017 at 08:58:33AM +0100, Ingo Molnar wrote: > > * Sam Ravnborg wrote: > > > On Sat, Jan 28, 2017 at 11:11:22PM +0100, Ingo Molnar wrote: > > > > > > The plan is to keep the old UAPI header in place but the kernel won't > > > us

Re: [PATCH 01/50] x86/boot/e820: Introduce arch/x86/include/asm/e820/types.h

2017-01-29 Thread Sam Ravnborg
On Sat, Jan 28, 2017 at 11:11:22PM +0100, Ingo Molnar wrote: > > The plan is to keep the old UAPI header in place but the kernel won't > use it anymore - and after some time we'll try to remove it. (User-space > tools better have local copies of headers anyway, instead of relying > on kernel heade

Re: [patch 00/10] cpu/hotplug: Final cleanup

2016-12-27 Thread Sam Ravnborg
> > Just curious - what is the stage TWO (and onwards) plan? > > lwn had some coverage of this work but I assume the > > article is somewhat outdated. > > Stage 2 is to consolidate all the archictecture code, i.e. reduce it to > really arch specific callbacks and keep all the other things > (synch

Re: [patch 00/10] cpu/hotplug: Final cleanup

2016-12-22 Thread Sam Ravnborg
Hi Thomas. On Wed, Dec 21, 2016 at 08:19:47PM +0100, Thomas Gleixner wrote: > The following series completes the cpuhotplug rework stage ONE. Just curious - what is the stage TWO (and onwards) plan? lwn had some coverage of this work but I assume the article is somewhat outdated. Sam

Re: [RFC PATCH 04/14] sparc64: load shared id into context register 1

2016-12-21 Thread Sam Ravnborg
Hi Mike. > Or, perhaps we only enable > the shared context ID feature on processors which have the ability to work > around the backwards compatibility feature. Start out like this, and then see if it is really needed with the older processors. This should keep the code logic simpler - which is

Re: [RFC PATCH 04/14] sparc64: load shared id into context register 1

2016-12-21 Thread Sam Ravnborg
On Sun, Dec 18, 2016 at 04:22:31PM -0800, Mike Kravetz wrote: > On 12/16/2016 11:45 PM, Sam Ravnborg wrote: > > Hi Mike > > > >> diff --git a/arch/sparc/kernel/fpu_traps.S b/arch/sparc/kernel/fpu_traps.S > >> index 336d275..f85a034 100644 > >> --- a/arc

Re: [RFC PATCH 02/14] sparc64: add new fields to mmu context for shared context support

2016-12-21 Thread Sam Ravnborg
On Sun, Dec 18, 2016 at 03:45:31PM -0800, Mike Kravetz wrote: > On 12/16/2016 11:38 PM, Sam Ravnborg wrote: > > Hi Mike > > > >> diff --git a/arch/sparc/include/asm/mmu_context_64.h > >> b/arch/sparc/include/asm/mmu_context_64.h > >> index b84be67..d0

Re: [RFC PATCH 02/14] sparc64: add new fields to mmu context for shared context support

2016-12-21 Thread Sam Ravnborg
Hi Mike. On Sun, Dec 18, 2016 at 03:33:59PM -0800, Mike Kravetz wrote: > On 12/16/2016 11:34 PM, Sam Ravnborg wrote: > > Hi Mike. > > > > On Fri, Dec 16, 2016 at 10:35:25AM -0800, Mike Kravetz wrote: > >> Add new fields to the mm_context structure to support sha

Re: [PATCH] sparc: use symbolic names for tsb indexing

2016-12-20 Thread Sam Ravnborg
On Mon, Dec 19, 2016 at 07:17:08PM -0800, Mike Kravetz wrote: > Use symbolic names MM_TSB_BASE and MM_TSB_HUGE instead of numeric values > 0 and 1 in __tsb_context_switch. Code cleanup only, no functional change. > > Suggested-by: Sam Ravnborg > Signed-off-by: Mike Kravetz

Re: [RFC PATCH 06/14] sparc64: general shared context tsb creation and support

2016-12-16 Thread Sam Ravnborg
Hi Mike > --- a/arch/sparc/mm/hugetlbpage.c > +++ b/arch/sparc/mm/hugetlbpage.c > @@ -162,8 +162,14 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long > addr, > { > pte_t orig; > > - if (!pte_present(*ptep) && pte_present(entry)) > - mm->context.hugetlb_pte_count

Re: [RFC PATCH 04/14] sparc64: load shared id into context register 1

2016-12-16 Thread Sam Ravnborg
Hi Mike > diff --git a/arch/sparc/kernel/fpu_traps.S b/arch/sparc/kernel/fpu_traps.S > index 336d275..f85a034 100644 > --- a/arch/sparc/kernel/fpu_traps.S > +++ b/arch/sparc/kernel/fpu_traps.S > @@ -73,6 +73,16 @@ do_fpdis: > ldxa[%g3] ASI_MMU, %g5 > .previous > > +661: n

Re: [RFC PATCH 02/14] sparc64: add new fields to mmu context for shared context support

2016-12-16 Thread Sam Ravnborg
Hi Mike > diff --git a/arch/sparc/include/asm/mmu_context_64.h > b/arch/sparc/include/asm/mmu_context_64.h > index b84be67..d031799 100644 > --- a/arch/sparc/include/asm/mmu_context_64.h > +++ b/arch/sparc/include/asm/mmu_context_64.h > @@ -35,15 +35,15 @@ void __tsb_context_switch(unsigned long

Re: [RFC PATCH 02/14] sparc64: add new fields to mmu context for shared context support

2016-12-16 Thread Sam Ravnborg
Hi Mike. On Fri, Dec 16, 2016 at 10:35:25AM -0800, Mike Kravetz wrote: > Add new fields to the mm_context structure to support shared context. > Instead of a simple context ID, add a pointer to a structure with a > reference count. This is needed as multiple tasks will share the > context ID. Wh

Re: [PATCH v6 1/2] sparc: fix a building error reported by kbuild

2016-12-09 Thread Sam Ravnborg
_id(cpu) (cpu_data(cpu).proc_id) >^ > Let's include cpudata.h in topology_64.h. > > Cc: Sam Ravnborg > Cc: David S. Miller > Cc: sparcli...@vger.kernel.org > Suggested-by: Sam Ravnborg > Signed-off-by: Gonglei Acked-by: Sam Ravnbor

Re: [PATCH v5 1/1] crypto: add virtio-crypto driver

2016-12-07 Thread Sam Ravnborg
On Mon, Dec 05, 2016 at 03:12:52AM +, Gonglei (Arei) wrote: > I don't think the root cause of those warnings are introduced by > virtio-crypto driver. > > What's your opinion? Sam and David? Root cause here is that arch/sparc/include/asm/topology_64.h references cpu_data without including ar

Re: [PATCH 1/2] watchdog: Introduce update_arch_nmi_watchdog

2016-10-06 Thread Sam Ravnborg
On Thu, Oct 06, 2016 at 03:16:42PM -0700, Babu Moger wrote: > Currently we do not have a way to enable/disable arch specific > watchdog handlers if it was implemented by any of the architectures. > > This patch introduces new function update_arch_nmi_watchdog > which can be used to enable/disable

Re: [PATCH v3 1/2] config: Adding the new config parameter CONFIG_PROVE_LOCKING_SMALL for sparc

2016-10-05 Thread Sam Ravnborg
On Wed, Oct 05, 2016 at 05:56:16PM -0500, Babu Moger wrote: > Dave, Gentle reminder to review this patch. Thanks No need to ping Dave. It is in patchwork and he will review the patch eventually. Sam

Re: [PATCH v3 1/2] config: Adding the new config parameter CONFIG_PROVE_LOCKING_SMALL for sparc

2016-09-28 Thread Sam Ravnborg
user > and only used for sparc. > > Signed-off-by: Babu Moger Acked-by: Sam Ravnborg

Re: [PATCH v3 2/2] lockdep: Limit static allocations if PROVE_LOCKING_SMALL is defined

2016-09-28 Thread Sam Ravnborg
On Tue, Sep 27, 2016 at 12:33:28PM -0700, Babu Moger wrote: > Reduce the size of data structure for lockdep entries by half if > PROVE_LOCKING_SMALL if defined. This is used only for sparc. > > Signed-off-by: Babu Moger Acked-by: Sam Ravnborg

Re: [PATCH v2 1/2] config: Add new CONFIG_PROVE_LOCKING_SMALL

2016-09-27 Thread Sam Ravnborg
On Tue, Sep 27, 2016 at 09:51:40AM -0500, Babu Moger wrote: > > On 9/27/2016 6:40 AM, Peter Zijlstra wrote: > >On Tue, Sep 27, 2016 at 06:46:25AM +0200, Sam Ravnborg wrote: > >>Since this is only relevant for sparc, and for sparc this is "select"ed, > >>t

Re: [PATCH v2 1/2] config: Add new CONFIG_PROVE_LOCKING_SMALL

2016-09-26 Thread Sam Ravnborg
Hi Babu. On Mon, Sep 26, 2016 at 03:31:37PM -0700, Babu Moger wrote: > Adding the new config parameter CONFIG_PROVE_LOCKING_SMALL for sparc. > > This feature limits the space used for "Lock debugging: prove locking > correctness" by about 4MB. The current sparc systms have the limitation of > 32M

Re: [4.1.x -- 4.6.x and probably HEAD] Reproducible unprivileged panic/TLB BUG on sparc via a stack-protected rt_sigaction() ka_restorer, courtesy of the glibc testsuite

2016-05-29 Thread Sam Ravnborg
Hi Dave. > Ok, mystery solved. Super good explanation... > > > >From d645a0376b0010cd60ae5651b3b84a56f5b0e5a4 Mon Sep 17 00:00:00 2001 > From: "David S. Miller" > Date: Sat, 28 May 2016 20:41:12 -0700 > Subject: [PATCH 2/2] sparc64: Fix return from trap window fill crashes.

Re: [patch V4] lib: GCD: Use binary GCD algorithm instead of Euclidean

2016-05-07 Thread Sam Ravnborg
> diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig > index 57ffaf2..ca675ed 100644 > --- a/arch/sparc/Kconfig > +++ b/arch/sparc/Kconfig > @@ -42,6 +42,7 @@ config SPARC > select ODD_RT_SIGACTION > select OLD_SIGSUSPEND > select ARCH_HAS_SG_CHAIN > + select CPU_NO_EFFICIEN

Re: [patch V3] lib: GCD: add binary GCD algorithm

2016-04-28 Thread Sam Ravnborg
> __ffs on the available architectures: > Alpha: sometimes (CONFIG_ALPHA_EV6, CONFIG_ALPHA_EV67) > ARC: sometimes (!CONFIG_ISA_ARCOMPACT) > ARM: sometimes (V5+) > ARM64: NO, could be written using RBIT and CLZ > AVR: yes > Blackfin: NO, could be written using hwe

Re: [PATCH] MAINTAINERS: net: Change maintainer for GRETH 10/100/1G Ethernet MAC device driver

2016-04-27 Thread Sam Ravnborg
Hi Andreas. Tak! Sam On Wed, Apr 27, 2016 at 04:46:10PM +0200, Andreas Larsson wrote: > Signed-off-by: Andreas Larsson > --- > MAINTAINERS |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 1d5b4be..08ffebd 100644 > --- a/MAIN

Re: [PATCH v2 08/30] Add sparc-specific parity functions

2016-04-06 Thread Sam Ravnborg
Hi Zeng. > > Use runtime patching for sparc64, lifted from hweight No errors found in patch - but a few comments. In general patch looks good. > +++ b/arch/sparc/include/asm/bitops_64.h > @@ -47,6 +47,24 @@ unsigned int __arch_hweight16(unsigned int w); > unsigned int __arch_hweight8(unsigned i

Re: [PATCH V2 01/30] bitops: add parity functions

2016-04-06 Thread Sam Ravnborg
On Wed, Apr 06, 2016 at 01:33:35PM +0800, Zeng Zhaoxiu wrote: > 在 2016年04月06日 03:04, Sam Ravnborg 写道: > >On Tue, Apr 05, 2016 at 10:06:21AM +0800, Zeng Zhaoxiu wrote: > >>From: Zhaoxiu Zeng > >> > >>These patches provide generic and architecture-specific odd

Re: [PATCH V2 01/30] bitops: add parity functions

2016-04-05 Thread Sam Ravnborg
On Tue, Apr 05, 2016 at 10:06:21AM +0800, Zeng Zhaoxiu wrote: > From: Zhaoxiu Zeng > > These patches provide generic and architecture-specific odd parity > calculations. Hi Zeng. Can you please fix your mail script. I see only 1/30 (sent to linux-arch) - and patch looks mangeled (broken lines)

Re: [PATCH 10/31] Add sparc-specific parity functions

2016-03-28 Thread Sam Ravnborg
On Mon, Mar 28, 2016 at 11:29:15AM -0400, David Miller wrote: > From: Zeng Zhaoxiu > Date: Mon, 28 Mar 2016 13:44:03 +0800 > > > 在 2016年03月28日 10:43, David Miller 写道: > >> From: "zhaoxiu.zeng" > >> Date: Sun, 27 Mar 2016 14:43:10 +0800 > >> > >>> + > >>> +/* > >>> + * parityN: returns the parity

Re: [PATCH 01/31] bitops: add parity functions

2016-03-27 Thread Sam Ravnborg
> diff --git a/include/asm-generic/bitops/arch_parity.h > b/include/asm-generic/bitops/arch_parity.h > new file mode 100644 > index 000..cddc555 > --- /dev/null > +++ b/include/asm-generic/bitops/arch_parity.h > @@ -0,0 +1,39 @@ > +#ifndef _ASM_GENERIC_BITOPS_ARCH_PARITY_H_ > +#define _ASM_GEN

Re: [PATCH 01/31] bitops: add parity functions

2016-03-27 Thread Sam Ravnborg
> > Any particular reason that you select one approach over the other > > in the different cases? > > No particular reason, just like the architecture's __arch_hweightN. The general recommendatiosn these days are to use static inline for code to get better type check. And it would also be nice to

Re: [PATCH 01/31] bitops: add parity functions

2016-03-27 Thread Sam Ravnborg
Hi Zeng. Looking through the arch specific implementations of __arch_parity(). Some architectures uses #defines, other uses inline static functions. Any particular reason that you select one approach over the other in the different cases? ia64: +#define __arch_parity32(x) ((unsigned int) __arch_

Re: [PATCH] kconfig: Add localdefconfig helper

2016-03-26 Thread Sam Ravnborg
On Sat, Mar 26, 2016 at 07:31:27PM +0100, Paul Kocialkowski wrote: > This introduces a localdefconfig make target to specify out-of-tree default > configs. The out-of-tree default target is selected by defining > KBUILD_LOCALDEFCONFIG in the make command line. > > The intent of this change is to e

Re: [PATCH 6/6] kconfig option for TRIM_UNUSED_EXPSYMS

2016-02-09 Thread Sam Ravnborg
> > so best via Sam's tree. That was some years ago ;-) Sam

Re: [PATCH 5/6] create/adjust generated/expsyms.h

2016-02-08 Thread Sam Ravnborg
On Mon, Feb 08, 2016 at 03:28:34PM -0500, Nicolas Pitre wrote: > Given the list of exported symbols needed by all modules, we can create > a header file containing preprocessor defines for each of those symbols. > Also, when some symbols are added and/or removed from the list, we can > update the t

Re: [PATCH 2/6] allow for per-symbol configurable EXPORT_SYMBOL()

2016-02-08 Thread Sam Ravnborg
On Mon, Feb 08, 2016 at 03:28:31PM -0500, Nicolas Pitre wrote: > Similar to include/generated/autoconf.h, include/generated/expsyms.h will > contain a list of defines for each EXPORT_SYMBOL() that we want active. > The format is: > > #define __EXPSYM_ 1 Please spell it out. EXP could be EXPECT.

Re: [PATCH 1/6] kbuild: record needed exported symbols for modules

2016-02-08 Thread Sam Ravnborg
> > +# List module undefined symbols > +ifdef CONFIG_TRIM_UNUSED_EXPSYMS > +cmd_undef_syms = $(NM) $@ | sed -n 's/^ \+U \(.*\)/\1/p' | xargs echo > +else > +cmd_undef_syms = echo > +endif Use ":" as a "do nothing" cammand. Then you do not emit an empty line. Sam

Re: [PATCH] [RFC] ARM: modify pgd_t definition for TRANSPARENT_HUGEPAGE_PUD

2016-02-03 Thread Sam Ravnborg
On Wed, Feb 03, 2016 at 02:21:48PM +0100, Arnd Bergmann wrote: > I ran into build errors on ARM after Willy's newly added generic > TRANSPARENT_HUGEPAGE_PUD support. We don't support this feature > on ARM at all, but the patch causes a build error anyway: > > In file included from ../kernel/memrem

Re: [PATCH 30/31] Add debugger entry points for SPARC

2016-01-28 Thread Sam Ravnborg
Hi Jeff. > +++ b/arch/sparc/include/asm/kdebug.h > @@ -5,4 +5,9 @@ > #else > #include > #endif > + > +static inline void arch_breakpoint(void) > +{ > + asm("ta $0x7d"); > +} > #endif There seems to be some debugger infrastructure present already for kgdb, but I assume this cannot be used.

Re: Query about merging memblock and bootmem into one new alloc

2015-12-22 Thread Sam Ravnborg
On Mon, Dec 21, 2015 at 11:01:01PM +0100, Arnd Bergmann wrote: > On Monday 21 December 2015, Laura Abbott wrote: > > ARM no longer uses bootmem, just memblock (see > > 84f452b1e8fc73ac0e31254c66e3e2260ce5263d > > ARM: mm: Remove bootmem code and switch to NO_BOOTMEM). Any bootmem calls > > just go

Re: [V2 PATCH] sparc64/gup: check address scope legitimacy

2015-12-05 Thread Sam Ravnborg
> >access_ok() always returns 1. > > Thanks for pointing it out. And, I didn't notice that gup is just built for > SPARC64. I though it is built by both 64 bit and 32 bit. > > A follow-up question, is there any reason to just have sparc specific fast > gup for 64 bit not for 32 bit? I do not know

Re: [V2 PATCH] sparc64/gup: check address scope legitimacy

2015-12-03 Thread Sam Ravnborg
Hi Yang. On Wed, Nov 25, 2015 at 02:45:43PM -0800, Yang Shi wrote: > Check if user address is accessible in atomic version __get_user_pages_fast() > before walking the page table. > And, check if end > start in get_user_pages_fast(), otherwise fallback to slow > path. Two different but related th

Re: [PATCH] sparc64: Fix numa distance values

2015-10-29 Thread Sam Ravnborg
Small nit. > diff --git a/arch/sparc/include/asm/topology_64.h > b/arch/sparc/include/asm/topology_64.h > index 01d1704..ed3dfdd 100644 > --- a/arch/sparc/include/asm/topology_64.h > +++ b/arch/sparc/include/asm/topology_64.h > @@ -31,6 +31,9 @@ static inline int pcibus_to_node(struct pci_bus *pb

Re: [RFC] arm: add __initbss section attribute

2015-10-12 Thread Sam Ravnborg
> --- a/include/asm-generic/vmlinux.lds.h > +++ b/include/asm-generic/vmlinux.lds.h > > -#define BSS_SECTION(sbss_align, bss_align, stop_align) > \ > +#define BSS_SECTION(sbss_align, bss_align, initbss_align, stop_align) > \ A few comments: 1) - pl

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-28 Thread Sam Ravnborg
> >> config ARM_THUMB > >> bool "Support Thumb user binaries" if !CPU_THUMBONLY > >> depends on CPU_ARM720T || CPU_ARM740T || CPU_ARM920T || CPU_ARM922T > >> || \ > >> Index: linux-2.6/arch/arm64/Kconfig > >> === > >> ---

Re: d63e2e1f3df breaks sparc/T5-8

2015-03-27 Thread Sam Ravnborg
> > Index: linux-2.6/arch/alpha/Kconfig > === > --- linux-2.6.orig/arch/alpha/Kconfig > +++ linux-2.6/arch/alpha/Kconfig > @@ -66,6 +66,9 @@ config ZONE_DMA > config ARCH_DMA_ADDR_T_64BIT > def_bool y > > +config ARCH_PCI_BUS

Re: [PATCH v2 12/22] sparc: %pf is only for function pointers

2015-03-14 Thread Sam Ravnborg
gt; > Signed-off-by: Scott Wood > Cc: sparcli...@vger.kernel.org > Cc: Sam Ravnborg Acked-by: Sam Ravnborg > --- > v2: Fix commit message to reflect that this patch is about %pf, not %pF. > > arch/sparc/kernel/ds.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [PATCH 12/22] sparc: %pF is only for function pointers

2015-03-12 Thread Sam Ravnborg
On Wed, Mar 11, 2015 at 10:13:47PM -0500, Scott Wood wrote: > Use %pS for actual addresses, otherwise you'll get bad output > on arches like ppc64 where %pF expects a function descriptor. Even on > other architectures, refrain from setting a bad example that people > copy. The commit message used

Re: [PATCH] Kconfig: drop bogus default values

2015-03-12 Thread Sam Ravnborg
On Thu, Mar 12, 2015 at 01:41:53PM +0100, Paul Bolle wrote: > On Thu, 2015-03-12 at 12:36 +, Jan Beulich wrote: > > >>> On 12.03.15 at 13:11, wrote: > > > On Wed, 2015-03-11 at 13:59 +, Jan Beulich wrote: > > >> Default "no" is pretty pointless for options without (visible) prompts: > > >

Re: [PATCH 12/22] sparc: %pF is only for function pointers

2015-03-12 Thread Sam Ravnborg
On Thu, Mar 12, 2015 at 01:49:42PM -0500, Scott Wood wrote: > On Thu, 2015-03-12 at 19:47 +0100, Sam Ravnborg wrote: > > On Wed, Mar 11, 2015 at 10:13:47PM -0500, Scott Wood wrote: > > > Use %pS for actual addresses, otherwise you'll get bad output > > > on arche

Re: [PATCH] kbuild: fix scripts/headers.sh to see the correct Kbuild path

2015-01-17 Thread Sam Ravnborg
On Tue, Jan 13, 2015 at 02:24:04PM +0900, Masahiro Yamada wrote: > Hi Sam, > > IIRC, you mentioned scripts/headers.sh is pointless > and should be removed from the code base. Took a quik look at it. It seems that there is use for it still. um require some special handling. And the HDR_ARCH_LIST f

Re: [PATCH] sparc32: nocheck uaccess coding style tweaks

2015-01-06 Thread Sam Ravnborg
On Wed, Jan 07, 2015 at 12:10:18AM +0200, Michael S. Tsirkin wrote: > Sam Ravnborg suggested packing single-lines cases in switch statements > in nocheck uaccess macros makes for easier to read code. > > Suggested-by: Sam Ravnborg > Signed-off-by: Michael S. Tsirkin Acked-b

Re: [PATCH] sparc64: minor coding style tweaks

2015-01-06 Thread Sam Ravnborg
On Tue, Jan 06, 2015 at 11:39:59PM +0200, Michael S. Tsirkin wrote: > Sam Ravnborg suggested packing single-line cases > in nocheck switch statements makes for easier to > read code. > > This is on top of arch/sparc: uaccess_64 macro whitespace fixes > that I sent earlier. >

Re: [PATCH v2 26/40] arch/sparc: uaccess_64 macro whitespace fixes

2015-01-06 Thread Sam Ravnborg
> > sparc64: fix coding style in uaccess_64.h > > OK. > I see David reviewed and sent acks, so I won't bother > reposting, but I'll tweak this in my tree. OK. > > > I get it you like it that > > > case 1: __get_user_asm(__gu_val,ub,addr,__gu_ret); break; > > > has the whole case on the same li

Re: [PATCH v2 26/40] arch/sparc: uaccess_64 macro whitespace fixes

2015-01-06 Thread Sam Ravnborg
On Tue, Jan 06, 2015 at 07:19:02PM +0200, Michael S. Tsirkin wrote: > On Tue, Jan 06, 2015 at 05:53:39PM +0100, Sam Ravnborg wrote: > > On Tue, Jan 06, 2015 at 05:44:56PM +0200, Michael S. Tsirkin wrote: > > > Macros within arch/sparc/include/asm/uaccess_64.h are made harder to

Re: [PATCH v2 26/40] arch/sparc: uaccess_64 macro whitespace fixes

2015-01-06 Thread Sam Ravnborg
On Tue, Jan 06, 2015 at 05:44:56PM +0200, Michael S. Tsirkin wrote: > Macros within arch/sparc/include/asm/uaccess_64.h are made harder to > read because they violate a bunch of coding style rules. > > Fix it up. As per Davem's earlier mail please prefix using sparc32/sparc64. > -#define __put_us

Re: [PATCH] kbuild: collect shorthands into the top Makefile

2014-10-29 Thread Sam Ravnborg
On Wed, Oct 29, 2014 at 04:27:31PM +0900, Masahiro Yamada wrote: > The motivation of this commit is to avoid duplicated definitions > of "clean" and "hdr-inst" shorthands. > > The shorthand "clean" is defined in both the top Makefile and > scripts/Makefile.clean. > > Likewise, "hdr-inst" is defin

Re: [PATCH] all arches, signal: Move restart_block to struct task_struct

2014-10-26 Thread Sam Ravnborg
sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h > index 025c98446b1e..88719dbb12f5 100644 > --- a/arch/sparc/include/asm/thread_info_32.h > +++ b/arch/sparc/include/asm/thread_info_32.h > @@ -62,9 +62,6 @@ struct thread_info { > .flags = 0,

Re: unaligned accesses in SLAB etc.

2014-10-23 Thread Sam Ravnborg
A minor detail. > [PATCH] sparc64: Fix register corruption in top-most kernel stack frame > during boot. > > - callstart_kernel > + call start_early_boot Maybe add a comment about stack use - as per your nice patch description. > +void __init start_early_boot(void) This will likel

Re: unaligned accesses in SLAB etc.

2014-10-19 Thread Sam Ravnborg
On Sun, Oct 19, 2014 at 01:27:37PM -0400, David Miller wrote: > From: Sam Ravnborg > Date: Sun, 19 Oct 2014 17:32:20 +0200 > > > This part: > > > >> + __attribute__ ((aligned(64))); > > > > Could be written as __aligned(64) > > I&#

Re: unaligned accesses in SLAB etc.

2014-10-19 Thread Sam Ravnborg
On Sat, Oct 18, 2014 at 02:23:35PM -0400, David Miller wrote: > From: David Miller > Date: Sat, 18 Oct 2014 13:59:07 -0400 (EDT) > > > I don't want to define the array size of the fpregs save area > > explicitly and thereby placing an artificial limit there. > > Nevermind, it seems we have a har

Re: Status of 'cris' architecture support in Linux kernel

2014-08-31 Thread Sam Ravnborg
On Sun, Aug 31, 2014 at 10:50:10AM -0700, Guenter Roeck wrote: > The idea was to create a crisv32 kernel and initramfs to work with qemu > for the ongoing Linux kernel test project. > > After spending a number of days (and nights) on it, the results don't look > very encouraging. > > My overall c

Re: [PATCHv3 0/9] Mark literal strings in __init / __exit code

2014-08-21 Thread Sam Ravnborg
On Thu, Aug 21, 2014 at 02:23:03PM +0200, Mathias Krause wrote: > This is v3 of the patch series initially posted here: > > https://lkml.org/lkml/2014/6/22/149 > > This series tries to address the problem of dangling strings of __init > functions after initialization, as well as __exit strings

Re: Overriding -Werror

2014-08-19 Thread Sam Ravnborg
On Wed, Aug 20, 2014 at 01:43:59AM +0200, Andi Kleen wrote: > On Tue, Aug 19, 2014 at 10:11:30PM +0200, Sam Ravnborg wrote: > > On Tue, Aug 19, 2014 at 06:15:07AM -0700, Andi Kleen wrote: > > > Brian Norris writes: > > > > > > > > 4. better ideas? > &

Re: Overriding -Werror

2014-08-19 Thread Sam Ravnborg
On Tue, Aug 19, 2014 at 06:15:07AM -0700, Andi Kleen wrote: > Brian Norris writes: > > > > 4. better ideas? > > Just send patches to remove -Werror in all architectures > as a tree sweep (and anywhere else where someone misguided add it) In arch/sparc/ we have -Werror and this has never troubled

Re: [PATCH v2] arch: Kconfig: Let all little endian architectures define CPU_LITTLE_ENDIAN explicitly

2014-08-12 Thread Sam Ravnborg
On Wed, Aug 13, 2014 at 06:48:35AM +0800, Chen Gang wrote: > x86 and ia64 are always little endian. And another architectures may be > little endian: mips, sh, powerpc, and m32r (may mark CPU_LITTLE_ENDIAN > explicitly); also arm(64) and c6x (which may be !CPU_BIG_ENDIAN). > > Some drivers (e.g. s

Re: [PATCH v3 2/2] x86: Add "make tinyconfig" to configure the tiniest possible kernel

2014-08-11 Thread Sam Ravnborg
On Mon, Aug 11, 2014 at 11:15:21AM -0700, j...@joshtriplett.org wrote: > On Fri, Aug 08, 2014 at 06:22:20PM -0700, Linus Torvalds wrote: > > On Fri, Aug 8, 2014 at 5:10 PM, Josh Triplett wrote: > > > Since commit 5d2acfc7b974bbd3858b4dd3f2cdc6362dd8843a ("kconfig: make > > > allnoconfig disable op

Re: [PATCH v3] kbuild: kselftest - new make target to build and run kernel selftests

2014-08-07 Thread Sam Ravnborg
' > + @echo 'Build, install, and boot kernel before' > + @echo ' running kselftest on it' It is never good to advertise to run something as root. But I see that this is recommended for now so the patch has my: Acked-

Re: [PATCH 00/10 v3] Coresight framework and drivers

2014-08-07 Thread Sam Ravnborg
Hi Mathieu. Maybe I just missed it, but ... > > As part of this patchset you will find: > > . The return of non-configurable replicators. Since they don't > show up on the AMBA bus we need to use the platform device model. > . It is now possible to configure and use multiple sinks simultaneou

Re: [PATCH 2/2] x86: Add "make tinyconfig" to configure the tiniest possible kernel

2014-08-07 Thread Sam Ravnborg
> > > > diff --git a/arch/x86/configs/tiny.config b/arch/x86/configs/tiny.config > > > new file mode 100644 > > > index 000..8f0e54c > > > --- /dev/null > > > +++ b/arch/x86/configs/tiny.config > > > @@ -0,0 +1,5 @@ > > > +CONFIG_CC_OPTIMIZE_FOR_SIZE=y > > > +CONFIG_KERNEL_XZ=y > > > +CONFIG_N

Re: [PATCH] kbuild: escape single backslashes in macro make-cmd

2014-08-07 Thread Sam Ravnborg
enclose the whole string in '...' > +# (needed for the shell) > +make-cmd = $(call escsq,$(subst \#,\\\#,$(subst $$,,$(cmd_$(1) This is simpler and remotely readble - nice! As a bonus you added more descriptive comments Looks good. You may add my: Reviewed-by: Sam Ravnborg

Re: [PATCH 2/2] x86: Add "make tinyconfig" to configure the tiniest possible kernel

2014-08-07 Thread Sam Ravnborg
On Wed, Aug 06, 2014 at 03:31:54PM -0700, Josh Triplett wrote: > Since commit 5d2acfc7b974bbd3858b4dd3f2cdc6362dd8843a ("kconfig: make > allnoconfig disable options behind EMBEDDED and EXPERT") in 3.15-rc1, > "make allnoconfig" disables every possible config option. > > However, a few configuratio

Re: [PATCH v2] kbuild: kselftest - new make target to build and run kernel selftests

2014-08-07 Thread Sam Ravnborg
On Thu, Aug 07, 2014 at 08:03:12AM -0600, Shuah Khan wrote: > Add a new make target "kselftest" to enable kernel testing. This > new target builds and runs kernel selftests. Running as root is > recommended for a complete test run as some tests don't run when > run by non-root user. kselftest will

<    3   4   5   6   7   8   9   10   11   12   >