Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/jikos/doc

Pull documentation updates from Jiri Kosina:
 "Updates to kernel documentation.

  I took this over (hopefully temporarily) from Randy who was not
  willing to maintain it any longer.  This pile mostly is a relay of
  queue that Randy already had in his tree"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/doc:
  Documentation: fix broken v4l-utils URL
  Documentation: update include path for mpssd
  Documentation: correct parameter error for dma_mapping_error
  MAINTAINERS: update location of linux-doc tree
  Documentation: remove networking/.gitignore
  tools: add more endian.h macros
  Make Documenation depend on headers_install
  Docs: this_cpu_ops: remove redundant add forms
  Documentation: disable vdso_test to avoid breakage with old glibc
  Documentation: update vDSO makefile to build portable examples
  Documentation: update .gitignore files
  Documentation: support glibc versions without htole macros
  v4l2-pci-skeleton: Only build if PCI is available
  Documentation: fix misc. warnings
  Documentation: make functions static to avoid prototype warnings
  Documentation: add makefiles for more targets
  Documentation: use subdir-y to avoid unnecessary built-in.o files
  • Loading branch information
torvalds committed Oct 8, 2014
2 parents d290106 + 0415447 commit b6420eb
Show file tree
Hide file tree
Showing 50 changed files with 168 additions and 136 deletions.
7 changes: 0 additions & 7 deletions Documentation/.gitignore

This file was deleted.

6 changes: 3 additions & 3 deletions Documentation/DMA-API-HOWTO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ To map a single region, you do:
size_t size = buffer->len;

dma_handle = dma_map_single(dev, addr, size, direction);
if (dma_mapping_error(dma_handle)) {
if (dma_mapping_error(dev, dma_handle)) {
/*
* reduce current DMA mapping usage,
* delay and try again later or
Expand Down Expand Up @@ -588,7 +588,7 @@ Specifically:
size_t size = buffer->len;

dma_handle = dma_map_page(dev, page, offset, size, direction);
if (dma_mapping_error(dma_handle)) {
if (dma_mapping_error(dev, dma_handle)) {
/*
* reduce current DMA mapping usage,
* delay and try again later or
Expand Down Expand Up @@ -689,7 +689,7 @@ to use the dma_sync_*() interfaces.
dma_addr_t mapping;

mapping = dma_map_single(cp->dev, buffer, len, DMA_FROM_DEVICE);
if (dma_mapping_error(dma_handle)) {
if (dma_mapping_error(cp->dev, dma_handle)) {
/*
* reduce current DMA mapping usage,
* delay and try again later or
Expand Down
2 changes: 1 addition & 1 deletion Documentation/DocBook/media/v4l/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ makes no provisions to find these related devices. Some really
complex devices use the Media Controller (see <xref linkend="media_controller" />)
which can be used for this purpose. But most drivers do not use it,
and while some code exists that uses sysfs to discover related devices
(see libmedia_dev in the <ulink url="http://git.linuxtv.org/v4l-utils/">v4l-utils</ulink>
(see libmedia_dev in the <ulink url="http://git.linuxtv.org/cgit.cgi/v4l-utils.git/">v4l-utils</ulink>
git repository), there is no library yet that can provide a single API towards
both Media Controller-based devices and devices that do not use the Media Controller.
If you want to work on this please write to the linux-media mailing list: &v4l-ml;.</para>
Expand Down
7 changes: 4 additions & 3 deletions Documentation/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
obj-m := DocBook/ accounting/ auxdisplay/ connector/ \
filesystems/ filesystems/configfs/ ia64/ laptops/ networking/ \
pcmcia/ spi/ timers/ watchdog/src/ misc-devices/mei/
subdir-y := accounting arm auxdisplay blackfin connector \
filesystems filesystems ia64 laptops mic misc-devices \
networking pcmcia prctl ptp spi timers vDSO video4linux \
watchdog
3 changes: 0 additions & 3 deletions Documentation/accounting/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := getdelays

Expand Down
1 change: 1 addition & 0 deletions Documentation/arm/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
subdir-y := SH-Mobile
1 change: 1 addition & 0 deletions Documentation/arm/SH-Mobile/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vrl4
11 changes: 5 additions & 6 deletions Documentation/arm/SH-Mobile/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
BIN := vrl4
# List of programs to build
hostprogs-y := vrl4

.PHONY: all
all: $(BIN)
# Tell kbuild to always build the programs
always := $(hostprogs-y)

.PHONY: clean
clean:
rm -f *.o $(BIN)
HOSTCFLAGS_vrl4.o += -I$(objtree)/usr/include -I$(srctree)/tools/include
7 changes: 4 additions & 3 deletions Documentation/arm/SH-Mobile/vrl4.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <stdint.h>
#include <stdio.h>
#include <errno.h>
#include <tools/endian.h>

struct hdr {
uint32_t magic1;
Expand Down Expand Up @@ -77,7 +78,7 @@ struct hdr {

#define ROUND_UP(x) ((x + ALIGN - 1) & ~(ALIGN - 1))

ssize_t do_read(int fd, void *buf, size_t count)
static ssize_t do_read(int fd, void *buf, size_t count)
{
size_t offset = 0;
ssize_t l;
Expand All @@ -98,7 +99,7 @@ ssize_t do_read(int fd, void *buf, size_t count)
return offset;
}

ssize_t do_write(int fd, const void *buf, size_t count)
static ssize_t do_write(int fd, const void *buf, size_t count)
{
size_t offset = 0;
ssize_t l;
Expand All @@ -117,7 +118,7 @@ ssize_t do_write(int fd, const void *buf, size_t count)
return offset;
}

ssize_t write_zero(int fd, size_t len)
static ssize_t write_zero(int fd, size_t len)
{
size_t i = len;

Expand Down
3 changes: 0 additions & 3 deletions Documentation/auxdisplay/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := cfag12864b-example

Expand Down
7 changes: 2 additions & 5 deletions Documentation/blackfin/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
ifneq ($(CONFIG_BLACKFIN),)
obj-m := gptimers-example.o

all: modules

modules clean:
$(MAKE) -C ../.. SUBDIRS=$(PWD) $@
endif
1 change: 1 addition & 0 deletions Documentation/filesystems/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dnotify_test
3 changes: 1 addition & 2 deletions Documentation/filesystems/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o
subdir-y := configfs

# List of programs to build
hostprogs-y := dnotify_test
Expand Down
3 changes: 0 additions & 3 deletions Documentation/ia64/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := aliasing-test

Expand Down
2 changes: 2 additions & 0 deletions Documentation/laptops/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dslm
freefall
5 changes: 1 addition & 4 deletions Documentation/laptops/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := dslm
hostprogs-y := dslm freefall

# Tell kbuild to always build the programs
always := $(hostprogs-y)
1 change: 1 addition & 0 deletions Documentation/mic/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
subdir-y := mpssd
24 changes: 12 additions & 12 deletions Documentation/mic/mpssd/Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#
# Makefile - Intel MIC User Space Tools.
# Copyright(c) 2013, Intel Corporation.
#
# List of programs to build
hostprogs-y := mpssd

mpssd-objs := mpssd.o sysfs.o

# Tell kbuild to always build the programs
always := $(hostprogs-y)

HOSTCFLAGS += -I$(objtree)/usr/include -I$(srctree)/tools/include

ifdef DEBUG
CFLAGS += $(USERWARNFLAGS) -I. -g -Wall -DDEBUG=$(DEBUG)
else
CFLAGS += $(USERWARNFLAGS) -I. -g -Wall
HOSTCFLAGS += -DDEBUG=$(DEBUG)
endif

mpssd: mpssd.o sysfs.o
$(CC) $(CFLAGS) -o $@ $^ -lpthread
HOSTLOADLIBES_mpssd := -lpthread

install:
install mpssd /usr/sbin/mpssd
install micctrl /usr/sbin/micctrl

clean:
rm -f mpssd *.o
5 changes: 3 additions & 2 deletions Documentation/mic/mpssd/mpssd.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include "mpssd.h"
#include <linux/mic_ioctl.h>
#include <linux/mic_common.h>
#include <tools/endian.h>

static void init_mic(struct mic_info *mic);

Expand Down Expand Up @@ -1476,9 +1477,9 @@ set_cmdline(struct mic_info *mic)

len = snprintf(buffer, PATH_MAX,
"clocksource=tsc highres=off nohz=off ");
len += snprintf(buffer + len, PATH_MAX,
len += snprintf(buffer + len, PATH_MAX - len,
"cpufreq_on;corec6_off;pc3_off;pc6_off ");
len += snprintf(buffer + len, PATH_MAX,
len += snprintf(buffer + len, PATH_MAX - len,
"ifcfg=static;address,172.31.%d.1;netmask,255.255.255.0",
mic->id);

Expand Down
1 change: 1 addition & 0 deletions Documentation/misc-devices/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
subdir-y := mei
3 changes: 0 additions & 3 deletions Documentation/misc-devices/mei/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := mei-amt-version
HOSTCFLAGS_mei-amt-version.o += -I$(objtree)/usr/include
Expand Down
Empty file.
8 changes: 1 addition & 7 deletions Documentation/networking/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# Tell kbuild to always build the programs
always := $(hostprogs-y)

obj-m := timestamping/
subdir-y := timestamping
1 change: 1 addition & 0 deletions Documentation/networking/timestamping/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
timestamping
txtimestamp
hwtstamp_config
8 changes: 1 addition & 7 deletions Documentation/networking/timestamping/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := timestamping hwtstamp_config
hostprogs-y := hwtstamp_config timestamping

# Tell kbuild to always build the programs
always := $(hostprogs-y)

HOSTCFLAGS_timestamping.o += -I$(objtree)/usr/include
HOSTCFLAGS_hwtstamp_config.o += -I$(objtree)/usr/include

clean:
rm -f timestamping hwtstamp_config
3 changes: 0 additions & 3 deletions Documentation/pcmcia/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# kbuild trick to avoid linker error. Can be omitted if a module is built.
obj- := dummy.o

# List of programs to build
hostprogs-y := crc32hash

Expand Down
3 changes: 3 additions & 0 deletions Documentation/prctl/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
disable-tsc-ctxt-sw-stress-test
disable-tsc-on-off-stress-test
disable-tsc-test
8 changes: 8 additions & 0 deletions Documentation/prctl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List of programs to build
hostprogs-y := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test disable-tsc-test
# Tell kbuild to always build the programs
always := $(hostprogs-y)

HOSTCFLAGS_disable-tsc-ctxt-sw-stress-test.o += -I$(objtree)/usr/include
HOSTCFLAGS_disable-tsc-on-off-stress-test.o += -I$(objtree)/usr/include
HOSTCFLAGS_disable-tsc-test.o += -I$(objtree)/usr/include
11 changes: 6 additions & 5 deletions Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,20 @@
# define PR_TSC_SIGSEGV 2 /* throw a SIGSEGV instead of reading the TSC */
#endif

uint64_t rdtsc() {
static uint64_t rdtsc(void)
{
uint32_t lo, hi;
/* We cannot use "=A", since this would use %rax on x86_64 */
__asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
return (uint64_t)hi << 32 | lo;
}

void sigsegv_expect(int sig)
static void sigsegv_expect(int sig)
{
/* */
}

void segvtask(void)
static void segvtask(void)
{
if (prctl(PR_SET_TSC, PR_TSC_SIGSEGV) < 0)
{
Expand All @@ -54,13 +55,13 @@ void segvtask(void)
}


void sigsegv_fail(int sig)
static void sigsegv_fail(int sig)
{
fprintf(stderr, "FATAL ERROR, rdtsc() failed while enabled\n");
exit(0);
}

void rdtsctask(void)
static void rdtsctask(void)
{
if (prctl(PR_SET_TSC, PR_TSC_ENABLE) < 0)
{
Expand Down
7 changes: 4 additions & 3 deletions Documentation/prctl/disable-tsc-on-off-stress-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

/* snippet from wikipedia :-) */

uint64_t rdtsc() {
static uint64_t rdtsc(void)
{
uint32_t lo, hi;
/* We cannot use "=A", since this would use %rax on x86_64 */
__asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
Expand All @@ -38,7 +39,7 @@ return (uint64_t)hi << 32 | lo;

int should_segv = 0;

void sigsegv_cb(int sig)
static void sigsegv_cb(int sig)
{
if (!should_segv)
{
Expand All @@ -55,7 +56,7 @@ void sigsegv_cb(int sig)
rdtsc();
}

void task(void)
static void task(void)
{
signal(SIGSEGV, sigsegv_cb);
alarm(10);
Expand Down
5 changes: 3 additions & 2 deletions Documentation/prctl/disable-tsc-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ const char *tsc_names[] =
[PR_TSC_SIGSEGV] = "PR_TSC_SIGSEGV",
};

uint64_t rdtsc() {
static uint64_t rdtsc(void)
{
uint32_t lo, hi;
/* We cannot use "=A", since this would use %rax on x86_64 */
__asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
return (uint64_t)hi << 32 | lo;
}

void sigsegv_cb(int sig)
static void sigsegv_cb(int sig)
{
int tsc_val = 0;

Expand Down
1 change: 1 addition & 0 deletions Documentation/ptp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
testptp
8 changes: 8 additions & 0 deletions Documentation/ptp/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List of programs to build
hostprogs-y := testptp

# Tell kbuild to always build the programs
always := $(hostprogs-y)

HOSTCFLAGS_testptp.o += -I$(objtree)/usr/include
HOSTLOADLIBES_testptp := -lrt
6 changes: 3 additions & 3 deletions Documentation/ptp/testptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,11 @@ int main(int argc, char *argv[])
interval = t2 - t1;
offset = (t2 + t1) / 2 - tp;

printf("system time: %" PRId64 ".%u\n",
printf("system time: %lld.%u\n",
(pct+2*i)->sec, (pct+2*i)->nsec);
printf("phc time: %" PRId64 ".%u\n",
printf("phc time: %lld.%u\n",
(pct+2*i+1)->sec, (pct+2*i+1)->nsec);
printf("system time: %" PRId64 ".%u\n",
printf("system time: %lld.%u\n",
(pct+2*i+2)->sec, (pct+2*i+2)->nsec);
printf("system/phc clock time offset is %" PRId64 " ns\n"
"system clock time delay is %" PRId64 " ns\n",
Expand Down
Loading

0 comments on commit b6420eb

Please sign in to comment.