Re: [PATCH v5 0/2] MTE support for KVM guest

2020-12-09 Thread Richard Henderson
On 12/9/20 12:39 PM, Catalin Marinas wrote: >> I would have thought that the best way is to use TCO, so that we don't have >> to >> have dual mappings (and however many MB of extra page tables that might >> imply). > > The problem appears when the VMM wants to use MTE itself (e.g. linked > again

Re: [PATCH v5 0/2] MTE support for KVM guest

2020-12-09 Thread Richard Henderson
On 12/9/20 9:27 AM, Catalin Marinas wrote: > On Wed, Dec 09, 2020 at 01:25:18PM +, Marc Zyngier wrote: >> Would this syscall operate on the guest address space? Or on the VMM's >> own mapping? ... > Whatever is easier for the VMM, I don't think it matters as long as the > host kernel can get th

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-10 Thread Richard Henderson
On 9/10/20 3:24 AM, Steven Price wrote: > It is a shame, however I suspect this is because to use those instructions you > need to know the block size held in GMID_EL1. And at least in theory that > could > vary between CPUs. Which is no different from having to read DCZID_EL0 in order to impleme

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-09 Thread Richard Henderson
On 9/4/20 9:00 AM, Steven Price wrote: > 3. Doesn't provide any new methods for the VMM to access the tags on > memory. ... > (3) may be problematic and I'd welcome input from those familiar with > VMMs. User space cannot access tags unless the memory is mapped with the > PROT_MTE flag. Howeve

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-09 Thread Richard Henderson
On 9/9/20 8:25 AM, Andrew Jones wrote: >> * Provide a KVM-specific method to extract the tags from guest memory. >>This might also have benefits in terms of providing an easy way to >>read bulk tag data from guest memory (since the LDGM instruction >>isn't available at EL0). > > Maybe

Re: [PATCH v2 08/12] arm64: BTI: Decode BYTPE bits when printing PSTATE

2019-10-11 Thread Richard Henderson
On 10/10/19 2:44 PM, Dave Martin wrote: > #define PSR_IL_BIT (1 << 20) > -#define PSR_BTYPE_CALL (2 << PSR_BTYPE_SHIFT) > + > +/* Convenience names for the values of PSTATE.BTYPE */ > +#define PSR_BTYPE_NONE (0b00 << PSR_BTYPE_SHIFT) > +#define PSR_BTYPE_JC

Re: [PATCH v2 05/12] arm64: Basic Branch Target Identification support

2019-10-11 Thread Richard Henderson
On 10/11/19 11:10 AM, Mark Rutland wrote: > On Thu, Oct 10, 2019 at 07:44:33PM +0100, Dave Martin wrote: >> @@ -730,6 +730,11 @@ static void setup_return >> regs->regs[29] = (unsigned long)&user->next_frame->fp; >> regs->pc = (unsigned long)ka->sa.sa_handler; >> >> +if (system_suppo

Re: [PATCH v6 04/13] arm64/kvm: hide ptrauth from guests

2018-12-10 Thread Richard Henderson
On 12/10/18 2:12 PM, Kristina Martsenko wrote: > The plan was to disable trapping, yes. However, after that thread there > was a retrospective change applied to the architecture, such that the > XPACLRI (and XPACD/XPACI) instructions are no longer trapped by > HCR_EL2.API. (The public documentation

Re: [PATCH v6 08/13] arm64: expose user PAC bit positions via ptrace

2018-12-10 Thread Richard Henderson
On 12/10/18 6:03 AM, Catalin Marinas wrote: >> However, it won't be too long before someone implements support for >> ARMv8.2-LVA, at which point, without changes to mandatory pointer tagging, we >> will only have 3 authentication bits: [54:52]. This seems useless and easily >> brute-force-able. >

Re: [PATCH v6 08/13] arm64: expose user PAC bit positions via ptrace

2018-12-09 Thread Richard Henderson
On 12/7/18 12:39 PM, Kristina Martsenko wrote: > When pointer authentication is in use, data/instruction pointers have a > number of PAC bits inserted into them. The number and position of these > bits depends on the configured TCR_ELx.TxSZ and whether tagging is > enabled. ARMv8.3 allows tagging t

Re: [PATCH v6 08/13] arm64: expose user PAC bit positions via ptrace

2018-12-09 Thread Richard Henderson
+ > include/uapi/linux/elf.h | 1 + > 4 files changed, 54 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH v6 07/13] arm64: add basic pointer authentication support

2018-12-09 Thread Richard Henderson
4/kernel/cpuinfo.c | 2 + > arch/arm64/kernel/process.c | 4 ++ > 6 files changed, 100 insertions(+) > create mode 100644 arch/arm64/include/asm/pointer_auth.h Reviewed-by: Richard Henderson r~

Re: [PATCH v6 06/13] arm64/cpufeature: detect pointer authentication

2018-12-09 Thread Richard Henderson
ture.c | 90 > +++++ > 3 files changed, 109 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v6 05/13] arm64: Don't trap host pointer auth use to EL2

2018-12-09 Thread Richard Henderson
rtsenko > Acked-by: Christoffer Dall > Cc: Catalin Marinas > Cc: Marc Zyngier > Cc: Will Deacon > Cc: kvm...@lists.cs.columbia.edu > --- > arch/arm64/include/asm/kvm_arm.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v6 04/13] arm64/kvm: hide ptrauth from guests

2018-12-09 Thread Richard Henderson
On 12/7/18 12:39 PM, Kristina Martsenko wrote: > From: Mark Rutland > > In subsequent patches we're going to expose ptrauth to the host kernel > and userspace, but things are a bit trickier for guest kernels. For the > time being, let's hide ptrauth from KVM guests. > > Regardless of how well-be

Re: [PATCH v6 03/13] arm64/kvm: consistently handle host HCR_EL2 flags

2018-12-09 Thread Richard Henderson
on > Cc: kvm...@lists.cs.columbia.edu > --- > arch/arm64/include/asm/kvm_arm.h | 1 + > arch/arm64/kernel/head.S | 5 ++--- > arch/arm64/kvm/hyp/switch.c | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v6 01/13] arm64: add comments about EC exception levels

2018-12-09 Thread Richard Henderson
-- > 1 file changed, 7 insertions(+), 7 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v6 02/13] arm64: add pointer authentication register bits

2018-12-09 Thread Richard Henderson
On 12/7/18 12:39 PM, Kristina Martsenko wrote: > #define SCTLR_ELx_DSSBS (1UL << 44) > +#define SCTLR_ELx_ENIA (1 << 31) 1U or 1UL lest you produce signed -0x8000. Otherwise, Reviewed-by: Richard Henderson r~

Re: [PATCH 0/2] Use named address spaces for percpu data

2018-09-12 Thread Richard Henderson
related, I came across them, and asked Richard's permission > to resurrect and resend the patch, with the changes Ingo asked for at > the time. > > The important information about why we want these patch is in 1/2. > > Richard Henderson (2): > x86: Use named addr

Re: [OpenRISC] Removing architectures without upstream gcc support

2018-02-25 Thread Richard Henderson
On 02/23/2018 10:19 AM, Al Viro wrote: > For m68k, > IIRC, qemu is mostly for coldfire and friends with aranym > working for m68k/MMU testing. Laurent Vivier is in the process of fixing that upstream, it won't all make qemu 2.12. He has a branch with full support for a Mac Quadra 800: https://

Re: [PATCH 1/7] signal/alpha: Document a conflict with SI_USER for SIGTRAP

2017-07-18 Thread Richard Henderson
ople to be able to depend upon it. v2: Added FPE_FIXME for alpha as Helge Deller pointed out with his alternate patch one of the cases is SIGFPE not SIGTRAP. Cc: Helge Deller Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc:linux-al...@vger.kernel.org History Tree:https://git.

Re: [PATCH] alpha: provide ioread64 and iowrite64 implementations

2017-06-24 Thread Richard Henderson
On 06/24/2017 08:32 AM, Logan Gunthorpe wrote: So, IMO, the Jensen inq and outq funtions in your patch, which I did read, should probably just not be provided. So you would prefer a function containing BUG? Because I have to have *something* to put into the machvec function pointer. r~

Re: [PATCH] alpha: provide ioread64 and iowrite64 implementations

2017-06-24 Thread Richard Henderson
On 06/24/2017 08:19 AM, Logan Gunthorpe wrote: Hey, On 24/06/17 09:13 AM, Richard Henderson wrote: All Alpha hosts except for Jensen provide 64-bit I/O operations. Jensen is EISA only, so there ought not be any devices that even attempt such operations. But just in case, use 2 32-bit

[PATCH] alpha: provide ioread64 and iowrite64 implementations

2017-06-24 Thread Richard Henderson
All Alpha hosts except for Jensen provide 64-bit I/O operations. Jensen is EISA only, so there ought not be any devices that even attempt such operations. But just in case, use 2 32-bit operations. Cc: Logan Gunthorpe Cc: Ivan Kokshaysky Cc: Matt Turner Signed-off-by: Richard Henderson

Re: [PATCH] alpha: support R_ALPHA_REFLONG relocations for module loading

2017-06-24 Thread Richard Henderson
| 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH] pci: Add and use PCI_GENERIC_SETUP Kconfig entry

2017-06-24 Thread Richard Henderson
o see that an aarch64 defconfig still build setup-irq.o with the patch applied. The intention is that this patch doesn't change the behavior of any build. Signed-off-by: Palmer Dabbelt Reviewed-by: James Hogan --- arch/alpha/Kconfig | 1 + Acked-by: Richard Henderson r~

[PATCH 1/3] alpha: Update for new syscalls

2017-06-23 Thread Richard Henderson
Signed-off-by: Richard Henderson --- arch/alpha/include/asm/unistd.h | 2 +- arch/alpha/include/uapi/asm/unistd.h | 14 ++ arch/alpha/kernel/systbls.S | 9 + 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/arch/alpha/include/asm/unistd.h b/arch

[PATCH 2/3] alpha: Package string routines together

2017-06-23 Thread Richard Henderson
There are direct branches between {str*cpy,str*cat} and stx*cpy. Ensure the branches are within range by merging these objects. Signed-off-by: Richard Henderson --- arch/alpha/lib/Makefile | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/arch/alpha/lib

[PATCH 0/3] Updates for Alpha

2017-06-23 Thread Richard Henderson
(1) Wire up the new syscalls. (2) Fix a build error causing ld to report out-of-range branches. (3) Fix a build error for the EV6 assembler. Suggestions on a better way to implement the second patch within the Kbuild infrastructure are welcomed. r~ Richard Henderson (3): alpha: Update for

[PATCH 3/3] alpha: Fix typo in ev6-copy_user.S

2017-06-23 Thread Richard Henderson
Patch 8525023121de4848b5f0a7d867ffeadbc44d introduced a typo. That said, the identity AND insns added by that patch are more clearly written as MOV. At the same time, re-schedule the ev6 version so that the first dispatch can execute in parallel. Signed-off-by: Richard Henderson --- arch

Re: [PATCH 4/7] alpha: provide ioread64 and iowrite64 implementations

2017-06-22 Thread Richard Henderson
On 06/22/2017 09:48 AM, Logan Gunthorpe wrote: Alpha implements its own io operation and doesn't use the common library. Thus to make ioread64 and iowrite64 globally available we need to add implementations for alpha. For this, we simply use calls that chain two 32-bit operations. (mostly becaus

Re: [PATCH] tty: add TIOCGPTPEER ioctl

2017-06-01 Thread Richard Henderson
On 06/01/2017 01:00 PM, Aleksa Sarai wrote: --- a/arch/alpha/include/uapi/asm/ioctls.h +++ b/arch/alpha/include/uapi/asm/ioctls.h @@ -94,6 +94,7 @@ #define TIOCSRS485 _IOWR('T', 0x2F, struct serial_rs485) #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux d

Re: [OpenRISC] [PATCH v3 09/25] openrisc: add optimized atomic operations

2017-02-22 Thread Richard Henderson
On 02/23/2017 01:22 AM, Stafford Horne wrote: static inline int __atomic_add_unless(atomic_t *v, int a, int u) { int old, tmp; __asm__ __volatile__( "1: l.lwa %0, 0(%2) \n" " l.sfeq %0, %4 \n" " l.b

Re: [OpenRISC] [PATCH v3 08/25] openrisc: add cmpxchg and xchg implementations

2017-02-22 Thread Richard Henderson
On 02/23/2017 01:20 AM, Stafford Horne wrote: On Wed, Feb 22, 2017 at 12:19:40PM +0100, Peter Zijlstra wrote: On Wed, Feb 22, 2017 at 04:11:37AM +0900, Stafford Horne wrote: + __asm__ __volatile__( + "1:l.lwa %0, 0(%1) \n" + " l.sfeq %0, %2

BPF runtime for systemtap

2016-06-14 Thread Richard Henderson
I'm pleased to be able to announce an initial implementation of an (e)bpf backend for systemtap. For the subset of systemtap probes that can use kprobes, we can use a bpf filter instead of loading a kernel module. As this implementation is young, there are a number of limitations. Neither st

Re: [RFC][PATCH 02/31] locking,alpha: Implement atomic{,64}_fetch_{add,sub,and,andnot,or,xor}()

2016-04-22 Thread Richard Henderson
On 04/22/2016 02:04 AM, Peter Zijlstra wrote: > + "1: ldl_l %0,%1\n" \ > + " mov %0,%2\n"\ > + " " #asm_op " %0,%3,%0\n" \ > + " stl_c %0,%1\n"

Re: [PATCH 03/31] Add alpha-specific parity functions

2016-03-28 Thread Richard Henderson
On 03/26/2016 10:43 PM, zhaoxiu.zeng wrote: From: Zeng Zhaoxiu Signed-off-by: Zeng Zhaoxiu --- arch/alpha/include/asm/bitops.h | 27 +++ 1 file changed, 27 insertions(+) Acked-by: Richard Henderson r~

[PATCH] x86: Use named address spaces in asm/percpu.h

2016-02-02 Thread Richard Henderson
__uv_hub_info ... + movzbl 0x15(%rax,%r9,1),%ecx ... + or (%rax,%r9,1),%rdx The final vmlinux text size is reduced by about 5k for a standard Fedora configure. Cc: Ingo Molnar Cc: "H. Peter Anvin" Signed-off-by: Richard Henderson --- arch/x86/include/asm/perc

Re: no-op delay loops

2015-12-01 Thread Richard Henderson
On 11/30/2015 01:29 PM, Rasmus Villemoes wrote: ./arch/alpha/boot/main.c:187:1-4: no-op delay loop Not sure why this is there. The runkernel function that preceeds it cannot return, having performed an indirect branch (not a call) to the kernel start. I see no reason to actually change anyt

Re: Ping Re: [PATCH 0/8] math-emu: Update kernel math-emu code from current glibc soft-fp

2015-08-26 Thread Richard Henderson
thing* from the other maintainers. Ping again for the other-architecture maintainers (alpha, s390, sh, sparc) I thought I already gave an Acked-by: Richard Henderson for the alpha patches. r~ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bo

Re: [RFC] Design for flag bit outputs from asms

2015-05-04 Thread Richard Henderson
On 05/04/2015 01:45 PM, Linus Torvalds wrote: > On Mon, May 4, 2015 at 1:33 PM, Richard Henderson wrote: >> >> A fair point. Though honestly, I was hoping that this feature would mostly >> be >> used for conditions that are "weird" -- that is, not normall

Re: [RFC] Design for flag bit outputs from asms

2015-05-04 Thread Richard Henderson
On 05/04/2015 01:14 PM, H. Peter Anvin wrote: > On 05/04/2015 12:33 PM, Richard Henderson wrote: >> >> (0) The C level output variable should be an integral type, from bool on up. >> >> The flags are a scarse resource, easily clobbered. We cannot allow user code &

[RFC] Design for flag bit outputs from asms

2015-05-04 Thread Richard Henderson
On 05/02/2015 05:39 AM, Peter Zijlstra wrote: > static inline bool __test_and_clear_bit(long nr, volatile unsigned long *addr) > { > bool oldbit; > > asm volatile ("btr %2, %1" > : "CF" (oldbit), "+m" (*addr) > : "Ir" (nr)); > > return old

Re: [PATCH] x86: Optimize variable_test_bit()

2015-05-04 Thread Richard Henderson
On 05/02/2015 05:39 AM, Peter Zijlstra wrote: > On Fri, May 01, 2015 at 01:49:52PM -0700, Linus Torvalds wrote: >> On Fri, May 1, 2015 at 12:02 PM, Vladimir Makarov >> wrote: >>> >>> GCC RA is a major reason to prohibit output operands for asm goto. >> >> Hmm.. Thinking some more about it, I th

Re: [RFC PATCH v2 10/15] cpu-model/s390: Add cpu class initialization routines

2015-02-20 Thread Richard Henderson
On 02/17/2015 06:24 AM, Michael Mueller wrote: > +static inline uint64_t big_endian_bit(unsigned long nr) > +{ > +return 1ul << (BITS_PER_LONG - (nr % BITS_PER_LONG)); > +}; This is buggy. NR=0 should map to 63, not 64. > +return !!(*ptr & big_endian_bit(nr)); Personally I dislike !! as

Re: [RFC PATCH v2 10/15] cpu-model/s390: Add cpu class initialization routines

2015-02-20 Thread Richard Henderson
On 02/17/2015 06:24 AM, Michael Mueller wrote: > +/** > + * s390_test_facility - test if given facility bit is set facility list > + * of given cpu class > + * @class: address of cpu class to test > + * @nr: bit number to test > + * > + * Returns: true in case it is set > + *

Re: [PATCHv2, RESEND 01/19] alpha: expose number of page table levels on Kconfig level

2015-02-06 Thread Richard Henderson
On 02/06/2015 06:50 AM, Kirill A. Shutemov wrote: > We would want to use number of page table level to define mm_struct. > Let's expose it as CONFIG_PGTABLE_LEVELS. > > Signed-off-by: Kirill A. Shutemov > Cc: Richard Henderson > Cc: Ivan Kokshaysky > Cc: Matt Turner

Re: [PATCH 1/2] alpha: Remove "strange" OSF/1 fork semantics

2014-07-30 Thread Richard Henderson
On 07/30/2014 12:04 PM, Måns Rullgård wrote: > Richard Henderson writes: > >> The assignment to regs->r20 kills the original tls_val input >> to the clone syscall, which means that clone can no longer be >> restarted with the original inputs. >> >> We coul

Re: [PATCH 2/2] alpha: Add sched_set/getattr and renameat2 syscalls

2014-07-30 Thread Richard Henderson
On 07/30/2014 12:21 PM, Michael Cree wrote: > On Wed, Jul 30, 2014 at 11:42:32AM -1000, Richard Henderson wrote: >> Signed-off-by: Richard Henderson >> --- >> arch/alpha/include/asm/unistd.h | 2 +- >> arch/alpha/include/uapi/asm/unistd.h | 3 +++ >> arch/al

[PATCH 2/2] alpha: Add sched_set/getattr and renameat2 syscalls

2014-07-30 Thread Richard Henderson
Signed-off-by: Richard Henderson --- arch/alpha/include/asm/unistd.h | 2 +- arch/alpha/include/uapi/asm/unistd.h | 3 +++ arch/alpha/kernel/systbls.S | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm

[PATCH 1/2] alpha: Remove "strange" OSF/1 fork semantics

2014-07-30 Thread Richard Henderson
the r20 result value, instead always testing r0 vs 0 to determine the child/parent status. This failure can be seen in the glibc nptl/tst-eintr* tests. Reported-by: Michael Cree Signed-off-by: Richard Henderson --- arch/alpha/kernel/process.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/a

[PATCH 0/2] alpha updates

2014-07-30 Thread Richard Henderson
The first patch should fix the clone bug that Michael Cree reported. The second patch adds the three new syscalls since the last update. The tree can be found at git://github.com/rth7680/linux.git axp-next r~ Richard Henderson (2): alpha: Remove "strange" OSF/1 fork semanti

Re: Bug: retry of clone() on Alpha can result in zeroed process thread pointer

2014-07-30 Thread Richard Henderson
Ok, I think I've actually found it this time. It's here: > 281 childregs->r20 = 1; /* OSF/1 has some strange fork() > semantics. */ > 282 regs->r20 = 0; We need to delay this r20 silliness until after restarts or something. Or just kill it -- it's not like glibc uses t

Re: Bug: retry of clone() on Alpha can result in zeroed process thread pointer

2014-07-24 Thread Richard Henderson
On 07/22/2014 10:52 PM, Michael Cree wrote: > Running strace on nptl/tst-eintr3 reveals that the clone() syscall > is retried by the kernel if an ERESTARTNOINTR error occurs. At > $syscall_error in arch/alpha/kernel/entry.S the kernel handles the > error and in doing that it writes to 72(sp) which

Re: bit fields && data tearing

2014-07-15 Thread Richard Henderson
On 07/15/2014 06:54 AM, Peter Hurley wrote: > > Jonathan Corbet wrote a LWN article about this back in 2012: > http://lwn.net/Articles/478657/ > > I guess it's fixed in gcc 4.8, but too bad there's not a workaround for > earlier compilers (akin to -fstrict_volatile_bitfields without requiring > t

Re: FIX ME message in osf_sys.c

2014-07-03 Thread Richard Henderson
On 07/03/2014 10:21 AM, Nick Krause wrote: > There seems to be a Fix Me message on line 892 due to info.si_addr = NULL. > I am wondering what value I should declare this variable to instead of Null. > Cheers Nick > The closest thing to compatibility with SIGFPE raised through normal arithmetic wo

Re: [PATCH v2 05/18] alpha: io: implement relaxed accessor macros for writes

2014-05-22 Thread Richard Henderson
e vein as > the relaxed read macros, which are already implemented. > > Cc: Richard Henderson > Cc: Ivan Kokshaysky > Cc: Matt Turner > Signed-off-by: Will Deacon > --- > arch/alpha/include/asm/io.h | 12 > 1 file changed, 8 insertions(+), 4 deletions(-

Re: [RFC][PATCH 1/8] sched,idle,alpha: Switch from TS_POLLING to TIF_POLLING_NRFLAG

2014-04-11 Thread Richard Henderson
Thomas Gleixner > Cc: Andy Lutomirski > Cc: Richard Henderson > Signed-off-by: Peter Zijlstra > --- > arch/alpha/include/asm/thread_info.h | 4 ++-- > 1 file changed, 2 inser Acked-by: Richard Henderson r~ -- To unsubscribe from this list: send the line "

Re: [PATCH 37/73] alpha: delete non-required instances of

2014-01-21 Thread Richard Henderson
e next. Acked-by: Richard Henderson r~ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 22/73] alpha: don't use module_init for non-modular core code

2014-01-21 Thread Richard Henderson
nce does not change the init order, making the > impact of this change zero. Should someone with real hardware > for boot testing want to change it later to arch_initcall or > console_initcall, they can do that at a later date. > > Cc: Richard Henderson > Cc: Ivan Kokshaysky >

Re: [PATCH v8 4/4] qrwlock: Use smp_store_release() in write_unlock()

2014-01-14 Thread Richard Henderson
On 01/14/2014 09:08 AM, Matt Turner wrote: > On Tue, Jan 14, 2014 at 3:03 AM, Peter Zijlstra wrote: >> On Tue, Jan 14, 2014 at 10:28:23AM +0800, Daniel J Blueman wrote: Peter, I found out that the build failure was caused by the fact that the __native_word() macro (used interna

Re: [PATCH 37/40] alpha: Replace __get_cpu_var

2013-12-19 Thread Richard Henderson
x = __get_cpu_var(y); > >Converts to > > memcpy(&x, this_cpu_ptr(&y), sizeof(x)); > > > 5. Assignment to a per cpu variable > > DEFINE_PER_CPU(int, y) > __get_cpu_var(y) = x; > >Converts to > > this_cpu_write(y, x

Multiple local register variables w/ same register

2013-11-19 Thread Richard Henderson
On 11/20/2013 03:33 AM, Peter Zijlstra wrote: > On Tue, Nov 19, 2013 at 05:02:20PM +, Mathieu Desnoyers wrote: >> Unfortunately I don't have a ARM cross-compiler setup ready. Nathan could >> test >> it for us though. >> >> It might shuffle things around enough to work around the issue, but wit

Re: [PATCH 01/17] alpha: Use Kbuild logic to include

2013-11-12 Thread Richard Henderson
On 11/13/2013 05:42 AM, Geert Uytterhoeven wrote: > Signed-off-by: Geert Uytterhoeven > Cc: Richard Henderson > Cc: linux-al...@vger.kernel.org > --- > arch/alpha/include/asm/Kbuild |2 +- > arch/alpha/include/asm/sections.h |7 --- > 2 files changed, 1 inse

Re: [PATCH, -v3] compiler/gcc4: Add quirk for 'asm goto' miscompilation bug

2013-10-10 Thread Richard Henderson
On 10/10/2013 08:12 AM, Ingo Molnar wrote: > Indeed. Something like the updated version below? > > [ I kept the asm_volatile_goto() naming to make sure the implicit volatile > is visible. ] > > Thanks, > > Ingo Looks good. Reviewed-by: Richard Henderson r

Re: [PATCH] gcc4: Add 'asm goto' miscompilation quirk

2013-10-10 Thread Richard Henderson
On 10/10/2013 01:31 AM, Jakub Jelinek wrote: > Also, for the bitops patch, you probably want an asm_volatile_goto variant. Why? Asm without output (which asm goto must be) are automatically volatile. r! -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: [PATCH] Kconfig cleanup (PARPORT_PC dependencies)

2013-09-12 Thread Richard Henderson
_bool y > > +config ARCH_MAY_HAVE_PC_PARPORT > + def_bool y > + Acked-by: Richard Henderson r~ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/major

Re: [RFC] gcc feature request: Moving blocks into sections

2013-08-05 Thread Richard Henderson
On 08/05/2013 09:57 AM, Jason Baron wrote: > On 08/05/2013 03:40 PM, Marek Polacek wrote: >> On Mon, Aug 05, 2013 at 11:34:55AM -0700, Linus Torvalds wrote: >>> On Mon, Aug 5, 2013 at 11:24 AM, Linus Torvalds >>> wrote: Ugh. I can see the attraction of your section thing for that case, I

Re: [PATCH 0/7] Minor Alpha updates for 3.11

2013-07-24 Thread Richard Henderson
On 07/24/2013 12:25 AM, Michael Cree wrote: > Searching for NR_umount finds the following packages that compile on > Alpha: > > eglibc Fork of glibc, which I did examine; I'll assume it's the same code. > dietlibc > uclibc Rob reports that uclibc is fixed by the rename. From what I see in the

Re: [PATCH 0/7] Minor Alpha updates for 3.11

2013-07-23 Thread Richard Henderson
On 07/22/2013 07:25 PM, Michael Cree wrote: > I wondered if your proposal will break glibc as glibc checks for > __NR_oldumount and does different things based on that. But maybe your > fix will not adversely affect glibc (I did not look particularly closely > to see if so), but even so, there is

Re: [RFC PATCH 00/10] Alpha support for QEMU

2013-07-18 Thread Richard Henderson
On 07/18/2013 02:28 PM, Michael Cree wrote: > The kernel without the patch set has the "Using epoch 2000" line and > the kernel with the patch set is missing the "Using epoch 2000" line. Ah hah. You appear to be missing CONFIG_RTC_DRV_ALPHA in the new kernel, so you have no support for the RTC at

Re: [RFC PATCH 00/10] Alpha support for QEMU

2013-07-18 Thread Richard Henderson
On 07/17/2013 06:14 PM, Michael Cree wrote: > Tested the patch series applied against 3.10.1 on a 3-CPU ES45. System came > up fine but I noticed date was wrong and had been reset back to the start > of the epoch (Jan 1 1970). Appears it is not reading hardware clock > correctly on boot. Please

Re: [RFC PATCH 05/10] alpha: Primitive support for CPU power down.

2013-07-17 Thread Richard Henderson
On 07/16/2013 10:17 PM, Matt Turner wrote: > On Tue, Jul 16, 2013 at 10:34 AM, Richard Henderson wrote: >> Use WTINT to wait for the next interrupt. Squash the WTINT call >> if the PALcode doesn't support it (e.g. MILO). No attempt is yet >> made to skip clock ticks d

Re: [PATCH 0/7] Minor Alpha updates for 3.11

2013-07-17 Thread Richard Henderson
On 07/16/2013 09:29 PM, Matt Turner wrote: > I've got five patches in a for-linus branch on kernel.org that I was > planning to send a pull request for soon. Would you like me to add > these to that branch? Yes, please. r~ -- To unsubscribe from this list: send the line "unsubscribe linux-kerne

Re: [PATCH 3/7] alpha: Modernize lib/mpi/longlong.h

2013-07-16 Thread Richard Henderson
On 07/16/2013 10:19 AM, Joe Perches wrote: > On Tue, 2013-07-16 at 10:04 -0700, Richard Henderson wrote: >> Remove the compile warning for __udiv_qrnnd not having a prototype. >> Use the __builtin_alpha_umulh introduced in gcc 4.0. > > Isn't gcc 3.x still a su

[RFC PATCH 07/10] alpha: Add an rtc driver for the qemu wallclock PALcall

2013-07-16 Thread Richard Henderson
In the normal case, one wants the guest to follow the host time. QEMU has a cserve call that retrieves the wall clock. Signed-off-by: Richard Henderson --- arch/alpha/include/asm/pal.h | 56 ++ arch/alpha/kernel/Makefile | 3 +- arch/alpha/kernel/rtc.c

[RFC PATCH 01/10] alpha: Don't if-out dp264_device_interrupt.

2013-07-16 Thread Richard Henderson
The code as written is correct, and will be used by QEMU emulation. Signed-off-by: Richard Henderson --- arch/alpha/kernel/sys_dp264.c | 8 1 file changed, 8 deletions(-) diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c index 5bf401f..6c35159 100644 --- a

[RFC PATCH 03/10] alpha: Force the user-visible HZ to a constant 1024.

2013-07-16 Thread Richard Henderson
This kernel/user split was done long ago for other architectures. Signed-off-by: Richard Henderson --- arch/alpha/include/asm/param.h | 8 +--- arch/alpha/include/uapi/asm/param.h | 7 --- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/arch/alpha/include/asm

[RFC PATCH 05/10] alpha: Primitive support for CPU power down.

2013-07-16 Thread Richard Henderson
Use WTINT to wait for the next interrupt. Squash the WTINT call if the PALcode doesn't support it (e.g. MILO). No attempt is yet made to skip clock ticks during normal scheduling in order to stay in power down mode longer. Signed-off-by: Richard Henderson --- arch/alpha/include/asm/

[RFC PATCH 02/10] alpha: Notice if we're being run under QEMU

2013-07-16 Thread Richard Henderson
When building a generic kernel, do a run-time check on the serial number, like we do for MILO. When building a custom kernel, make this a configure-time check. Signed-off-by: Richard Henderson --- arch/alpha/Kconfig | 14 ++ arch/alpha/include/asm/machvec.h | 18

[RFC PATCH 00/10] Alpha support for QEMU

2013-07-16 Thread Richard Henderson
ourse. So I'm hoping that someone will notice this and help me out with testing. In addition, if folks more familiar with the various kernel/time or driver/rtc interfaces spot anything I'm doing wrong in the rewrite, please let me know. r~ Richard Henderson (10): alpha: Don&#

[RFC PATCH 09/10] alpha: Switch to GENERIC_CLOCKEVENTS

2013-07-16 Thread Richard Henderson
This allows us to get rid of some hacky code for SMP. Get rid of some cycle counter hackery that's now handled by generic code via clocksource + clock_event_device objects. Cc: Thomas Gleixner Signed-off-by: Richard Henderson --- arch/alpha/Kconfig| 1 + arch/alpha/k

[RFC PATCH 06/10] alpha: Reorganize rtc handling

2013-07-16 Thread Richard Henderson
tc-li...@googlegroups.com Signed-off-by: Richard Henderson --- arch/alpha/Kconfig | 1 - arch/alpha/include/asm/machvec.h | 4 +- arch/alpha/include/asm/rtc.h | 11 -- arch/alpha/kernel/Makefile | 1 + arch/alpha/kernel/machvec_impl.h | 5 +- arch/alpha/kernel/proto.h

[RFC PATCH 08/10] alpha: Always enable the rpcc clocksource for single processor

2013-07-16 Thread Richard Henderson
Don't depend on SMP, just check the number of processors online. This allows a single distribution kernel to use the clocksource when run on a single processor machine. Signed-off-by: Richard Henderson --- arch/alpha/kernel/time.c | 58 +++- 1

[RFC PATCH 04/10] alpha: Allow HZ to be configured

2013-07-16 Thread Richard Henderson
With the 1024Hz default, we spend 50% of QEMU emulation processing timer interrupts. Signed-off-by: Richard Henderson --- arch/alpha/Kconfig| 36 ++-- arch/alpha/kernel/setup.c | 10 -- arch/alpha/kernel/time.c | 24 +--- 3

[RFC PATCH 10/10] alpha: Use qemu+cserve provided high-res clock and alarm.

2013-07-16 Thread Richard Henderson
QEMU provides a high-resolution timer and alarm; use this for a clock source and clock event source when available. Cc: Thomas Gleixner Signed-off-by: Richard Henderson --- arch/alpha/include/asm/pal.h | 14 ++ arch/alpha/kernel/irq_alpha.c | 2 +- arch/alpha/kernel/proto.h | 2

[PATCH 6/7] alpha: Generate dwarf2 unwind info for various kernel entry points.

2013-07-16 Thread Richard Henderson
Having unwind info past the PALcode generated stack frame makes debugging the kernel significantly easier. Signed-off-by: Richard Henderson --- arch/alpha/kernel/entry.S | 399 +- 1 file changed, 288 insertions(+), 111 deletions(-) diff --git a/arch

[PATCH 1/7] alpha: Add kcmp and finit_module syscalls

2013-07-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- arch/alpha/include/asm/unistd.h | 3 +-- arch/alpha/include/uapi/asm/unistd.h | 2 ++ arch/alpha/kernel/systbls.S | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm

[PATCH 0/7] Minor Alpha updates for 3.11

2013-07-16 Thread Richard Henderson
09:55:06 -0700) -------- Richard Henderson (7): alpha: Add kcmp and finit_module syscalls alpha: Eliminate compiler warning from memset macro alpha: Modernize lib/mpi/longlong.h alpha: Improve atomic_add_unless alpha: Implement atomic64_dec_if_positive alpha: Generat

[PATCH 3/7] alpha: Modernize lib/mpi/longlong.h

2013-07-16 Thread Richard Henderson
Remove the compile warning for __udiv_qrnnd not having a prototype. Use the __builtin_alpha_umulh introduced in gcc 4.0. Signed-off-by: Richard Henderson --- lib/mpi/longlong.h | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/mpi/longlong.h b/lib/mpi

[PATCH 5/7] alpha: Implement atomic64_dec_if_positive

2013-07-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- arch/alpha/Kconfig | 1 + arch/alpha/include/asm/atomic.h | 28 2 files changed, 29 insertions(+) diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 837a1f2..082d9b4 100644 --- a/arch/alpha/Kconfig +++ b

[PATCH 4/7] alpha: Improve atomic_add_unless

2013-07-16 Thread Richard Henderson
Use ll/sc loops instead of C loops around cmpxchg. Update the atomic64_add_unless block comment to match the code. Signed-off-by: Richard Henderson --- arch/alpha/include/asm/atomic.h | 60 + 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a

[PATCH 2/7] alpha: Eliminate compiler warning from memset macro

2013-07-16 Thread Richard Henderson
mset’ ? __builtin_memset((s),0,(n)) \ ^ Converting the macro to an inline function eliminates this problem. Signed-off-by: Richard Henderson --- arch/alpha/include/asm/string.h | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/

[PATCH 7/7] alpha: Fix type compatibility warning for marvel_map_irq

2013-07-16 Thread Richard Henderson
Signed-off-by: Richard Henderson --- arch/alpha/kernel/sys_marvel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c index 407accc..53d6e4a 100644 --- a/arch/alpha/kernel/sys_marvel.c +++ b/arch/alpha/kernel

Re: PCI resource problems caused by improper address rounding

2007-12-20 Thread Richard Henderson
On Thu, Dec 20, 2007 at 02:24:48PM -0800, Linus Torvalds wrote: > I'm not exactly 100% happy with it, but it does mean that if we need a big > area, we'll relax the suggested starting point by that amount. It's not > wonderful, but it essentially admits that the minimum for the allocations > is

Re: PCI resource problems caused by improper address rounding

2007-12-20 Thread Richard Henderson
On Tue, Dec 18, 2007 at 05:38:58PM -0800, Linus Torvalds wrote: > That > > PCI: Cannot allocate resource region 9 of bridge :00:01.0 > PCI: Cannot allocate resource region 1 of device :01:00.0 > > thing is really starting to bug me. > > I bet that is the real problem here, bu

Re: PCI resource problems caused by improper address rounding

2007-12-18 Thread Richard Henderson
On Tue, Dec 18, 2007 at 07:55:37PM -0500, Chuck Ebbert wrote: > You can boot with "pci=mmconf" to enable it. Heh. PCI: BIOS Bug: MCFG area at e000 is not E820-reserved PCI: Not using MMCONFIG. r~ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a mes

Re: PCI resource problems caused by improper address rounding

2007-12-18 Thread Richard Henderson
On Tue, Dec 18, 2007 at 04:46:09PM -0500, Chuck Ebbert wrote: > pnpacpi=off should work. This does result in the graphics bar being placed at e000, and does result in a system lockup when X starts. So it appears as if there's really something there. r~ -- To unsubscribe from this list: send

Re: PCI resource problems caused by improper address rounding

2007-12-18 Thread Richard Henderson
On Tue, Dec 18, 2007 at 01:09:15PM -0800, Linus Torvalds wrote: > However, I wonder about that > > e000-efff : pnp 00:0b > > thing. I actually suspect that that whole allocation is literally *meant* > for that 256MB graphics aperture, but the kernel explicitly avoids it > because

Re: PCI resource problems caused by improper address rounding

2007-12-18 Thread Richard Henderson
On Tue, Dec 18, 2007 at 10:21:50AM -0800, Linus Torvalds wrote: > > https://bugzilla.redhat.com/show_bug.cgi?id=425794#c0 > > That bugzilla entry doesn't even have a dmesg output or anything like > that. I'd really like to see what the I've added dmesg, /proc/iomem, and lspci -v output to that

  1   2   3   >