Arnd Bergmann | 5 May 21:58 2016
Picon
Gravatar

[GIT PULL] asm-generic syscall fix for 4.6-rc

[resent to fix subject line]

The following changes since commit 02da2d72174c61988eb4456b53f405e3ebdebce4:

  Linux 4.6-rc5 (2016-04-24 16:17:05 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git tags/asm-generic-4.6

for you to fetch changes up to 1f93e9f2318b598e6775a1fc9701604993c512b1:

  asm-generic: use compat version for preadv2 and pwritev2 (2016-05-05 00:42:20 +0200)

----------------------------------------------------------------
asm-generic syscall fix for 4.6-rc

My last pull request for asm-generic had just one patch that added two
new system calls to asm/unistd.h, but unfortunately it turned out
to be wrong, pointing arch/tile compat mode at the native handlers
rather than the compat ones.

This was spotted by Yury Norov, who is working on ILP32 mode
for arch/arm64, which would have the same problem when merged.
This fixes the table to use the correct compat syscalls, like
the other 64-bit architectures do.

I'll try to find the time to come up with a solution that
prevents this problem from happening again, by allowing all
future system calls to just get added in a single file
(Continue reading)

Arnd Bergmann | 5 May 21:48 2016
Picon
Gravatar

asm-generic syscall fix for 4.6-rc

The following changes since commit 02da2d72174c61988eb4456b53f405e3ebdebce4:

  Linux 4.6-rc5 (2016-04-24 16:17:05 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git asm-generic-4.6

for you to fetch changes up to 1f93e9f2318b598e6775a1fc9701604993c512b1:

  asm-generic: use compat version for preadv2 and pwritev2 (2016-05-05 00:42:20 +0200)

----------------------------------------------------------------
asm-generic syscall fix for 4.6-rc

My last pull request for asm-generic had just one patch that added two
new system calls to asm/unistd.h, but unfortunately it turned out
to be wrong, pointing arch/tile compat mode at the native handlers
rather than the compat ones.

This was spotted by Yury Norov, who is working on ILP32 mode
for arch/arm64, which would have the same problem when merged.
This fixes the table to use the correct compat syscalls, like
the other 64-bit architectures do.

I'll try to find the time to come up with a solution that
prevents this problem from happening again, by allowing all
future system calls to just get added in a single file
for use by all architectures.

(Continue reading)

Chen Yucong | 4 May 15:51 2016
Picon

[PATCH] cpu/hotplug: print warning message in proper places for online or offline cpu

When we online or offline a CPU, unexpected errors may occur for
a number of reasons. So if a function called within _cpu_down() or
_cpu_up() returns a error code indicating a failed operation, the
warning message should be printed rather than fallow the failed
__cpu_notify().

Signed-off-by: Chen Yucong <slaoub <at> gmail.com>
---
 kernel/cpu.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 3e3f6e4..b8a2d2a 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
 <at>  <at>  -317,8 +317,8  <at>  <at>  static int notify_prepare(unsigned int cpu)
 	ret = __cpu_notify(CPU_UP_PREPARE, cpu, -1, &nr_calls);
 	if (ret) {
 		nr_calls--;
-		printk(KERN_WARNING "%s: attempt to bring up CPU %u failed\n",
-				__func__, cpu);
+		pr_warn("%s: attempt to bring up CPU %u failed\n",
+			__func__, cpu);
 		__cpu_notify(CPU_UP_CANCELED, cpu, nr_calls, NULL);
 	}
 	return ret;
 <at>  <at>  -353,6 +353,8  <at>  <at>  static int bringup_cpu(unsigned int cpu)
 	ret = __cpu_up(cpu, idle);
 	if (ret) {
 		cpu_notify(CPU_UP_CANCELED, cpu);
(Continue reading)

Vineet Gupta | 4 May 12:37 2016

kmap_atomic and preemption

Hi,

I was staring at some recent ARC highmem crashes and see that kmap_atomic()
disables preemption even when page is in lowmem and call returns right away.
This seems to be true for other arches as well.

arch/arc/mm/highmem.c:

void *kmap_atomic(struct page *page)
{
	int idx, cpu_idx;
	unsigned long vaddr;

	preempt_disable();
	pagefault_disable();
	if (!PageHighMem(page))
		return page_address(page);

        /* do the highmem foo ... */
..
}

I would really like to implement a inline fastpath for !PageHighMem(page) case and
do the highmem foo out-of-line.

Is preemption disabling a requirement of kmap_atomic() callers independent of
where page is or is it only needed when page is in highmem and can trigger page
faults or TLB Misses between kmap_atomic() and kunmap_atomic and wants protection
against reschedules etc.

(Continue reading)

maryjanesogrub | 3 May 07:07 2016
Picon

Listing from maryjanesogrub

Your friend, maryjanesogrub, has sent along the following link:
http://www.midwestrealty.net/listingview.php?listingID=1128

Comment:
JOB POSITION AVAILABLE - APPLY NOW!
WE'RE HIRING: Data Entry Workers Earn $500 up to $1000 Daily 
(No Experience Required)

Good Day,

You recently expressed an interest in obtaining a
position you could do from the comfort of your own home.
I am happy to let you know that I found a great company
that will help you get started working online.

Visit our website here:

http://link.limo/1jqz

The scope of the work is very simple.
You can work as little or as much as you want
depending on how much you want your paycheck to be

No background experience is needed because you
will be given a detailed step-by-step training in
all the job fields along with all the resources you
needed to help you get started immediately.

Visit our website here:

(Continue reading)

Yury Norov | 2 May 18:12 2016

[PATCH] all: use compat version for preadv2 and pwritev2

Compat architectures that does not use generic unistd (mips, s390),
declare compat version in their syscall tables for preadv2 and
pwritev2. Generic unistd syscall table should do it as well.

Signed-off-by: Yury Norov <ynorov <at> caviumnetworks.com>
---
 include/uapi/asm-generic/unistd.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h
index 6e0f5f0..c51afb7 100644
--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
 <at>  <at>  -718,9 +718,9  <at>  <at>  __SYSCALL(__NR_mlock2, sys_mlock2)
 #define __NR_copy_file_range 285
 __SYSCALL(__NR_copy_file_range, sys_copy_file_range)
 #define __NR_preadv2 286
-__SYSCALL(__NR_preadv2, sys_preadv2)
+__SC_COMP(__NR_preadv2, sys_preadv2, compat_sys_preadv2)
 #define __NR_pwritev2 287
-__SYSCALL(__NR_pwritev2, sys_pwritev2)
+__SC_COMP(__NR_pwritev2, sys_pwritev2, compat_sys_pwritev2)

 #undef __NR_syscalls
 #define __NR_syscalls 288
--

-- 
2.5.0

Arnd Bergmann | 26 Apr 23:52 2016
Picon
Gravatar

[PATCH v2 0/6] simplify rtc-generic driver

This is a resend of an earlier series, to clean up the rtc-generic
driver by avoiding the dependency on the architecture specific
include/asm/rtc.h header that after this series is only used
for the deprecated "genrtc" driver. As I've shown in another
series, only three architectures (m68k, powerpc, parisc)
actually use the genrtc driver, and they all support rtc-generic
as a replacement as well.

The only missing piece appears to be the ioctl support for
the m68k q40 machine that I'm adding in patch 2 here.

	Arnd

Rabin Vincent | 26 Apr 21:04 2016
Picon

[PATCH] tracing: add support for tracing MMIO helpers

Add support for tracing the MMIO helpers readl()/writel() (and their
variants), for use while developing and debugging device drivers.

The address and the value are saved along with the C expressions used in
the driver when calling these MMIO access functions, leading to a trace
of the driver's interactions with the hardware's registers:

 mmcqd/0-659 [000] d.H3 95.600911: mmio_write: mmci_request_end: 0xa08d200c [host->base +
MMCICOMMAND] <= 0x00000000 [0]
 mmcqd/0-659 [000] d.H3 95.600945: mmio_read: mmci_irq: 0xa08d2034 [host->base + MMCISTATUS] => 0x00000400
 mmcqd/0-659 [000] d.H3 95.600953: mmio_read: mmci_irq: 0xa08d203c [host->base + MMCIMASK0] => 0x000003ff
 mmcqd/0-659 [000] d.H3 95.600961: mmio_write: mmci_irq: 0xa08d2038 [host->base + MMCICLEAR] <=
0x00000000 [status]
 mmcqd/0-659 [000] d..2 95.601476: mmio_write: mmci_start_data: 0xa08d2024 [base + MMCIDATATIMER] <=
0x00124f80 [timeout]
 mmcqd/0-659 [000] d..2 95.601498: mmio_write: mmci_start_data: 0xa08d2028 [base + MMCIDATALENGTH] <=
0x00003e00 [host->size]
 mmcqd/0-659 [000] d..2 95.601512: mmio_write: mmci_write_datactrlreg: 0xa08d202c [host->base +
MMCIDATACTRL] <= 0x00000093 [datactrl]
 mmcqd/0-659 [000] d..2 95.601522: mmio_read: mmci_start_data: 0xa08d203c [base + MMCIMASK0] => 0x000003ff
 mmcqd/0-659 [000] d..2 95.601531: mmio_write: mmci_start_data: 0xa08d203c [base + MMCIMASK0] <=
0x000002ff [readl(base + MMCIMASK0) & ~MCI_DATAENDMASK]
 mmcqd/0-659 [000] d..2 95.601540: mmio_write: mmci_set_mask1: 0xa08d2040 [base + MMCIMASK1] <=
0x00008000 [mask]
 mmcqd/0-659 [000] d..2 95.601550: mmio_read: mmci_start_command: 0xa08d200c [base + MMCICOMMAND] => 0x00000000
 mmcqd/0-659 [000] d..2 95.601559: mmio_write: mmci_start_command: 0xa08d2008 [base + MMCIARGUMENT]
<= 0x00007c00 [cmd->arg]
 mmcqd/0-659 [000] d..2 95.601568: mmio_write: mmci_start_command: 0xa08d200c [base + MMCICOMMAND] <=
0x00000452 [c]
 mmcqd/0-659 [000] d.h3 95.601688: mmio_read: mmci_irq: 0xa08d2034 [host->base + MMCISTATUS] => 0x0022a440
(Continue reading)

Peter Zijlstra | 26 Apr 17:28 2016

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

On Mon, Apr 25, 2016 at 04:54:34PM -0400, Chris Metcalf wrote:
> On 4/22/2016 5:04 AM, Peter Zijlstra wrote:

> >  static inline int atomic_add_return(int i, atomic_t *v)
> >  {
> >  	int val;
> >  	smp_mb();  /* barrier for proper semantics */
> >  	val = __insn_fetchadd4((void *)&v->counter, i) + i;
> >  	barrier();  /* the "+ i" above will wait on memory */
> >+	/* XXX smp_mb() instead, as per cmpxchg() ? */
> >  	return val;
> >  }
> 
> The existing code is subtle but I'm pretty sure it's not a bug.
> 
> The tilegx architecture will take the "+ i" and generate an add instruction.
> The compiler barrier will make sure the add instruction happens before
> anything else that could touch memory, and the microarchitecture will make
> sure that the result of the atomic fetchadd has been returned to the core
> before any further instructions are issued.  (The memory architecture is
> lazy, but when you feed a load through an arithmetic operation, we block
> issuing any further instructions until the add's operands are available.)
> 
> This would not be an adequate memory barrier in general, since other loads
> or stores might still be in flight, even if the "val" operand had made it
> from memory to the core at this point.  However, we have issued no other
> stores or loads since the previous memory barrier, so we know that there
> can be no other loads or stores in flight, and thus the compiler barrier
> plus arithmetic op is equivalent to a memory barrier here.
> 
(Continue reading)

Kamal Mostafa | 25 Apr 21:44 2016
Gravatar

[4.2.y-ckt stable] Patch "asm-generic/futex: Re-enable preemption in futex_atomic_cmpxchg_inatomic()" has been added to the 4.2.y-ckt tree

This is a note to let you know that I have just added a patch titled

    asm-generic/futex: Re-enable preemption in futex_atomic_cmpxchg_inatomic()

to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue

This patch is scheduled to be released in version 4.2.8-ckt9.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

---8<------------------------------------------------------------

From cdfad9ed4667dcd1c50611495db26b59ebab1dd5 Mon Sep 17 00:00:00 2001
From: Romain Perier <romain.perier <at> free-electrons.com>
Date: Thu, 14 Apr 2016 15:36:03 +0200
Subject: asm-generic/futex: Re-enable preemption in
 futex_atomic_cmpxchg_inatomic()

commit fba7cd681b6155e2d93e7862fcd6f970336b83c3 upstream.

(Continue reading)

Arnd Bergmann | 23 Apr 23:33 2016
Picon
Gravatar

[GIT PULL] asm-generic: add new syscalls for 4.6

The following changes since commit c3b46c73264b03000d1e18b22f5caf63332547c9:

  Linux 4.6-rc4 (2016-04-17 19:13:32 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git tags/asm-generic-4.6

for you to fetch changes up to 987aedb5d6f6e10c5203c6d0aab9a60ec22c7e93:

  generic syscalls: wire up preadv2 and pwritev2 syscalls (2016-04-23 22:38:08 +0200)

----------------------------------------------------------------
asm-generic changes for 4.6-rc

Here is one patch to wire up the preadv/pwritev system calls in the
generic system call table, which is required for all architectures
that were merged in the last few years, including arm64.

Usually these get merged along with the syscall implementation
or one of the architecture trees, but this time that did not
happen.

----------------------------------------------------------------

Andre and Christoph both sent a version of this patch, I picked the
one I got first.

Andre Przywara (1):
      generic syscalls: wire up preadv2 and pwritev2 syscalls
(Continue reading)


Gmane