From 4ae711f4a37bff6cf501b48d58f9e28b031b02c9 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Sun, 5 Apr 2015 12:25:44 +0800 Subject: Docs: blackfin: Use new switch macro SAMPLE_IRQ_TIMER instead of IRQ_TIMER5 Not all blackfin machines support IRQ_TIMER5, but all machines support IRQ_TIMER2. So add a switch macro for them. The related error: Documentation/blackfin/gptimers-example.c: In function 'gptimer_example_init': Documentation/blackfin/gptimers-example.c:60:20: error: 'IRQ_TIMER5' undeclared (first use in this function) ret = request_irq(IRQ_TIMER5, gptimer_example_irq, IRQF_SHARED, DRIVER_NAME, &data); ^ Documentation/blackfin/gptimers-example.c:60:20: note: each undeclared identifier is reported only once for each function it appears in Documentation/blackfin/gptimers-example.c: In function 'gptimer_example_exit': Documentation/blackfin/gptimers-example.c:78:11: error: 'IRQ_TIMER5' undeclared (first use in this function) free_irq(IRQ_TIMER5, &data); ^ Also notice about 80 columns limitation. Signed-off-by: Chen Gang Signed-off-by: Jonathan Corbet diff --git a/Documentation/blackfin/gptimers-example.c b/Documentation/blackfin/gptimers-example.c index b1bd634..283eba9 100644 --- a/Documentation/blackfin/gptimers-example.c +++ b/Documentation/blackfin/gptimers-example.c @@ -17,6 +17,12 @@ #define DRIVER_NAME "gptimer_example" +#ifdef IRQ_TIMER5 +#define SAMPLE_IRQ_TIMER IRQ_TIMER5 +#else +#define SAMPLE_IRQ_TIMER IRQ_TIMER2 +#endif + struct gptimer_data { uint32_t period, width; }; @@ -57,7 +63,8 @@ static int __init gptimer_example_init(void) } /* grab the IRQ for the timer */ - ret = request_irq(IRQ_TIMER5, gptimer_example_irq, IRQF_SHARED, DRIVER_NAME, &data); + ret = request_irq(SAMPLE_IRQ_TIMER, gptimer_example_irq, + IRQF_SHARED, DRIVER_NAME, &data); if (ret) { printk(KERN_NOTICE DRIVER_NAME ": IRQ request failed\n"); peripheral_free(P_TMR5); @@ -65,7 +72,8 @@ static int __init gptimer_example_init(void) } /* setup the timer and enable it */ - set_gptimer_config(TIMER5_id, WDTH_CAP | PULSE_HI | PERIOD_CNT | IRQ_ENA); + set_gptimer_config(TIMER5_id, + WDTH_CAP | PULSE_HI | PERIOD_CNT | IRQ_ENA); enable_gptimers(TIMER5bit); return 0; @@ -75,7 +83,7 @@ module_init(gptimer_example_init); static void __exit gptimer_example_exit(void) { disable_gptimers(TIMER5bit); - free_irq(IRQ_TIMER5, &data); + free_irq(SAMPLE_IRQ_TIMER, &data); peripheral_free(P_TMR5); } module_exit(gptimer_example_exit); -- cgit v0.10.2 From e3aa205aa131d9b6452c51191dae0aac8e6f1fbd Mon Sep 17 00:00:00 2001 From: "H. Nikolaus Schaller" Date: Mon, 20 Apr 2015 22:15:20 +0200 Subject: Documentation usb serial: fixed how to provide vendor and product id While trying to test a Cinterion GSM/GPS/3G module I had reconfigured the USB interface by mistake and therefore needed to run a different USB driver than CDC-ACM. It turned out that I need the "usbserial" driver. This file is an official description how to use it: Documentation/usb/usb-serial.txt But it is outdated. The parameters vendor= and product= have been superseded by a /sys interface. Here was the solution: https://bbs.archlinux.org/viewtopic.php?id=175499 insmod usbserial vendor=0x#### product=0x#### becomes (first #### is vendor, second is product) modprobe usbserial echo #### #### >/sys/bus/usb-serial/drivers/generic/new_id This patch changes the documentation file to describe the modern variant. Please note that the old one still works (if compiled as module). Signed-off-by: H. Nikolaus Schaller Signed-off-by: Marek Belisko Signed-off-by: Jonathan Corbet diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt index 947fa62..349f310 100644 --- a/Documentation/usb/usb-serial.txt +++ b/Documentation/usb/usb-serial.txt @@ -465,12 +465,14 @@ Generic Serial driver device, and does not support any kind of device flow control. All that is required of your device is that it has at least one bulk in endpoint, or one bulk out endpoint. - - To enable the generic driver to recognize your device, build the driver - as a module and load it by the following invocation: + + To enable the generic driver to recognize your device, provide + echo >/sys/bus/usb-serial/drivers/generic/new_id + where the and is replaced with the hex representation of your + device's vendor id and product id. + If the driver is compiled as a module you can also provide one id when + loading the module insmod usbserial vendor=0x#### product=0x#### - where the #### is replaced with the hex representation of your device's - vendor id and product id. This driver has been successfully used to connect to the NetChip USB development board, providing a way to develop USB firmware without -- cgit v0.10.2 From de88d8becb55ed477a0926a4b91c21076f5f9b86 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Mon, 13 Apr 2015 03:20:20 +0100 Subject: firmware: Update information in linux.git about adding firmware Kyle McMartin joined the linux-firmware maintainers, and we now have an alias which reaches all of us. Include that instead of the individual addresses. Add some further recommendations that were already included in the README in linux-firmware.git added by Xose Vazquez Perez . Signed-off-by: Ben Hutchings Signed-off-by: Jonathan Corbet diff --git a/firmware/README.AddingFirmware b/firmware/README.AddingFirmware index ea78c3a..bcb5f46 100644 --- a/firmware/README.AddingFirmware +++ b/firmware/README.AddingFirmware @@ -21,15 +21,25 @@ been permitted to redistribute under separate cover. To submit firmware to that repository, please send either a git binary diff or preferably a git pull request to: - David Woodhouse - Ben Hutchings + linux-firmware@kernel.org +and also cc: to related mailing lists. Your commit should include an update to the WHENCE file clearly identifying the licence under which the firmware is available, and that it is redistributable. If the licence is long and involved, it's permitted to include it in a separate file and refer to it from the WHENCE file. +And if it were possible, a changelog of the firmware itself. Ideally, your commit should contain a Signed-Off-By: from someone authoritative on the licensing of the firmware in question (i.e. from within the company that owns the code). + + +WARNING: +======= + +Don't send any "CONFIDENTIALITY STATEMENT" in your e-mail, patch or +request. Otherwise your firmware _will never be accepted_. + +Maintainers are really busy, so don't expect a prompt reply. -- cgit v0.10.2 From df1027abde561f6e7577bc3278f84707de583c89 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Sun, 19 Apr 2015 06:35:01 +0300 Subject: Documentation/CodingStyle: fix example macro parenthesis imbalance Cc: Bartosz Golaszewski Cc: Andrew Morton Fixes: f2027543b9 ('documentation: update CodingStyle on local variables naming in macros') Signed-off-by: Baruch Siach Signed-off-by: Jonathan Corbet diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index f4b78ea..b713c35 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle @@ -670,7 +670,7 @@ functions: typeof(x) ret; \ ret = calc_ret(x); \ (ret); \ -)} +}) ret is a common name for a local variable - __foo_ret is less likely to collide with an existing variable. -- cgit v0.10.2 From 9eb059985a7941d0302c9996de13d258d0355f92 Mon Sep 17 00:00:00 2001 From: Chen Hanxiao Date: Mon, 20 Apr 2015 22:48:23 -0400 Subject: Docs: proc: fix kernel version Change the kernel version in table 1-2 from 3.20 to 4.1 Signed-off-by: Chen Hanxiao Reviewed-by: Nathan Scott Signed-off-by: Jonathan Corbet diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index c3b6b30..1cc7155 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -205,7 +205,7 @@ asynchronous manner and the value may not be very precise. To see a precise snapshot of a moment, you can see /proc//smaps file and scan page table. It's slow but very precise. -Table 1-2: Contents of the status files (as of 3.20.0) +Table 1-2: Contents of the status files (as of 4.1) .............................................................................. Field Content Name filename of the executable -- cgit v0.10.2 From f66fa08bf9e59b1231aba9e3c2ec28dcf08f0389 Mon Sep 17 00:00:00 2001 From: Wang Long Date: Thu, 23 Apr 2015 07:47:02 +0800 Subject: Documentation: kasan: fix a typo Fix a couple of typos in the kasan document. Signed-off-by: Wang Long Signed-off-by: Jonathan Corbet diff --git a/Documentation/kasan.txt b/Documentation/kasan.txt index 092fc10..063095a 100644 --- a/Documentation/kasan.txt +++ b/Documentation/kasan.txt @@ -148,7 +148,7 @@ AddressSanitizer dedicates 1/8 of kernel memory to its shadow memory (e.g. 16TB to cover 128TB on x86_64) and uses direct mapping with a scale and offset to translate a memory address to its corresponding shadow address. -Here is the function witch translate an address to its corresponding shadow +Here is the function which translates an address to its corresponding shadow address: static inline void *kasan_mem_to_shadow(const void *addr) -- cgit v0.10.2 From c0d2143dd139e70abba0b8b4bb0fc51c44cc0ac5 Mon Sep 17 00:00:00 2001 From: Chen Hanxiao Date: Fri, 24 Apr 2015 03:44:17 -0400 Subject: docs: add VmPMD description in proc commit dc6c9a35b66b ("mm: account pmd page tables to the process") add VmPMD in /proc/PID/status. This patch add a description in proc.txt for it. Signed-off-by: Chen Hanxiao Acked-by: Kirill A. Shutemov Signed-off-by: Jonathan Corbet diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 1cc7155..6f7fafd 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -235,6 +235,7 @@ Table 1-2: Contents of the status files (as of 4.1) VmExe size of text segment VmLib size of shared library code VmPTE size of page table entries + VmPMD size of second level page tables VmSwap size of swap usage (the number of referred swapents) Threads number of threads SigQ number of signals queued/max. number for queue -- cgit v0.10.2 From 9b88798c8e2db5d146508fe3b299e352388b9a25 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 4 May 2015 19:39:50 +0200 Subject: Documentation/magic-number: Remove SCI_MAGIC The SCI_MAGIC define was removed in commit f8e53553f452dcbf ("serial: sh-sci: Kill off more unused defines."). Its last user was the old drivers/char sh-sci driver, which was removed in 2004. Signed-off-by: Geert Uytterhoeven Signed-off-by: Jonathan Corbet diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt index 4c8e142..d9af851 100644 --- a/Documentation/magic-number.txt +++ b/Documentation/magic-number.txt @@ -138,7 +138,6 @@ KMALLOC_MAGIC 0x87654321 snd_alloc_track sound/core/memory.c PWC_MAGIC 0x89DC10AB pwc_device drivers/usb/media/pwc.h NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h -SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h CODA_MAGIC 0xC0DAC0DA coda_file_info fs/coda/coda_fs_i.h DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c diff --git a/Documentation/zh_CN/magic-number.txt b/Documentation/zh_CN/magic-number.txt index dfb72a5..c2607a6 100644 --- a/Documentation/zh_CN/magic-number.txt +++ b/Documentation/zh_CN/magic-number.txt @@ -138,7 +138,6 @@ KMALLOC_MAGIC 0x87654321 snd_alloc_track sound/core/memory.c PWC_MAGIC 0x89DC10AB pwc_device drivers/usb/media/pwc.h NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h -SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h CODA_MAGIC 0xC0DAC0DA coda_file_info include/linux/coda_fs_i.h DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c -- cgit v0.10.2 From dd7e283308a162f2fe50dec25bb864b2dc3cde3f Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 4 May 2015 19:39:51 +0200 Subject: Documentation/magic-number: Remove SCC_MAGIC The SCC_MAGIC define was removed in commit 1ec3ba93c5fad9dc ("Staging: remove drivers/char/scc.h as it should have gone a while ago"), while its actual last user was removed before in commit bb2a97e9ccd525dd ("Staging: delete generic_serial drivers"). Signed-off-by: Geert Uytterhoeven Signed-off-by: Jonathan Corbet diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt index d9af851..28befed 100644 --- a/Documentation/magic-number.txt +++ b/Documentation/magic-number.txt @@ -116,7 +116,6 @@ COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c I810_CARD_MAGIC 0x5072696E i810_card sound/oss/i810_audio.c TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c ROUTER_MAGIC 0x524d4157 wan_device [in wanrouter.h pre 3.9] -SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h RED_MAGIC1 0x5a2cf071 (any) mm/slab.c diff --git a/Documentation/zh_CN/magic-number.txt b/Documentation/zh_CN/magic-number.txt index c2607a6..e9db693 100644 --- a/Documentation/zh_CN/magic-number.txt +++ b/Documentation/zh_CN/magic-number.txt @@ -116,7 +116,6 @@ COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c I810_CARD_MAGIC 0x5072696E i810_card sound/oss/i810_audio.c TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c ROUTER_MAGIC 0x524d4157 wan_device [in wanrouter.h pre 3.9] -SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h RED_MAGIC1 0x5a2cf071 (any) mm/slab.c -- cgit v0.10.2 From 8547aa131495b081ef3e5ada8bc726251e23d2e0 Mon Sep 17 00:00:00 2001 From: Rabin Vincent Date: Mon, 4 May 2015 19:48:54 +0200 Subject: Documentation: tracing: fix grammar 4a88d44ab17da ("tracing: Remove mentioning of legacy latency_trace file from documentation") changed a sentence to refer to only one file instead of two, but the sentence still uses "they". Fix it. Signed-off-by: Rabin Vincent Acked-by: Steven Rostedt Signed-off-by: Jonathan Corbet diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt index 572ca92..7ddb1e3 100644 --- a/Documentation/trace/ftrace.txt +++ b/Documentation/trace/ftrace.txt @@ -108,8 +108,8 @@ of ftrace. Here is a list of some of the key files: data is read from this file, it is consumed, and will not be read again with a sequential read. The "trace" file is static, and if the tracer is not - adding more data,they will display the same - information every time they are read. + adding more data, it will display the same + information every time it is read. trace_options: -- cgit v0.10.2 From 8cda4c3ad480a974324532b6dacc67b9c1deb207 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 14 May 2015 18:58:01 +0000 Subject: SubmittingPatches: Clarify requirements for patches directed toward stable I misunderstood this section as simply asking me to add an email Cc, and was unaware of the existence of Documentation/stable_kernel_rules.txt. Hopefully this clarification will help save maintainers and new/rare submitters time in the future. Signed-off-by: Luke Dashjr Signed-off-by: Jonathan Corbet diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index b03a832..27e7e5e 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches @@ -299,7 +299,9 @@ toward the stable maintainers by putting a line like this: Cc: stable@vger.kernel.org -into your patch. +into the sign-off area of your patch (note, NOT an email recipient). You +should also read Documentation/stable_kernel_rules.txt in addition to this +file. Note, however, that some subsystem maintainers want to come to their own conclusions on which patches should go to the stable trees. The networking -- cgit v0.10.2 From 13696e0a735d0ae2d1fc16ff7e607aafdc5896a6 Mon Sep 17 00:00:00 2001 From: Masanari Iida Date: Sat, 16 May 2015 02:16:43 +0900 Subject: Doc: Fix description of nomce in kernel-parameters.txt Description of nomce tells opposite. Signed-off-by: Masanari Iida Signed-off-by: Jonathan Corbet diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 61ab162..e9159eb98 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -2437,7 +2437,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. nomca [IA-64] Disable machine check abort handling - nomce [X86-32] Machine Check Exception + nomce [X86-32] Disable Machine Check Exception nomfgpt [X86-32] Disable Multi-Function General Purpose Timer usage (for AMD Geode machines). -- cgit v0.10.2 From 11e285d8ff3289ce976d4b5b9748c87ac3db8c9d Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Thu, 21 May 2015 13:57:07 +0200 Subject: DMA-API: Spelling s/This/Think/ Also remove spaces before TABs while we're at it. Signed-off-by: Geert Uytterhoeven Signed-off-by: Jonathan Corbet diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt index 0f7afb2..16b6f95 100644 --- a/Documentation/DMA-API-HOWTO.txt +++ b/Documentation/DMA-API-HOWTO.txt @@ -240,7 +240,7 @@ the case would look like this: if (!dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64))) { using_dac = 1; - consistent_using_dac = 1; + consistent_using_dac = 1; } else if (!dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32))) { using_dac = 0; consistent_using_dac = 0; @@ -353,7 +353,7 @@ There are two types of DMA mappings: transfer, unmapped right after it (unless you use dma_sync_* below) and for which hardware can optimize for sequential accesses. - This of "streaming" as "asynchronous" or "outside the coherency + Think of "streaming" as "asynchronous" or "outside the coherency domain". Good examples of what to use streaming mappings for are: -- cgit v0.10.2 From cbfa2c52818ada02ca3084e0c50aba8745311bc1 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Thu, 21 May 2015 14:07:50 +0200 Subject: gpiolib: Grammar s/an negative/a negative/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Jonathan Corbet diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt index c21c131..15ec6d6 100644 --- a/Documentation/gpio/consumer.txt +++ b/Documentation/gpio/consumer.txt @@ -290,7 +290,7 @@ corresponding to a given GPIO using the following call: int gpiod_to_irq(const struct gpio_desc *desc) -It will return an IRQ number, or an negative errno code if the mapping can't be +It will return an IRQ number, or a negative errno code if the mapping can't be done (most likely because that particular GPIO cannot be used as IRQ). It is an unchecked error to use a GPIO that wasn't set up as an input using gpiod_direction_input(), or to use an IRQ number that didn't originally come -- cgit v0.10.2 From bde1b29420d71a17d87332db8e20229f251d6c14 Mon Sep 17 00:00:00 2001 From: Christoffer Dall Date: Wed, 13 May 2015 22:01:07 +0200 Subject: stable: Update documentation to clarify preferred procedure Clearly specify that "Cc: stable@vger.kernel.org" is strongly preferred so that developers understand that the other options should only be used when absolutely required. Also specify how upstream commit ids should be referenced in patches submitted directly to stable (I gathered this from looking at the stable archives), and specify that any modified patches for stable should be clearly documented in the patch description. Signed-off-by: Christoffer Dall Signed-off-by: Jonathan Corbet diff --git a/Documentation/stable_kernel_rules.txt b/Documentation/stable_kernel_rules.txt index 58d0ac4..3049a61 100644 --- a/Documentation/stable_kernel_rules.txt +++ b/Documentation/stable_kernel_rules.txt @@ -59,11 +59,20 @@ For all other submissions, choose one of the following procedures: changelog of your submission, as well as the kernel version you wish it to be applied to. -Option 1 is probably the easiest and most common. Options 2 and 3 are more -useful if the patch isn't deemed worthy at the time it is applied to a public -git tree (for instance, because it deserves more regression testing first). -Option 3 is especially useful if the patch needs some special handling to apply -to an older kernel (e.g., if API's have changed in the meantime). +Option 1 is *strongly* preferred, is the easiest and most common. Options 2 and +3 are more useful if the patch isn't deemed worthy at the time it is applied to +a public git tree (for instance, because it deserves more regression testing +first). Option 3 is especially useful if the patch needs some special handling +to apply to an older kernel (e.g., if API's have changed in the meantime). + +Note that for Option 3, if the patch deviates from the original upstream patch +(for example because it had to be backported) this must be very clearly +documented and justified in the patch description. + +The upstream commit ID must be specified with a separate line above the commit +text, like this: + + commit upstream. Additionally, some patches submitted via Option 1 may have additional patch prerequisites which can be cherry-picked. This can be specified in the following -- cgit v0.10.2 From 582ed8d51e2b6cb8a168c94852bca482685c2509 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Thu, 28 May 2015 11:56:01 -0700 Subject: Documentation: extend use case for EXPORT_SYMBOL_GPL() Current documentation over use case for EXPORT_SYMBOL_GPL() only acknowledges functions which are "an internal implementation issue, and not really an interface". In practice these days though we have some maintainers taking on preferences to require all new functionality go in with EXPORT_SYMBOL_GPL(). A maintainer asking developers to use EXPORT_SYMBOL_GPL() for new functionality tends to be a well accepted and understood position that maintainers can take and typically requires the maintainers educating contributing developers on their own positions and requirements. Developers who submit code to maintainers not familiar with these preferences as optional for new functionality need explicit guidence though as existing documentation does not acknowledge this as a valid possibility. Without this being documented some maintainers are reluctant to accept new functionality with EXPORT_SYMBOL_GPL(). This extends the use case documentation for EXPORT_SYMBOL_GPL() to acknowledge acceptance for new functionality. Signed-off-by: Luis R. Rodriguez [jc: wording tweaked with permission] Signed-off-by: Jonathan Corbet diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl index e84f094..589b40c 100644 --- a/Documentation/DocBook/kernel-hacking.tmpl +++ b/Documentation/DocBook/kernel-hacking.tmpl @@ -954,6 +954,8 @@ printk(KERN_INFO "my ip: %pI4\n", &ipaddress); MODULE_LICENSE() that specifies a GPL compatible license. It implies that the function is considered an internal implementation issue, and not really an interface. + Some maintainers and developers may however + require EXPORT_SYMBOL_GPL() when adding any new APIs or functionality. -- cgit v0.10.2 From 1df1b3618d95f7a6668c1a8e749e1be96a7e3fe1 Mon Sep 17 00:00:00 2001 From: Prarit Bhargava Date: Mon, 1 Jun 2015 09:36:04 -0400 Subject: Documentation, intel_pstate: Improve legacy mode internal governors description The current documentation is incomplete wrt the intel_pstate legacy internal governors. The confusion comes from the general cpufreq governors which also use the names performance and powersave. This patch better differentiates between the two sets of governors and gives an explanation of how the internal P-state governors behave differently from one another. Also fix two minor typos. Cc: Prarit Bhargava Cc: "Rafael J. Wysocki" Cc: Kristen Carlson Accardi Cc: Dirk Brandewie Cc: x86@kernel.org Acked-by: Viresh Kumar Signed-off-by: Prarit Bhargava Signed-off-by: Jonathan Corbet diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt index 77ec215..c15aa75 100644 --- a/Documentation/cpu-freq/governors.txt +++ b/Documentation/cpu-freq/governors.txt @@ -36,7 +36,7 @@ Contents: 1. What Is A CPUFreq Governor? ============================== -Most cpufreq drivers (in fact, all except one, longrun) or even most +Most cpufreq drivers (except the intel_pstate and longrun) or even most cpu frequency scaling algorithms only offer the CPU to be set to one frequency. In order to offer dynamic frequency scaling, the cpufreq core must be able to tell these drivers of a "target frequency". So diff --git a/Documentation/cpu-freq/intel-pstate.txt b/Documentation/cpu-freq/intel-pstate.txt index 6557507..be8d400 100644 --- a/Documentation/cpu-freq/intel-pstate.txt +++ b/Documentation/cpu-freq/intel-pstate.txt @@ -3,24 +3,25 @@ Intel P-state driver This driver provides an interface to control the P state selection for SandyBridge+ Intel processors. The driver can operate two different -modes based on the processor model legacy and Hardware P state (HWP) +modes based on the processor model, legacy mode and Hardware P state (HWP) mode. -In legacy mode the driver implements a scaling driver with an internal -governor for Intel Core processors. The driver follows the same model -as the Transmeta scaling driver (longrun.c) and implements the -setpolicy() instead of target(). Scaling drivers that implement -setpolicy() are assumed to implement internal governors by the cpufreq -core. All the logic for selecting the current P state is contained -within the driver; no external governor is used by the cpufreq core. +In legacy mode, the Intel P-state implements two internal governors, +performance and powersave, that differ from the general cpufreq governors of +the same name (the general cpufreq governors implement target(), whereas the +internal Intel P-state governors implement setpolicy()). The internal +performance governor sets the max_perf_pct and min_perf_pct to 100; that is, +the governor selects the highest available P state to maximize the performance +of the core. The internal powersave governor selects the appropriate P state +based on the current load on the CPU. In HWP mode P state selection is implemented in the processor itself. The driver provides the interfaces between the cpufreq core and the processor to control P state selection based on user preferences and reporting frequency to the cpufreq core. In this mode the -internal governor code is disabled. +internal Intel P-state governor code is disabled. -In addtion to the interfaces provided by the cpufreq core for +In addition to the interfaces provided by the cpufreq core for controlling frequency the driver provides sysfs files for controlling P state selection. These files have been added to /sys/devices/system/cpu/intel_pstate/ -- cgit v0.10.2 From 03e8f01a67d6fc02fafc1b23394cc750fec290e1 Mon Sep 17 00:00:00 2001 From: Frans Klaver Date: Thu, 4 Jun 2015 21:27:38 +0200 Subject: Doc: networking: txtimestamp: fix printf format warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Documentation/networking/timestamping/txtimestamp.c: In function ‘__print_timestamp’: Documentation/networking/timestamping/txtimestamp.c:99:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int64_t’ [-Wformat=] fprintf(stderr, " (%+ld us)", cur_ms - prev_ms); int64_t differs per platform, so a type specifier that differs along with it is required. Signed-off-by: Frans Klaver Signed-off-by: Jonathan Corbet diff --git a/Documentation/networking/timestamping/txtimestamp.c b/Documentation/networking/timestamping/txtimestamp.c index 8217510..5df0704 100644 --- a/Documentation/networking/timestamping/txtimestamp.c +++ b/Documentation/networking/timestamping/txtimestamp.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -49,7 +50,6 @@ #include #include #include -#include #include #include #include @@ -96,7 +96,7 @@ static void __print_timestamp(const char *name, struct timespec *cur, prev_ms = (long) ts_prev.tv_sec * 1000 * 1000; prev_ms += ts_prev.tv_nsec / 1000; - fprintf(stderr, " (%+ld us)", cur_ms - prev_ms); + fprintf(stderr, " (%+" PRId64 " us)", cur_ms - prev_ms); } ts_prev = *cur; -- cgit v0.10.2 From 47016077b665b274c6c18f660a9a60898284e700 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Fri, 5 Jun 2015 01:11:22 +0200 Subject: vfs: Minor documentation fix The check_acl inode operation and the IPERM_FLAG_RCU flag are long gone; update the documentation. Signed-off-by: Andreas Gruenbacher Signed-off-by: Jonathan Corbet diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index e69274d..7a34c7e 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting @@ -379,10 +379,10 @@ may now be called in rcu-walk mode (nd->flags & LOOKUP_RCU). -ECHILD should be returned if the filesystem cannot handle rcu-walk. See Documentation/filesystems/vfs.txt for more details. - permission and check_acl are inode permission checks that are called -on many or all directory inodes on the way down a path walk (to check for -exec permission). These must now be rcu-walk aware (flags & IPERM_FLAG_RCU). -See Documentation/filesystems/vfs.txt for more details. + permission is an inode permission check that is called on many or all +directory inodes on the way down a path walk (to check for exec permission). It +must now be rcu-walk aware (mask & MAY_NOT_BLOCK). See +Documentation/filesystems/vfs.txt for more details. -- [mandatory] -- cgit v0.10.2 From b322582fc1cfda977996e315b3c9e83018a39af3 Mon Sep 17 00:00:00 2001 From: Masanari Iida Date: Fri, 5 Jun 2015 21:38:19 +0900 Subject: Doc:nfc: Fix typo in nfc-hci.txt This patch fix a spelling typo in nfc-hci.txt Signed-off-by: Masanari Iida Signed-off-by: Jonathan Corbet diff --git a/Documentation/nfc/nfc-hci.txt b/Documentation/nfc/nfc-hci.txt index 0686c9e..0dc078c 100644 --- a/Documentation/nfc/nfc-hci.txt +++ b/Documentation/nfc/nfc-hci.txt @@ -122,7 +122,7 @@ This must be done from a context that can sleep. PHY Management -------------- -The physical link (i2c, ...) management is defined by the following struture: +The physical link (i2c, ...) management is defined by the following structure: struct nfc_phy_ops { int (*write)(void *dev_id, struct sk_buff *skb); -- cgit v0.10.2 From a28ab162bdf04d0e5d814478340ba32999233e7e Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Sat, 6 Jun 2015 19:05:51 +0900 Subject: Documentation: ARM: EXYNOS: Describe boot loaders interface Various boot loaders for Exynos based boards use certain memory addresses during booting for different purposes. Mostly this is one of following : 1. as a CPU boot address, 2. for storing magic cookie related to low power mode (AFTR, sleep). The document, based solely on kernel source code, tries to group the information scattered over different files. This would help in the future when adding support for new SoC or when extending features related to low power modes. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jonathan Corbet diff --git a/Documentation/arm/Samsung/Bootloader-interface.txt b/Documentation/arm/Samsung/Bootloader-interface.txt new file mode 100644 index 0000000..b96ead9 --- /dev/null +++ b/Documentation/arm/Samsung/Bootloader-interface.txt @@ -0,0 +1,53 @@ + Interface between kernel and boot loaders on Exynos boards + ========================================================== + +Author: Krzysztof Kozlowski +Date : 6 June 2015 + +The document tries to describe currently used interface between Linux kernel +and boot loaders on Samsung Exynos based boards. This is not a definition +of interface but rather a description of existing state, a reference +for information purpose only. + +In the document "boot loader" means any of following: U-boot, proprietary +SBOOT or any other firmware for ARMv7 and ARMv8 initializing the board before +executing kernel. + + +1. Non-Secure mode +Address: sysram_ns_base_addr +Offset Value Purpose +============================================================================= +0x08 exynos_cpu_resume_ns System suspend +0x0c 0x00000bad (Magic cookie) System suspend +0x1c exynos4_secondary_startup Secondary CPU boot +0x1c + 4*cpu exynos4_secondary_startup (Exynos4412) Secondary CPU boot +0x20 0xfcba0d10 (Magic cookie) AFTR +0x24 exynos_cpu_resume_ns AFTR +0x28 + 4*cpu 0x8 (Magic cookie, Exynos3250) AFTR + + +2. Secure mode +Address: sysram_base_addr +Offset Value Purpose +============================================================================= +0x00 exynos4_secondary_startup Secondary CPU boot +0x04 exynos4_secondary_startup (Exynos542x) Secondary CPU boot +4*cpu exynos4_secondary_startup (Exynos4412) Secondary CPU boot +0x20 exynos_cpu_resume (Exynos4210 r1.0) AFTR +0x24 0xfcba0d10 (Magic cookie, Exynos4210 r1.0) AFTR + +Address: pmu_base_addr +Offset Value Purpose +============================================================================= +0x0800 exynos_cpu_resume AFTR +0x0814 exynos4_secondary_startup (Exynos4210 r1.1) Secondary CPU boot +0x0818 0xfcba0d10 (Magic cookie, Exynos4210 r1.1) AFTR +0x081C exynos_cpu_resume (Exynos4210 r1.1) AFTR + + +3. Other (regardless of secure/non-secure mode) +Address: pmu_base_addr +Offset Value Purpose +============================================================================= +0x0908 Non-zero (only Exynos3250) Secondary CPU boot up indicator -- cgit v0.10.2 From b3fd7368f8f60bc9a7ffc2a5311db5f4dbd42180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Sat, 6 Jun 2015 15:42:28 +0200 Subject: Move freefall program from Documentation/ to tools/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pali Rohár Acked-by: Pavel Machek Signed-off-by: Jonathan Corbet diff --git a/Documentation/laptops/.gitignore b/Documentation/laptops/.gitignore index da2bd06..9fc984e 100644 --- a/Documentation/laptops/.gitignore +++ b/Documentation/laptops/.gitignore @@ -1,2 +1 @@ dslm -freefall diff --git a/Documentation/laptops/00-INDEX b/Documentation/laptops/00-INDEX index a3b4f20..7c0ac2a 100644 --- a/Documentation/laptops/00-INDEX +++ b/Documentation/laptops/00-INDEX @@ -8,8 +8,6 @@ disk-shock-protection.txt - information on hard disk shock protection. dslm.c - Simple Disk Sleep Monitor program -freefall.c - - (HP/DELL) laptop accelerometer program for disk protection. laptop-mode.txt - how to conserve battery power using laptop-mode. sony-laptop.txt diff --git a/Documentation/laptops/Makefile b/Documentation/laptops/Makefile index 2b0fa5e..0abe44f 100644 --- a/Documentation/laptops/Makefile +++ b/Documentation/laptops/Makefile @@ -1,5 +1,5 @@ # List of programs to build -hostprogs-y := dslm freefall +hostprogs-y := dslm # Tell kbuild to always build the programs always := $(hostprogs-y) diff --git a/Documentation/laptops/freefall.c b/Documentation/laptops/freefall.c deleted file mode 100644 index 5e44b20..0000000 --- a/Documentation/laptops/freefall.c +++ /dev/null @@ -1,174 +0,0 @@ -/* Disk protection for HP/DELL machines. - * - * Copyright 2008 Eric Piel - * Copyright 2009 Pavel Machek - * Copyright 2012 Sonal Santan - * Copyright 2014 Pali Rohár - * - * GPLv2. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static int noled; -static char unload_heads_path[64]; -static char device_path[32]; -static const char app_name[] = "FREE FALL"; - -static int set_unload_heads_path(char *device) -{ - if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0) - return -EINVAL; - strncpy(device_path, device, sizeof(device_path) - 1); - - snprintf(unload_heads_path, sizeof(unload_heads_path) - 1, - "/sys/block/%s/device/unload_heads", device+5); - return 0; -} - -static int valid_disk(void) -{ - int fd = open(unload_heads_path, O_RDONLY); - - if (fd < 0) { - perror(unload_heads_path); - return 0; - } - - close(fd); - return 1; -} - -static void write_int(char *path, int i) -{ - char buf[1024]; - int fd = open(path, O_RDWR); - - if (fd < 0) { - perror("open"); - exit(1); - } - - sprintf(buf, "%d", i); - - if (write(fd, buf, strlen(buf)) != strlen(buf)) { - perror("write"); - exit(1); - } - - close(fd); -} - -static void set_led(int on) -{ - if (noled) - return; - write_int("/sys/class/leds/hp::hddprotect/brightness", on); -} - -static void protect(int seconds) -{ - const char *str = (seconds == 0) ? "Unparked" : "Parked"; - - write_int(unload_heads_path, seconds*1000); - syslog(LOG_INFO, "%s %s disk head\n", str, device_path); -} - -static int on_ac(void) -{ - /* /sys/class/power_supply/AC0/online */ - return 1; -} - -static int lid_open(void) -{ - /* /proc/acpi/button/lid/LID/state */ - return 1; -} - -static void ignore_me(int signum) -{ - protect(0); - set_led(0); -} - -int main(int argc, char **argv) -{ - int fd, ret; - struct stat st; - struct sched_param param; - - if (argc == 1) - ret = set_unload_heads_path("/dev/sda"); - else if (argc == 2) - ret = set_unload_heads_path(argv[1]); - else - ret = -EINVAL; - - if (ret || !valid_disk()) { - fprintf(stderr, "usage: %s (default: /dev/sda)\n", - argv[0]); - exit(1); - } - - fd = open("/dev/freefall", O_RDONLY); - if (fd < 0) { - perror("/dev/freefall"); - return EXIT_FAILURE; - } - - if (stat("/sys/class/leds/hp::hddprotect/brightness", &st)) - noled = 1; - - if (daemon(0, 0) != 0) { - perror("daemon"); - return EXIT_FAILURE; - } - - openlog(app_name, LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1); - - param.sched_priority = sched_get_priority_max(SCHED_FIFO); - sched_setscheduler(0, SCHED_FIFO, ¶m); - mlockall(MCL_CURRENT|MCL_FUTURE); - - signal(SIGALRM, ignore_me); - - for (;;) { - unsigned char count; - - ret = read(fd, &count, sizeof(count)); - alarm(0); - if ((ret == -1) && (errno == EINTR)) { - /* Alarm expired, time to unpark the heads */ - continue; - } - - if (ret != sizeof(count)) { - perror("read"); - break; - } - - protect(21); - set_led(1); - if (1 || on_ac() || lid_open()) - alarm(2); - else - alarm(20); - } - - closelog(); - close(fd); - return EXIT_SUCCESS; -} diff --git a/tools/Makefile b/tools/Makefile index 9a617ad..4557c39 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -18,6 +18,7 @@ help: @echo ' vm - misc vm tools' @echo ' x86_energy_perf_policy - Intel energy policy tool' @echo ' tmon - thermal monitoring and tuning tool' + @echo ' freefall - laptop accelerometer program for disk protection' @echo '' @echo 'You can do:' @echo ' $$ make -C tools/ _install' @@ -62,6 +63,9 @@ turbostat x86_energy_perf_policy: FORCE tmon: FORCE $(call descend,thermal/$@) +freefall: FORCE + $(call descend,laptop/$@) + acpi_install: $(call descend,power/$(@:_install=),install) @@ -80,10 +84,13 @@ turbostat_install x86_energy_perf_policy_install: tmon_install: $(call descend,thermal/$(@:_install=),install) +freefall_install: + $(call descend,laptop/$(@:_install=),install) + install: acpi_install cgroup_install cpupower_install hv_install firewire_install lguest_install \ perf_install selftests_install turbostat_install usb_install \ virtio_install vm_install net_install x86_energy_perf_policy_install \ - tmon + tmon freefall_install acpi_clean: $(call descend,power/acpi,clean) @@ -112,8 +119,11 @@ turbostat_clean x86_energy_perf_policy_clean: tmon_clean: $(call descend,thermal/tmon,clean) +freefall_clean: + $(call descend,laptop/freefall,clean) + clean: acpi_clean cgroup_clean cpupower_clean hv_clean firewire_clean lguest_clean \ perf_clean selftests_clean turbostat_clean usb_clean virtio_clean \ - vm_clean net_clean x86_energy_perf_policy_clean tmon_clean + vm_clean net_clean x86_energy_perf_policy_clean tmon_clean freefall_clean .PHONY: FORCE diff --git a/tools/laptop/freefall/Makefile b/tools/laptop/freefall/Makefile new file mode 100644 index 0000000..48c6c93 --- /dev/null +++ b/tools/laptop/freefall/Makefile @@ -0,0 +1,17 @@ +PREFIX ?= /usr +SBINDIR ?= sbin +INSTALL ?= install +CC = $(CROSS_COMPILE)gcc + +TARGET = freefall + +all: $(TARGET) + +%: %.c + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< + +clean: + $(RM) $(TARGET) + +install: freefall + $(INSTALL) -D -m 755 $(TARGET) $(DESTDIR)$(PREFIX)/$(SBINDIR)/$(TARGET) diff --git a/tools/laptop/freefall/freefall.c b/tools/laptop/freefall/freefall.c new file mode 100644 index 0000000..5e44b20 --- /dev/null +++ b/tools/laptop/freefall/freefall.c @@ -0,0 +1,174 @@ +/* Disk protection for HP/DELL machines. + * + * Copyright 2008 Eric Piel + * Copyright 2009 Pavel Machek + * Copyright 2012 Sonal Santan + * Copyright 2014 Pali Rohár + * + * GPLv2. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int noled; +static char unload_heads_path[64]; +static char device_path[32]; +static const char app_name[] = "FREE FALL"; + +static int set_unload_heads_path(char *device) +{ + if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0) + return -EINVAL; + strncpy(device_path, device, sizeof(device_path) - 1); + + snprintf(unload_heads_path, sizeof(unload_heads_path) - 1, + "/sys/block/%s/device/unload_heads", device+5); + return 0; +} + +static int valid_disk(void) +{ + int fd = open(unload_heads_path, O_RDONLY); + + if (fd < 0) { + perror(unload_heads_path); + return 0; + } + + close(fd); + return 1; +} + +static void write_int(char *path, int i) +{ + char buf[1024]; + int fd = open(path, O_RDWR); + + if (fd < 0) { + perror("open"); + exit(1); + } + + sprintf(buf, "%d", i); + + if (write(fd, buf, strlen(buf)) != strlen(buf)) { + perror("write"); + exit(1); + } + + close(fd); +} + +static void set_led(int on) +{ + if (noled) + return; + write_int("/sys/class/leds/hp::hddprotect/brightness", on); +} + +static void protect(int seconds) +{ + const char *str = (seconds == 0) ? "Unparked" : "Parked"; + + write_int(unload_heads_path, seconds*1000); + syslog(LOG_INFO, "%s %s disk head\n", str, device_path); +} + +static int on_ac(void) +{ + /* /sys/class/power_supply/AC0/online */ + return 1; +} + +static int lid_open(void) +{ + /* /proc/acpi/button/lid/LID/state */ + return 1; +} + +static void ignore_me(int signum) +{ + protect(0); + set_led(0); +} + +int main(int argc, char **argv) +{ + int fd, ret; + struct stat st; + struct sched_param param; + + if (argc == 1) + ret = set_unload_heads_path("/dev/sda"); + else if (argc == 2) + ret = set_unload_heads_path(argv[1]); + else + ret = -EINVAL; + + if (ret || !valid_disk()) { + fprintf(stderr, "usage: %s (default: /dev/sda)\n", + argv[0]); + exit(1); + } + + fd = open("/dev/freefall", O_RDONLY); + if (fd < 0) { + perror("/dev/freefall"); + return EXIT_FAILURE; + } + + if (stat("/sys/class/leds/hp::hddprotect/brightness", &st)) + noled = 1; + + if (daemon(0, 0) != 0) { + perror("daemon"); + return EXIT_FAILURE; + } + + openlog(app_name, LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1); + + param.sched_priority = sched_get_priority_max(SCHED_FIFO); + sched_setscheduler(0, SCHED_FIFO, ¶m); + mlockall(MCL_CURRENT|MCL_FUTURE); + + signal(SIGALRM, ignore_me); + + for (;;) { + unsigned char count; + + ret = read(fd, &count, sizeof(count)); + alarm(0); + if ((ret == -1) && (errno == EINTR)) { + /* Alarm expired, time to unpark the heads */ + continue; + } + + if (ret != sizeof(count)) { + perror("read"); + break; + } + + protect(21); + set_led(1); + if (1 || on_ac() || lid_open()) + alarm(2); + else + alarm(20); + } + + closelog(); + close(fd); + return EXIT_SUCCESS; +} -- cgit v0.10.2 From fc10639dfdc2603e8776ebbf6b20ff8b03340ed3 Mon Sep 17 00:00:00 2001 From: Masanari Iida Date: Sat, 6 Jun 2015 23:43:21 +0900 Subject: Doc: ja_JP: Fix typo in HOWTO This patch fix a spelling typo in ja_JP/HOWTO. Signed-off-by: Masanari Iida Signed-off-by: Jonathan Corbet diff --git a/Documentation/ja_JP/HOWTO b/Documentation/ja_JP/HOWTO index b61885c..5a0f2bd 100644 --- a/Documentation/ja_JP/HOWTO +++ b/Documentation/ja_JP/HOWTO @@ -445,7 +445,7 @@ MAINTAINERS ファイルにリストがありますので参照してくださ メールの先頭でなく、各引用行の間にあなたの言いたいことを追加するべきで す。 -もしパッチをメールに付ける場合は、Documentaion/SubmittingPatches に提 +もしパッチをメールに付ける場合は、Documentation/SubmittingPatches に提 示されているように、それは プレーンな可読テキストにすることを忘れない ようにしましょう。カーネル開発者は 添付や圧縮したパッチを扱いたがりま せん- -- cgit v0.10.2 From bd55daf48dc9a7583031c6c0c6930d7f836f56af Mon Sep 17 00:00:00 2001 From: Jeffrey Rogers Date: Sat, 6 Jun 2015 17:18:45 -0400 Subject: kbuild: edit explanation of clean-files variable Commit 976591810f8a (kbuild Update documentation of clean-files and clean-dirs) changed the example for the clean-files variable, but left the explanation unchanged. Edit the explanation to match the example. Signed-off-by: Jeffrey Rogers Signed-off-by: Jonathan Corbet diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 74b6c6d..e63b446 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt @@ -755,8 +755,8 @@ Additional files can be specified in kbuild makefiles by use of $(clean-files). #lib/Makefile clean-files := crc32table.h -When executing "make clean", the two files "devlist.h classlist.h" will be -deleted. Kbuild will assume files to be in the same relative directory as the +When executing "make clean", the file "crc32table.h" will be deleted. +Kbuild will assume files to be in the same relative directory as the Makefile, except if prefixed with $(objtree). To delete a directory hierarchy use: -- cgit v0.10.2 From 0d03943c0b50ad47ec6bb157a5d02d6ba9da477e Mon Sep 17 00:00:00 2001 From: Thomas de Beauchene Date: Sun, 7 Jun 2015 16:30:23 +0200 Subject: Documentation: filesystems: updated struct file_operations documentation in vfs.txt Updated struct file_operations documentation in vfs.txt to match current implementation Signed-off-by: Thomas de Beauchene Signed-off-by: Jonathan Corbet diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 5d833b3..2dd5274 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt @@ -797,7 +797,7 @@ struct file_operations ---------------------- This describes how the VFS can manipulate an open file. As of kernel -3.12, the following members are defined: +4.1, the following members are defined: struct file_operations { struct module *owner; @@ -811,8 +811,9 @@ struct file_operations { long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); long (*compat_ioctl) (struct file *, unsigned int, unsigned long); int (*mmap) (struct file *, struct vm_area_struct *); + int (*mremap)(struct file *, struct vm_area_struct *); int (*open) (struct inode *, struct file *); - int (*flush) (struct file *); + int (*flush) (struct file *, fl_owner_t id); int (*release) (struct inode *, struct file *); int (*fsync) (struct file *, loff_t, loff_t, int datasync); int (*aio_fsync) (struct kiocb *, int datasync); @@ -822,11 +823,15 @@ struct file_operations { unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); int (*check_flags)(int); int (*flock) (struct file *, int, struct file_lock *); - ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); - ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); - int (*setlease)(struct file *, long arg, struct file_lock **, void **); - long (*fallocate)(struct file *, int mode, loff_t offset, loff_t len); + ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); + ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); + int (*setlease)(struct file *, long, struct file_lock **, void **); + long (*fallocate)(struct file *file, int mode, loff_t offset, + loff_t len); void (*show_fdinfo)(struct seq_file *m, struct file *f); +#ifndef CONFIG_MMU + unsigned (*mmap_capabilities)(struct file *); +#endif }; Again, all methods are called without any locks being held, unless -- cgit v0.10.2