Skip to content

Commit

Permalink
Merge tag 'driver-core-4.12-rc1' of git://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/kernel/git/gregkh/driver-core

Pull driver core updates from Greg KH:
 "Very tiny pull request for 4.12-rc1 for the driver core this time
  around.

  There are some documentation fixes, an eventpoll.h fixup to make it
  easier for the libc developers to take our header files directly, and
  some very minor driver core fixes and changes.

  All have been in linux-next for a very long time with no reported
  issues"

* tag 'driver-core-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  Revert "kref: double kref_put() in my_data_handler()"
  driver core: don't initialize 'parent' in device_add()
  drivers: base: dma-mapping: use nth_page helper
  Documentation/ABI: add information about cpu_capacity
  debugfs: set no_llseek in DEFINE_DEBUGFS_ATTRIBUTE
  eventpoll.h: add missing epoll event masks
  eventpoll.h: fix epoll event masks
  • Loading branch information
torvalds committed May 5, 2017
2 parents 8f28472 + 523aa35 commit 0be7517
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 9 deletions.
7 changes: 7 additions & 0 deletions Documentation/ABI/testing/sysfs-devices-system-cpu
Original file line number Diff line number Diff line change
Expand Up @@ -366,3 +366,10 @@ Contact: Linux ARM Kernel Mailing list <[email protected]>
Description: AArch64 CPU registers
'identification' directory exposes the CPU ID registers for
identifying model and revision of the CPU.

What: /sys/devices/system/cpu/cpu#/cpu_capacity
Date: December 2016
Contact: Linux kernel mailing list <[email protected]>
Description: information about CPUs heterogeneity.

cpu_capacity: capacity of cpu#.
1 change: 1 addition & 0 deletions Documentation/kref.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ int my_data_handler(void)
task = kthread_run(more_data_handling, data, "more_data_handling");
if (task == ERR_PTR(-ENOMEM)) {
rv = -ENOMEM;
kref_put(&data->refcount, data_release);
goto out;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,7 @@ int device_private_init(struct device *dev)
*/
int device_add(struct device *dev)
{
struct device *parent = NULL;
struct device *parent;
struct kobject *kobj;
struct class_interface *class_intf;
int error = -EINVAL;
Expand Down
5 changes: 2 additions & 3 deletions drivers/base/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,14 +309,13 @@ void *dma_common_contiguous_remap(struct page *page, size_t size,
int i;
struct page **pages;
void *ptr;
unsigned long pfn;

pages = kmalloc(sizeof(struct page *) << get_order(size), GFP_KERNEL);
if (!pages)
return NULL;

for (i = 0, pfn = page_to_pfn(page); i < (size >> PAGE_SHIFT); i++)
pages[i] = pfn_to_page(pfn + i);
for (i = 0; i < (size >> PAGE_SHIFT); i++)
pages[i] = nth_page(page, i);

ptr = dma_common_pages_remap(pages, size, vm_flags, prot, caller);

Expand Down
2 changes: 1 addition & 1 deletion include/linux/debugfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static const struct file_operations __fops = { \
.release = simple_attr_release, \
.read = debugfs_attr_read, \
.write = debugfs_attr_write, \
.llseek = generic_file_llseek, \
.llseek = no_llseek, \
}

#if defined(CONFIG_DEBUG_FS)
Expand Down
21 changes: 17 additions & 4 deletions include/uapi/linux/eventpoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,21 @@
#define EPOLL_CTL_DEL 2
#define EPOLL_CTL_MOD 3

/* Epoll event masks */
#define EPOLLIN 0x00000001
#define EPOLLPRI 0x00000002
#define EPOLLOUT 0x00000004
#define EPOLLERR 0x00000008
#define EPOLLHUP 0x00000010
#define EPOLLRDNORM 0x00000040
#define EPOLLRDBAND 0x00000080
#define EPOLLWRNORM 0x00000100
#define EPOLLWRBAND 0x00000200
#define EPOLLMSG 0x00000400
#define EPOLLRDHUP 0x00002000

/* Set exclusive wakeup mode for the target file descriptor */
#define EPOLLEXCLUSIVE (1 << 28)
#define EPOLLEXCLUSIVE (1U << 28)

/*
* Request the handling of system wakeup events so as to prevent system suspends
Expand All @@ -39,13 +52,13 @@
*
* Requires CAP_BLOCK_SUSPEND
*/
#define EPOLLWAKEUP (1 << 29)
#define EPOLLWAKEUP (1U << 29)

/* Set the One Shot behaviour for the target file descriptor */
#define EPOLLONESHOT (1 << 30)
#define EPOLLONESHOT (1U << 30)

/* Set the Edge Triggered behaviour for the target file descriptor */
#define EPOLLET (1 << 31)
#define EPOLLET (1U << 31)

/*
* On x86-64 make the 64bit structure have the same alignment as the
Expand Down

0 comments on commit 0be7517

Please sign in to comment.