Re: [PATCH rfc -next 01/10] mm: add a generic VMA lock-based page fault handler
On 2023/7/14 9:52, Kefeng Wang wrote: On 2023/7/14 4:12, Suren Baghdasaryan wrote: On Thu, Jul 13, 2023 at 9:15 AM Matthew Wilcox wrote: +int try_vma_locked_page_fault(struct vm_locked_fault *vmlf, vm_fault_t *ret) +{ + struct vm_area_struct *vma; + vm_fault_t fault; On Thu, Jul 13, 2023 at 05:53:29PM +0800, Kefeng Wang wrote: +#define VM_LOCKED_FAULT_INIT(_name, _mm, _address, _fault_flags, _vm_flags, _regs, _fault_code) \ + _name.mm = _mm; \ + _name.address = _address; \ + _name.fault_flags = _fault_flags; \ + _name.vm_flags = _vm_flags; \ + _name.regs = _regs; \ + _name.fault_code = _fault_code More consolidated code is a good idea; no question. But I don't think this is the right way to do it. I agree it is not good enough, but the arch's vma check acess has different implementation, some use vm flags, some need fault code and regs, and some use both :( +int __weak arch_vma_check_access(struct vm_area_struct *vma, + struct vm_locked_fault *vmlf); This should be: #ifndef vma_check_access bool vma_check_access(struct vm_area_struct *vma, ) { return (vma->vm_flags & vm_flags) == 0; } #endif and then arches which want to do something different can just define vma_check_access. Ok, I could convert to use this way. +int try_vma_locked_page_fault(struct vm_locked_fault *vmlf, vm_fault_t *ret) +{ + struct vm_area_struct *vma; + vm_fault_t fault; Declaring the vmf in this function and then copying it back is just wrong. We need to declare vm_fault_t earlier (in the arch fault handler) and pass it in. Actually I passed the vm_fault_t *ret(in the arch fault handler), we could directly use *ret instead of a new local variable, and no copy. Did you mean to say "we need to declare vmf (struct vm_fault) earlier (in the arch fault handler) and pass it in." ? After recheck the code, I think Matthew' idea is 'declare vmf (struct vm_fault) earlier' like Suren said, not vm_fault_t, right? will try this, thanks. I don't think that creating struct vm_locked_fault is the right idea either. As mentioned above for vma check access, we need many arguments for a function, a new struct looks possible better, is there better solution or any suggestion? Thanks.
Re: [PATCH v9 01/42] mm: Rename arch pte_mkwrite()'s to pte_mkwrite_novma()
On Mon, Jun 12, 2023 at 05:10:27PM -0700, Rick Edgecombe wrote: > The x86 Shadow stack feature includes a new type of memory called shadow > stack. This shadow stack memory has some unusual properties, which requires > some core mm changes to function properly. This seems to break sparc64_defconfig when applied on top of v6.5-rc1: In file included from /home/broonie/git/bisect/include/linux/mm.h:29, from /home/broonie/git/bisect/net/core/skbuff.c:40: /home/broonie/git/bisect/include/linux/pgtable.h: In function 'pmd_mkwrite': /home/broonie/git/bisect/include/linux/pgtable.h:528:9: error: implicit declaration of function 'pmd_mkwrite_novma'; did you mean 'pte_mkwrite_novma'? [-Werror=implicit-function-declaration] return pmd_mkwrite_novma(pmd); ^ pte_mkwrite_novma /home/broonie/git/bisect/include/linux/pgtable.h:528:9: error: incompatible types when returning type 'int' but 'pmd_t' {aka 'struct '} was expected return pmd_mkwrite_novma(pmd); ^~ The same issue seems to apply with the version that was in -next based on v6.4-rc4 too. signature.asc Description: PGP signature
[PATCH] I2C: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring --- drivers/i2c/busses/i2c-at91-core.c| 1 - drivers/i2c/busses/i2c-at91-master.c | 1 - drivers/i2c/busses/i2c-bcm-iproc.c| 2 +- drivers/i2c/busses/i2c-bcm2835.c | 2 +- drivers/i2c/busses/i2c-cpm.c | 4 ++-- drivers/i2c/busses/i2c-davinci.c | 2 +- drivers/i2c/busses/i2c-emev2.c| 2 +- drivers/i2c/busses/i2c-exynos5.c | 4 +--- drivers/i2c/busses/i2c-gxp.c | 3 ++- drivers/i2c/busses/i2c-ibm_iic.c | 3 ++- drivers/i2c/busses/i2c-imx-lpi2c.c| 1 - drivers/i2c/busses/i2c-imx.c | 1 - drivers/i2c/busses/i2c-jz4780.c | 2 +- drivers/i2c/busses/i2c-lpc2k.c| 1 - drivers/i2c/busses/i2c-meson.c| 1 - drivers/i2c/busses/i2c-mlxbf.c| 2 +- drivers/i2c/busses/i2c-mpc.c | 3 ++- drivers/i2c/busses/i2c-mt65xx.c | 4 +--- drivers/i2c/busses/i2c-mt7621.c | 3 ++- drivers/i2c/busses/i2c-mxs.c | 1 - drivers/i2c/busses/i2c-npcm7xx.c | 1 - drivers/i2c/busses/i2c-owl.c | 3 ++- drivers/i2c/busses/i2c-pca-platform.c | 1 - drivers/i2c/busses/i2c-pxa-pci.c | 1 - drivers/i2c/busses/i2c-rcar.c | 2 +- drivers/i2c/busses/i2c-riic.c | 1 - drivers/i2c/busses/i2c-s3c2410.c | 1 - drivers/i2c/busses/i2c-sh_mobile.c| 2 +- drivers/i2c/busses/i2c-sprd.c | 1 - drivers/i2c/busses/i2c-tegra-bpmp.c | 2 +- drivers/i2c/busses/i2c-tegra.c| 2 +- drivers/i2c/muxes/i2c-mux-gpmux.c | 2 +- drivers/i2c/muxes/i2c-mux-ltc4306.c | 1 - 33 files changed, 25 insertions(+), 38 deletions(-) diff --git a/drivers/i2c/busses/i2c-at91-core.c b/drivers/i2c/busses/i2c-at91-core.c index 05ad3bc3578a..3563a7fd75db 100644 --- a/drivers/i2c/busses/i2c-at91-core.c +++ b/drivers/i2c/busses/i2c-at91-core.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/i2c/busses/i2c-at91-master.c b/drivers/i2c/busses/i2c-at91-master.c index c0c35785a0dc..94cff1cd527e 100644 --- a/drivers/i2c/busses/i2c-at91-master.c +++ b/drivers/i2c/busses/i2c-at91-master.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c index 2d8342fdc25d..37d559bc51c4 100644 --- a/drivers/i2c/busses/i2c-bcm-iproc.c +++ b/drivers/i2c/busses/i2c-bcm-iproc.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c index 8ce6d3f49551..2743e59184b3 100644 --- a/drivers/i2c/busses/i2c-bcm2835.c +++ b/drivers/i2c/busses/i2c-bcm2835.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c index 732daf6a932b..9a664abf734d 100644 --- a/drivers/i2c/busses/i2c-cpm.c +++ b/drivers/i2c/busses/i2c-cpm.c @@ -26,10 +26,10 @@ #include #include #include +#include #include -#include #include -#include +#include #include #include diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 71b60778c643..927ea9ba74ab 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/i2c/busses/i2c-emev2.c b/drivers/i2c/busses/i2c-emev2.c index 4ba93cd91c0f..557409410445 100644 --- a/drivers/i2c/busses/i2c-emev2.c +++ b/drivers/i2c/busses/i2c-emev2.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c index f378cd479e55..7668210a59d5 100644 --- a/drivers/i2c/busses/i2c-exynos5.c +++ b/drivers/i2c/busses/i2c-exynos5.c @@ -18,9 +18,7 @@ #include #include #include -#include -#include -#include +#include #include /* diff --git a/drivers/i2c/busses/i2c-gxp.c b/drivers/i2c/busses/i2c-gxp.c index 70b0de07ed99..efafc0528c44 100644 --- a/drivers/i2c/busses/i2c-gxp.c +++ b/drivers/i2c/busses/i2c-gxp.c @@ -4,8 +4,9 @@ #include #include #include +#include #include -#include +#include #include #include diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index 1ad9d3b26dd3..408820319ec4 100644 ---
RE: [PATCH v2 0/5] crypto: Accelerated Chacha20/Poly1305 implementation
Thanks. -Danny From: Herbert Xu Sent: Friday, July 14, 2023 4:49 PM To: Danny Tsen Cc: linux-cry...@vger.kernel.org ; lei...@debian.org ; na...@linux.ibm.com ; ap...@cryptogams.org ; linux-ker...@vger.kernel.org ; linuxppc-dev@lists.ozlabs.org ; m...@ellerman.id.au ; ltc...@linux.vnet.ibm.com ; Danny Tsen Subject: [EXTERNAL] Re: [PATCH v2 0/5] crypto: Accelerated Chacha20/Poly1305 implementation On Wed, Apr 26, 2023 at 03:11:42PM -0400, Danny Tsen wrote: > This patch series provide an accelerated/optimized Chacha20 and Poly1305 > implementation for Power10 or later CPU (ppc64le). This module > implements algorithm specified in RFC7539. The implementation > provides 3.5X better performance than the baseline for Chacha20 and > Poly1305 individually and 1.5X improvement for Chacha20/Poly1305 > operation. > > This patch has been tested with the kernel crypto module tcrypt.ko and > has passed the selftest. The patch is also tested with > CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled. > > > Danny Tsen (5): > An optimized Chacha20 implementation with 8-way unrolling for ppc64le. > Glue code for optmized Chacha20 implementation for ppc64le. > An optimized Poly1305 implementation with 4-way unrolling for ppc64le. > Glue code for optmized Poly1305 implementation for ppc64le. > Update Kconfig and Makefile. > > arch/powerpc/crypto/Kconfig | 26 + > arch/powerpc/crypto/Makefile|4 + > arch/powerpc/crypto/chacha-p10-glue.c | 221 + > arch/powerpc/crypto/chacha-p10le-8x.S | 842 ++ > arch/powerpc/crypto/poly1305-p10-glue.c | 186 > arch/powerpc/crypto/poly1305-p10le_64.S | 1075 +++ > 6 files changed, 2354 insertions(+) > create mode 100644 arch/powerpc/crypto/chacha-p10-glue.c > create mode 100644 arch/powerpc/crypto/chacha-p10le-8x.S > create mode 100644 arch/powerpc/crypto/poly1305-p10-glue.c > create mode 100644 arch/powerpc/crypto/poly1305-p10le_64.S > > -- > 2.31.1 All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Re: [PATCH 0/2] eventfd: simplify signal helpers
On Fri, Jul 14, 2023 at 09:05:21AM +0200, Christian Brauner wrote: > I have no skin in the game aside from having to drop this conversion > which I'm fine to do if there are actually users for this btu really, > that looks a lot like abusing an api that really wasn't designed for > this. Yeah, I think so too. The ACPI thing should use its own FD if it wants to feed actual data.. Jason
Re: [v3,18/18] fbdev: Document that framebuffer_alloc() returns zero'ed data
On 2023/7/14 15:49, Thomas Zimmermann wrote: Most fbdev drivers depend on framebuffer_alloc() to initialize the allocated memory to 0. Document this guarantee. v3: * slightly reword the sentence (Miguel) Suggested-by: Miguel Ojeda Signed-off-by: Thomas Zimmermann Reviewed-by: Miguel Ojeda Reviewed-by: Sui Jingfeng Cc: Helge Deller --- drivers/video/fbdev/core/fb_info.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/core/fb_info.c b/drivers/video/fbdev/core/fb_info.c index 8bdbefdd4b70..4847ebe50d7d 100644 --- a/drivers/video/fbdev/core/fb_info.c +++ b/drivers/video/fbdev/core/fb_info.c @@ -13,7 +13,8 @@ * * Creates a new frame buffer info structure. Also reserves @size bytes * for driver private data (info->par). info->par (if any) will be - * aligned to sizeof(long). + * aligned to sizeof(long). The new instances of struct fb_info and + * the driver private data are both cleared to zero. * * Returns the new structure, or NULL if an error occurred. *
Re: [PATCH 0/2] eventfd: simplify signal helpers
On Thu, Jul 13, 2023 at 11:10:54AM -0600, Alex Williamson wrote: > On Thu, 13 Jul 2023 12:05:36 +0200 > Christian Brauner wrote: > > > Hey everyone, > > > > This simplifies the eventfd_signal() and eventfd_signal_mask() helpers > > by removing the count argument which is effectively unused. > > We have a patch under review which does in fact make use of the > signaling value: > > https://lore.kernel.org/all/20230630155936.3015595-1-...@semihalf.com/ Huh, thanks for the link. Quoting from https://patchwork.kernel.org/project/kvm/patch/20230307220553.631069-1-...@semihalf.com/#25266856 > Reading an eventfd returns an 8-byte value, we generally only use it > as a counter, but it's been discussed previously and IIRC, it's possible > to use that value as a notification value. So the goal is to pipe a specific value through eventfd? But it is explicitly a counter. The whole thing is written around a counter and each write and signal adds to the counter. The consequences are pretty well described in the cover letter of v6 https://lore.kernel.org/all/20230630155936.3015595-1-...@semihalf.com/ > Since the eventfd counter is used as ACPI notification value > placeholder, the eventfd signaling needs to be serialized in order to > not end up with notification values being coalesced. Therefore ACPI > notification values are buffered and signalized one by one, when the > previous notification value has been consumed. But isn't this a good indication that you really don't want an eventfd but something that's explicitly designed to associate specific data with a notification? Using eventfd in that manner requires serialization, buffering, and enforces ordering. I have no skin in the game aside from having to drop this conversion which I'm fine to do if there are actually users for this btu really, that looks a lot like abusing an api that really wasn't designed for this.
Re: [PATCH v3 3/7] mm/hotplug: Allow architecture to override memmap on memory support check
On 7/13/23 02:08, David Hildenbrand wrote: ... **WEAK_DECLARATION** Using weak declarations like __attribute__((weak)) or __weak can have unintended link defects. Avoid using them. ...which seems deeply out of touch with how arch layers work these days, doesn't it? (This is not rhetorical; I'm asking in order to get an opinion or two on the topic.) Did some digging: commit 65d9a9a60fd71be964effb2e94747a6acb6e7015 Author: Naveen N. Rao Date: Fri Jul 1 13:04:04 2022 +0530 kexec_file: drop weak attribute from functions As requested (http://lkml.kernel.org/r/87ee0q7b92@email.froward.int.ebiederm.org), this series converts weak functions in kexec to use the #ifdef approach. Quoting the 3e35142ef99fe ("kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]") changelog: : Since commit d1bcae833b32f1 ("ELF: Don't generate unused section symbols") : [1], binutils (v2.36+) started dropping section symbols that it thought : were unused. This isn't an issue in general, but with kexec_file.c, gcc : is placing kexec_arch_apply_relocations[_add] into a separate : .text.unlikely section and the section symbol ".text.unlikely" is being : dropped. Due to this, recordmcount is unable to find a non-weak symbol in : .text.unlikely to generate a relocation record against. This patch (of 2); Drop __weak attribute from functions in kexec_file.c: - arch_kexec_kernel_image_probe() - arch_kimage_file_post_load_cleanup() - arch_kexec_kernel_image_load() - arch_kexec_locate_mem_hole() - arch_kexec_kernel_verify_sig() arch_kexec_kernel_image_load() calls into kexec_image_load_default(), so drop the static attribute for the latter. arch_kexec_kernel_verify_sig() is not overridden by any architecture, so drop the __weak attribute. Link: https://lkml.kernel.org/r/cover.1656659357.git.naveen.n@linux.vnet.ibm.com Link: https://lkml.kernel.org/r/2cd7ca1fe4d6bb6ca38e3283c717878388ed6788.1656659357.git.naveen.n@linux.vnet.ibm.com Signed-off-by: Naveen N. Rao Suggested-by: Eric Biederman Signed-off-by: Andrew Morton Signed-off-by: Mimi Zohar So, in general, it's use seems to be fine (unless some tool actually bails out). https://lore.kernel.org/all/87ee0q7b92@email.froward.int.ebiederm.org/T/#u Also mentions that__weak and non __weak variants ending up in the vmlinux. Did not check if that's actually (still) the case. OK, I looked at that commit and the associated discussion, and now have a pretty clear picture of the preferred ways to do arch overrides. Thanks for taking the time to look into it, and also to explain it. Much appreciated! thanks, -- John Hubbard NVIDIA
Re: [PATCH 1/2] ASoC: dt-bindings: fsl_rpmsg: Add compatible string for i.MX93
On Fri, 14 Jul 2023 17:29:12 +0800, Chancel Liu wrote: > Add compatible string for i.MX93 platform which supports audio > function through rpmsg channel between Cortex-A and Cortex-M core. > > Signed-off-by: Chancel Liu > --- > Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml | 1 + > 1 file changed, 1 insertion(+) > Acked-by: Rob Herring
Re: linux-next: Tree for Jul 13 (drivers/video/fbdev/ps3fb.c)
Thomas, On 7/13/23 09:11, Randy Dunlap wrote: > > > On 7/12/23 19:37, Stephen Rothwell wrote: >> Hi all, >> I still see this build error on linux-next 20230714. >> Changes since 20230712: >> > > on ppc64: > > In file included from ../include/linux/device.h:15, > from ../arch/powerpc/include/asm/io.h:22, > from ../include/linux/io.h:13, > from ../include/linux/irq.h:20, > from ../arch/powerpc/include/asm/hardirq.h:6, > from ../include/linux/hardirq.h:11, > from ../include/linux/interrupt.h:11, > from ../drivers/video/fbdev/ps3fb.c:25: > ../drivers/video/fbdev/ps3fb.c: In function 'ps3fb_probe': > ../drivers/video/fbdev/ps3fb.c:1172:40: error: 'struct fb_info' has no member > named 'dev' > 1172 | dev_driver_string(info->dev), dev_name(info->dev), > |^~ > ../include/linux/dev_printk.h:110:37: note: in definition of macro > 'dev_printk_index_wrap' > 110 | _p_func(dev, fmt, ##__VA_ARGS__); > \ > | ^~~ > ../drivers/video/fbdev/ps3fb.c:1171:9: note: in expansion of macro 'dev_info' > 1171 | dev_info(info->device, "%s %s, using %u KiB of video > memory\n", > | ^~~~ > ../drivers/video/fbdev/ps3fb.c:1172:61: error: 'struct fb_info' has no member > named 'dev' > 1172 | dev_driver_string(info->dev), dev_name(info->dev), > | ^~ > ../include/linux/dev_printk.h:110:37: note: in definition of macro > 'dev_printk_index_wrap' > 110 | _p_func(dev, fmt, ##__VA_ARGS__); > \ > | ^~~ > ../drivers/video/fbdev/ps3fb.c:1171:9: note: in expansion of macro 'dev_info' > 1171 | dev_info(info->device, "%s %s, using %u KiB of video > memory\n", > | ^~~~ > > > Full randconfig file is attached. -- ~Randy
[PATCH] soc: fsl: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring --- drivers/soc/fsl/dpaa2-console.c | 3 ++- drivers/soc/fsl/qe/qe_common.c | 1 - drivers/soc/fsl/qe/qe_tdm.c | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/soc/fsl/dpaa2-console.c b/drivers/soc/fsl/dpaa2-console.c index 53917410f2bd..1dca693b6b38 100644 --- a/drivers/soc/fsl/dpaa2-console.c +++ b/drivers/soc/fsl/dpaa2-console.c @@ -9,9 +9,10 @@ #define pr_fmt(fmt) "dpaa2-console: " fmt #include -#include +#include #include #include +#include #include #include #include diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c index a0cb8e746879..9729ce86db59 100644 --- a/drivers/soc/fsl/qe/qe_common.c +++ b/drivers/soc/fsl/qe/qe_common.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/soc/fsl/qe/qe_tdm.c b/drivers/soc/fsl/qe/qe_tdm.c index 7d7d78d3ee50..a3b691875c8e 100644 --- a/drivers/soc/fsl/qe/qe_tdm.c +++ b/drivers/soc/fsl/qe/qe_tdm.c @@ -9,9 +9,7 @@ */ #include #include -#include -#include -#include +#include #include static int set_tdm_framer(const char *tdm_framer_type) -- 2.40.1
[PATCH] usb: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring --- drivers/usb/cdns3/cdns3-gadget.c| 1 + drivers/usb/cdns3/cdns3-plat.c | 1 + drivers/usb/cdns3/cdns3-ti.c| 1 + drivers/usb/cdns3/core.c| 1 + drivers/usb/chipidea/ci_hdrc_imx.c | 1 + drivers/usb/chipidea/ci_hdrc_tegra.c| 3 ++- drivers/usb/chipidea/usbmisc_imx.c | 3 ++- drivers/usb/common/common.c | 1 + drivers/usb/core/message.c | 1 + drivers/usb/core/of.c | 1 - drivers/usb/core/usb.c | 1 + drivers/usb/dwc2/gadget.c | 1 - drivers/usb/dwc2/platform.c | 2 +- drivers/usb/dwc3/dwc3-imx8mp.c | 1 + drivers/usb/dwc3/dwc3-keystone.c| 1 + drivers/usb/gadget/udc/fsl_udc_core.c | 1 - drivers/usb/gadget/udc/gr_udc.c | 5 ++--- drivers/usb/gadget/udc/max3420_udc.c| 4 +--- drivers/usb/gadget/udc/pxa27x_udc.c | 2 +- drivers/usb/gadget/udc/renesas_usb3.c | 2 +- drivers/usb/gadget/udc/renesas_usbf.c | 5 ++--- drivers/usb/gadget/udc/tegra-xudc.c | 1 - drivers/usb/gadget/udc/udc-xilinx.c | 6 ++ drivers/usb/host/ehci-fsl.c | 2 +- drivers/usb/host/ehci-orion.c | 2 -- drivers/usb/host/fhci-hcd.c | 3 ++- drivers/usb/host/fsl-mph-dr-of.c| 4 +++- drivers/usb/host/ohci-at91.c| 2 +- drivers/usb/host/ohci-da8xx.c | 1 + drivers/usb/host/ohci-ppc-of.c | 3 ++- drivers/usb/host/xhci-plat.c| 1 - drivers/usb/host/xhci-rcar.c| 1 - drivers/usb/host/xhci-tegra.c | 2 +- drivers/usb/misc/usb251xb.c | 2 +- drivers/usb/mtu3/mtu3.h | 1 + drivers/usb/mtu3/mtu3_host.c| 1 + drivers/usb/musb/jz4740.c | 2 +- drivers/usb/musb/mediatek.c | 1 + drivers/usb/musb/mpfs.c | 1 + drivers/usb/musb/musb_dsps.c| 2 -- drivers/usb/musb/sunxi.c| 1 - drivers/usb/phy/phy-mxs-usb.c | 2 +- drivers/usb/phy/phy-tegra-usb.c | 2 +- drivers/usb/renesas_usbhs/common.c | 2 +- drivers/usb/renesas_usbhs/rza.c | 2 +- drivers/usb/renesas_usbhs/rza2.c| 1 - drivers/usb/typec/tcpm/fusb302.c| 2 +- drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c | 2 +- drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c | 2 -- drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_port.c | 1 - drivers/usb/typec/ucsi/ucsi_glink.c | 1 - 51 files changed, 47 insertions(+), 48 deletions(-) diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c index ea19253fd2d0..e6f6aeb7b5bb 100644 --- a/drivers/usb/cdns3/cdns3-gadget.c +++ b/drivers/usb/cdns3/cdns3-gadget.c @@ -61,6 +61,7 @@ #include #include #include +#include #include "core.h" #include "gadget-export.h" diff --git a/drivers/usb/cdns3/cdns3-plat.c b/drivers/usb/cdns3/cdns3-plat.c index 884e2301237f..b15ff5bd91c2 100644 --- a/drivers/usb/cdns3/cdns3-plat.c +++ b/drivers/usb/cdns3/cdns3-plat.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c index 81b9132e3aaa..5945c4b1e11f 100644 --- a/drivers/usb/cdns3/cdns3-ti.c +++ b/drivers/usb/cdns3/cdns3-ti.c @@ -15,6 +15,7 @@ #include #include #include +#include /* USB Wrapper register offsets */ #define USBSS_PID 0x0 diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c index dbcdf3b24b47..baa154cee352 100644 --- a/drivers/usb/cdns3/core.c +++ b/drivers/usb/cdns3/core.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index 336ef6dd8e7d..aa2aebed8e2d 100644 ---
[PATCH] tty: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring --- drivers/tty/hvc/hvc_opal.c | 2 +- drivers/tty/serial/8250/8250_early.c | 1 - drivers/tty/serial/8250/8250_ingenic.c | 1 - drivers/tty/serial/8250/8250_omap.c| 1 - drivers/tty/serial/amba-pl011.c| 2 +- drivers/tty/serial/apbuart.c | 3 --- drivers/tty/serial/atmel_serial.c | 1 - drivers/tty/serial/fsl_linflexuart.c | 2 +- drivers/tty/serial/fsl_lpuart.c| 2 +- drivers/tty/serial/imx.c | 1 - drivers/tty/serial/lantiq.c| 3 ++- drivers/tty/serial/liteuart.c | 3 +-- drivers/tty/serial/ma35d1_serial.c | 2 +- drivers/tty/serial/mps2-uart.c | 1 - drivers/tty/serial/mxs-auart.c | 2 +- drivers/tty/serial/pic32_uart.c| 1 - drivers/tty/serial/qcom_geni_serial.c | 1 - drivers/tty/serial/serial-tegra.c | 1 - drivers/tty/serial/sh-sci.c| 1 - drivers/tty/serial/sunhv.c | 4 ++-- drivers/tty/serial/sunsab.c| 3 ++- drivers/tty/serial/sunsu.c | 4 ++-- drivers/tty/serial/sunzilog.c | 4 ++-- drivers/tty/serial/tegra-tcu.c | 1 - drivers/tty/serial/uartlite.c | 3 --- drivers/tty/serial/ucc_uart.c | 3 ++- drivers/tty/serial/vt8500_serial.c | 2 +- 27 files changed, 20 insertions(+), 35 deletions(-) diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c index 794c7b18aa06..992e199e0ea8 100644 --- a/drivers/tty/hvc/hvc_opal.c +++ b/drivers/tty/hvc/hvc_opal.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c index 4299a8bd83d9..9837a27739fd 100644 --- a/drivers/tty/serial/8250/8250_early.c +++ b/drivers/tty/serial/8250/8250_early.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/tty/serial/8250/8250_ingenic.c b/drivers/tty/serial/8250/8250_ingenic.c index 617b8ce60d6b..4c4c4da73ad0 100644 --- a/drivers/tty/serial/8250/8250_ingenic.c +++ b/drivers/tty/serial/8250/8250_ingenic.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index d48a82f1634e..26dd089d8e82 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index c5c3f4674459..a1e594b79890 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -36,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c index 915ee4b0d594..f3defc6da3df 100644 --- a/drivers/tty/serial/apbuart.c +++ b/drivers/tty/serial/apbuart.c @@ -22,9 +22,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index 3467a875641a..7ac477344aa3 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/tty/serial/fsl_linflexuart.c b/drivers/tty/serial/fsl_linflexuart.c index 6fc21b6684e6..f697751c2ad5 100644 --- a/drivers/tty/serial/fsl_linflexuart.c +++ b/drivers/tty/serial/fsl_linflexuart.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 4d80fae20177..e1a8d5415718 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -18,9 +18,9 @@ #include #include #include -#include #include #include +#include #include #include #include diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 7341d060f85c..3ed5083a7108 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include diff --git
[PATCH] misc: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring --- drivers/misc/cxl/base.c| 1 + drivers/misc/fastrpc.c | 1 + drivers/misc/lis3lv02d/lis3lv02d.c | 2 +- drivers/misc/qcom-coincell.c | 1 - drivers/misc/sram.c| 2 +- drivers/misc/vcpu_stall_detector.c | 1 - drivers/misc/xilinx_sdfec.c| 4 +++- drivers/misc/xilinx_tmr_inject.c | 3 ++- drivers/misc/xilinx_tmr_manager.c | 3 ++- 9 files changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/misc/cxl/base.c b/drivers/misc/cxl/base.c index cc0caf9192dc..b054562c046e 100644 --- a/drivers/misc/cxl/base.c +++ b/drivers/misc/cxl/base.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "cxl.h" diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 9666d28037e1..1c7c0532da6f 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c index 299d316f1bda..49868a45c0ad 100644 --- a/drivers/misc/lis3lv02d/lis3lv02d.c +++ b/drivers/misc/lis3lv02d/lis3lv02d.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include "lis3lv02d.h" #define DRIVER_NAME "lis3lv02d" diff --git a/drivers/misc/qcom-coincell.c b/drivers/misc/qcom-coincell.c index 54d4f6ee..3c57f7429147 100644 --- a/drivers/misc/qcom-coincell.c +++ b/drivers/misc/qcom-coincell.c @@ -8,7 +8,6 @@ #include #include #include -#include #include struct qcom_coincell { diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index 5757adf418b1..a88f92cf35be 100644 --- a/drivers/misc/sram.c +++ b/drivers/misc/sram.c @@ -10,8 +10,8 @@ #include #include #include +#include #include -#include #include #include #include diff --git a/drivers/misc/vcpu_stall_detector.c b/drivers/misc/vcpu_stall_detector.c index 53b5506080e1..6479c962da1a 100644 --- a/drivers/misc/vcpu_stall_detector.c +++ b/drivers/misc/vcpu_stall_detector.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c index 270ff4c5971a..35941c006552 100644 --- a/drivers/misc/xilinx_sdfec.c +++ b/drivers/misc/xilinx_sdfec.c @@ -15,12 +15,14 @@ #include #include #include -#include +#include +#include #include #include #include #include #include +#include #include diff --git a/drivers/misc/xilinx_tmr_inject.c b/drivers/misc/xilinx_tmr_inject.c index d96f6d7cd109..9fc5835bfebc 100644 --- a/drivers/misc/xilinx_tmr_inject.c +++ b/drivers/misc/xilinx_tmr_inject.c @@ -11,7 +11,8 @@ #include #include -#include +#include +#include #include /* TMR Inject Register offsets */ diff --git a/drivers/misc/xilinx_tmr_manager.c b/drivers/misc/xilinx_tmr_manager.c index 0ef55e06d3a0..3e4e40c3766f 100644 --- a/drivers/misc/xilinx_tmr_manager.c +++ b/drivers/misc/xilinx_tmr_manager.c @@ -15,7 +15,8 @@ #include #include -#include +#include +#include /* TMR Manager Register offsets */ #define XTMR_MANAGER_CR_OFFSET 0x0 -- 2.40.1
[PATCH] macintosh: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring --- drivers/macintosh/ams/ams.h | 1 - drivers/macintosh/smu.c | 1 + drivers/macintosh/therm_adt746x.c| 2 ++ drivers/macintosh/therm_windtunnel.c | 22 -- drivers/macintosh/windfarm_lm75_sensor.c | 4 ++-- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/drivers/macintosh/ams/ams.h b/drivers/macintosh/ams/ams.h index 2c159c8844c1..e053c1515460 100644 --- a/drivers/macintosh/ams/ams.h +++ b/drivers/macintosh/ams/ams.h @@ -8,7 +8,6 @@ #include #include #include -#include enum ams_irq { AMS_IRQ_FREEFALL = 0x01, diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 5183a00529f5..b2b78a53e532 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index 53ea56b286f9..00693741f744 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c @@ -25,7 +25,9 @@ #include #include #include +#include #include +#include #include #include diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index 18a982454321..52289de15058 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c @@ -1,9 +1,9 @@ -/* +/* * Creation Date: <2003/03/14 20:54:13 samuel> * Time-stamp: <2004/03/20 14:20:59 samuel> - * + * * - * + * * The G4 "windtunnel" has a single fan controlled by an * ADM1030 fan controller and a DS1775 thermostat. * @@ -20,11 +20,11 @@ * Copyright (C) 2003, 2004 Samuel Rydh (sam...@ibrium.se) * * Loosely based upon 'thermostat.c' written by Benjamin Herrenschmidt - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation - * + * */ #include @@ -36,7 +36,9 @@ #include #include #include +#include #include +#include #include #include @@ -48,10 +50,10 @@ static struct { volatile intrunning; struct task_struct *poll_task; - + struct mutexlock; struct platform_device *of_dev; - + struct i2c_client *thermostat; struct i2c_client *fan; @@ -127,7 +129,7 @@ write_reg( struct i2c_client *cl, int reg, int data, int len ) tmp[1] = (len == 1) ? data : (data >> 8); tmp[2] = data; len++; - + if( i2c_master_send(cl, tmp, len) != len ) return -ENODEV; return 0; @@ -369,7 +371,7 @@ attach_fan( struct i2c_client *cl ) } static int -attach_thermostat( struct i2c_client *cl ) +attach_thermostat( struct i2c_client *cl ) { int hyst_temp, os_temp, temp; @@ -378,7 +380,7 @@ attach_thermostat( struct i2c_client *cl ) if( (temp=read_reg(cl, 0, 2)) < 0 ) goto out; - + /* temperature sanity check */ if( temp < 0x1600 || temp > 0x3c00 ) goto out; diff --git a/drivers/macintosh/windfarm_lm75_sensor.c b/drivers/macintosh/windfarm_lm75_sensor.c index 48dbdb2bda15..6b26e0f92105 100644 --- a/drivers/macintosh/windfarm_lm75_sensor.c +++ b/drivers/macintosh/windfarm_lm75_sensor.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -128,7 +128,7 @@ static int wf_lm75_probe(struct i2c_client *client) name = "cpu-inlet-temp-1"; else return -ENXIO; - + lm = kzalloc(sizeof(struct wf_lm75_sensor), GFP_KERNEL); if (lm == NULL) -- 2.40.1
[PATCH] dmaengine: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring --- drivers/dma/apple-admac.c | 3 ++- drivers/dma/at_hdmac.c | 2 +- drivers/dma/bcm-sba-raid.c | 4 +++- drivers/dma/bestcomm/bestcomm.c| 4 +--- drivers/dma/dma-jz4780.c | 1 - drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 1 - drivers/dma/dw/rzn1-dmamux.c | 4 +++- drivers/dma/fsl-qdma.c | 4 ++-- drivers/dma/fsl_raid.c | 3 ++- drivers/dma/fsldma.c | 3 ++- drivers/dma/img-mdc-dma.c | 1 - drivers/dma/imx-dma.c | 2 +- drivers/dma/imx-sdma.c | 1 - drivers/dma/lpc18xx-dmamux.c | 4 +++- drivers/dma/mediatek/mtk-cqdma.c | 1 - drivers/dma/mediatek/mtk-hsdma.c | 1 - drivers/dma/mediatek/mtk-uart-apdma.c | 1 - drivers/dma/mpc512x_dma.c | 4 ++-- drivers/dma/mxs-dma.c | 1 - drivers/dma/nbpfaxi.c | 1 - drivers/dma/owl-dma.c | 3 ++- drivers/dma/ppc4xx/adma.c | 2 +- drivers/dma/qcom/hidma.c | 2 +- drivers/dma/sh/shdmac.c| 1 - drivers/dma/sprd-dma.c | 2 +- drivers/dma/stm32-dmamux.c | 4 +++- drivers/dma/stm32-mdma.c | 1 - drivers/dma/sun6i-dma.c| 2 +- drivers/dma/tegra186-gpc-dma.c | 2 +- drivers/dma/tegra20-apb-dma.c | 1 - drivers/dma/tegra210-adma.c| 3 ++- drivers/dma/ti/dma-crossbar.c | 5 +++-- drivers/dma/ti/edma.c | 1 - drivers/dma/ti/k3-udma-private.c | 2 ++ drivers/dma/ti/k3-udma.c | 1 - drivers/dma/ti/omap-dma.c | 2 +- drivers/dma/xgene-dma.c| 3 ++- drivers/dma/xilinx/xilinx_dma.c| 4 ++-- drivers/dma/xilinx/zynqmp_dma.c| 3 ++- 39 files changed, 46 insertions(+), 44 deletions(-) diff --git a/drivers/dma/apple-admac.c b/drivers/dma/apple-admac.c index 4cf8da77bdd9..3af795635c5c 100644 --- a/drivers/dma/apple-admac.c +++ b/drivers/dma/apple-admac.c @@ -10,8 +10,9 @@ #include #include #include -#include +#include #include +#include #include #include #include diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index ee3a219e3a89..b2876f67471f 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/dma/bcm-sba-raid.c b/drivers/dma/bcm-sba-raid.c index 064761289a73..94ea35330eb5 100644 --- a/drivers/dma/bcm-sba-raid.c +++ b/drivers/dma/bcm-sba-raid.c @@ -35,7 +35,9 @@ #include #include #include -#include +#include +#include +#include #include #include diff --git a/drivers/dma/bestcomm/bestcomm.c b/drivers/dma/bestcomm/bestcomm.c index eabbcfcaa7cb..466dd9919c4a 100644 --- a/drivers/dma/bestcomm/bestcomm.c +++ b/drivers/dma/bestcomm/bestcomm.c @@ -14,9 +14,7 @@ #include #include #include -#include -#include -#include +#include #include #include #include diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c index 9c1a6e9a9c03..adbd47bd6adf 100644 --- a/drivers/dma/dma-jz4780.c +++ b/drivers/dma/dma-jz4780.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c index 796b6caf0bab..dd02f84e404d 100644 --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/dma/dw/rzn1-dmamux.c b/drivers/dma/dw/rzn1-dmamux.c index f9912c3dd4d7..4fb8508419db 100644 --- a/drivers/dma/dw/rzn1-dmamux.c +++ b/drivers/dma/dw/rzn1-dmamux.c @@ -5,8 +5,10 @@ * Based on TI crossbar driver written by Peter Ujfalusi */ #include -#include +#include #include +#include +#include #include #include #include diff --git a/drivers/dma/fsl-qdma.c b/drivers/dma/fsl-qdma.c index
[PATCH] char: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring --- drivers/char/agp/uninorth-agp.c| 1 + drivers/char/bsr.c | 3 +-- drivers/char/hw_random/atmel-rng.c | 2 +- drivers/char/hw_random/bcm2835-rng.c | 3 +-- drivers/char/hw_random/ingenic-trng.c | 2 +- drivers/char/hw_random/iproc-rng200.c | 3 +-- drivers/char/hw_random/npcm-rng.c | 3 +-- drivers/char/hw_random/omap-rng.c | 2 -- drivers/char/hw_random/omap3-rom-rng.c | 1 - drivers/char/hw_random/pasemi-rng.c| 3 +-- drivers/char/hw_random/pic32-rng.c | 3 +-- drivers/char/hw_random/stm32-rng.c | 3 ++- drivers/char/hw_random/xgene-rng.c | 5 ++--- drivers/char/hw_random/xiphera-trng.c | 1 - drivers/char/ipmi/kcs_bmc_aspeed.c | 1 - drivers/char/tpm/tpm_ftpm_tee.c| 1 - drivers/char/tpm/tpm_tis.c | 1 - drivers/char/tpm/tpm_tis_spi_main.c| 2 +- drivers/char/tpm/tpm_tis_synquacer.c | 1 - 19 files changed, 14 insertions(+), 27 deletions(-) diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c index 62de7f4ba864..84411b13c49f 100644 --- a/drivers/char/agp/uninorth-agp.c +++ b/drivers/char/agp/uninorth-agp.c @@ -3,6 +3,7 @@ * UniNorth AGPGART routines. */ #include +#include #include #include #include diff --git a/drivers/char/bsr.c b/drivers/char/bsr.c index 12143854aeac..70d31aed9011 100644 --- a/drivers/char/bsr.c +++ b/drivers/char/bsr.c @@ -6,11 +6,10 @@ * Author: Sonny Rao */ +#include #include #include #include -#include -#include #include #include #include diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c index b8effe77d80f..a37367ebcbac 100644 --- a/drivers/char/hw_random/atmel-rng.c +++ b/drivers/char/hw_random/atmel-rng.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c index e98fcac578d6..e19b0f9f48b9 100644 --- a/drivers/char/hw_random/bcm2835-rng.c +++ b/drivers/char/hw_random/bcm2835-rng.c @@ -8,8 +8,7 @@ #include #include #include -#include -#include +#include #include #include #include diff --git a/drivers/char/hw_random/ingenic-trng.c b/drivers/char/hw_random/ingenic-trng.c index 0eb80f786f4d..759445d4f65a 100644 --- a/drivers/char/hw_random/ingenic-trng.c +++ b/drivers/char/hw_random/ingenic-trng.c @@ -11,8 +11,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/drivers/char/hw_random/iproc-rng200.c b/drivers/char/hw_random/iproc-rng200.c index 06bc060534d8..34df3f0d3e45 100644 --- a/drivers/char/hw_random/iproc-rng200.c +++ b/drivers/char/hw_random/iproc-rng200.c @@ -12,8 +12,7 @@ #include #include #include -#include -#include +#include #include #include diff --git a/drivers/char/hw_random/npcm-rng.c b/drivers/char/hw_random/npcm-rng.c index 9903d0357e06..8a304b754217 100644 --- a/drivers/char/hw_random/npcm-rng.c +++ b/drivers/char/hw_random/npcm-rng.c @@ -8,12 +8,11 @@ #include #include #include +#include #include #include #include -#include #include -#include #define NPCM_RNGCS_REG 0x00/* Control and status register */ #define NPCM_RNGD_REG 0x04/* Data register */ diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c index 00ff96703dd2..be03f76a2a80 100644 --- a/drivers/char/hw_random/omap-rng.c +++ b/drivers/char/hw_random/omap-rng.c @@ -26,8 +26,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/drivers/char/hw_random/omap3-rom-rng.c b/drivers/char/hw_random/omap3-rom-rng.c index f06e4f95114f..18dc46b1b58e 100644 --- a/drivers/char/hw_random/omap3-rom-rng.c +++ b/drivers/char/hw_random/omap3-rom-rng.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include diff --git a/drivers/char/hw_random/pasemi-rng.c b/drivers/char/hw_random/pasemi-rng.c index 2498d4ef9fe2..6959d6edd44c 100644 --- a/drivers/char/hw_random/pasemi-rng.c +++ b/drivers/char/hw_random/pasemi-rng.c @@ -9,11 +9,10 @@ #include #include +#include #include #include #include -#include -#include #include #define SDCRNG_CTL_REG 0x00 diff --git a/drivers/char/hw_random/pic32-rng.c b/drivers/char/hw_random/pic32-rng.c index 99c8bd0859a1..728b68b1a496 100644 ---
[PATCH] powerpc: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring --- arch/powerpc/include/asm/ibmebus.h | 2 ++ arch/powerpc/include/asm/macio.h| 3 ++- arch/powerpc/kernel/legacy_serial.c | 2 +- arch/powerpc/kernel/of_platform.c | 4 +--- arch/powerpc/kernel/setup-common.c | 4 ++-- arch/powerpc/kexec/file_load_64.c | 2 +- arch/powerpc/kexec/ranges.c | 2 +- arch/powerpc/platforms/4xx/cpm.c| 2 +- arch/powerpc/platforms/4xx/hsta_msi.c | 2 +- arch/powerpc/platforms/4xx/soc.c| 2 +- arch/powerpc/platforms/512x/mpc5121_ads.c | 2 +- arch/powerpc/platforms/512x/mpc512x_generic.c | 2 +- arch/powerpc/platforms/512x/mpc512x_lpbfifo.c | 2 +- arch/powerpc/platforms/512x/pdm360ng.c | 3 ++- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 3 +-- arch/powerpc/platforms/82xx/ep8248e.c | 1 + arch/powerpc/platforms/83xx/km83xx.c| 4 ++-- arch/powerpc/platforms/83xx/suspend.c | 2 +- arch/powerpc/platforms/85xx/bsc913x_qds.c | 2 +- arch/powerpc/platforms/85xx/bsc913x_rdb.c | 2 +- arch/powerpc/platforms/85xx/c293pcie.c | 3 +-- arch/powerpc/platforms/85xx/ge_imp3a.c | 2 +- arch/powerpc/platforms/85xx/ksi8560.c | 3 ++- arch/powerpc/platforms/85xx/mpc8536_ds.c| 2 +- arch/powerpc/platforms/85xx/mpc85xx_ds.c| 2 +- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 4 ++-- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 3 ++- arch/powerpc/platforms/85xx/p1010rdb.c | 2 +- arch/powerpc/platforms/85xx/p1022_ds.c | 2 +- arch/powerpc/platforms/85xx/p1022_rdk.c | 2 +- arch/powerpc/platforms/85xx/p1023_rdb.c | 3 +-- arch/powerpc/platforms/85xx/socrates.c | 2 +- arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 1 - arch/powerpc/platforms/85xx/stx_gp3.c | 2 +- arch/powerpc/platforms/85xx/tqm85xx.c | 2 +- arch/powerpc/platforms/85xx/twr_p102x.c | 3 ++- arch/powerpc/platforms/85xx/xes_mpc85xx.c | 2 +- arch/powerpc/platforms/86xx/gef_ppc9a.c | 2 +- arch/powerpc/platforms/86xx/gef_sbc310.c| 2 +- arch/powerpc/platforms/86xx/gef_sbc610.c| 2 +- arch/powerpc/platforms/86xx/mvme7100.c | 1 - arch/powerpc/platforms/86xx/pic.c | 2 +- arch/powerpc/platforms/cell/axon_msi.c | 3 ++- arch/powerpc/platforms/cell/cbe_regs.c | 3 +-- arch/powerpc/platforms/cell/iommu.c | 2 +- arch/powerpc/platforms/cell/setup.c | 1 + arch/powerpc/platforms/cell/spider-pci.c| 1 - arch/powerpc/platforms/embedded6xx/holly.c | 2 +- arch/powerpc/platforms/maple/setup.c| 4 ++-- arch/powerpc/platforms/pasemi/gpio_mdio.c | 2 +- arch/powerpc/platforms/pasemi/setup.c | 2 ++ arch/powerpc/platforms/powermac/setup.c | 2 +- arch/powerpc/platforms/powernv/opal-imc.c | 1 - arch/powerpc/platforms/powernv/opal-rtc.c | 3 ++- arch/powerpc/platforms/powernv/opal-secvar.c| 2 +- arch/powerpc/platforms/powernv/opal-sensor.c| 2 ++ arch/powerpc/platforms/pseries/ibmebus.c| 1 + arch/powerpc/sysdev/cpm_common.c| 2 -- arch/powerpc/sysdev/cpm_gpio.c | 3 ++- arch/powerpc/sysdev/fsl_pmc.c | 4 ++-- arch/powerpc/sysdev/fsl_rio.c | 4 ++-- arch/powerpc/sysdev/fsl_rmu.c | 1 - arch/powerpc/sysdev/fsl_soc.c | 1 - arch/powerpc/sysdev/mpic_msgr.c | 3 ++- arch/powerpc/sysdev/mpic_timer.c| 1 - arch/powerpc/sysdev/of_rtc.c| 3 ++- arch/powerpc/sysdev/pmi.c | 4 ++-- 67 files changed, 79 insertions(+), 75 deletions(-) diff --git a/arch/powerpc/include/asm/ibmebus.h b/arch/powerpc/include/asm/ibmebus.h index 088f95b2e14f..6f33253a364a 100644 --- a/arch/powerpc/include/asm/ibmebus.h +++ b/arch/powerpc/include/asm/ibmebus.h @@ -46,6 +46,8 @@ #include #include +struct platform_driver; + extern struct bus_type ibmebus_bus_type; int ibmebus_register_driver(struct platform_driver *drv); diff --git a/arch/powerpc/include/asm/macio.h b/arch/powerpc/include/asm/macio.h index ff5fd82d9ff0..3a07c62973aa 100644 --- a/arch/powerpc/include/asm/macio.h +++ b/arch/powerpc/include/asm/macio.h @@ -3,7 +3,8 @@ #define
[PATCH 6/6] integrity: PowerVM support for loading third party code signing keys
On secure boot enabled PowerVM LPAR, third party code signing keys are needed during early boot to verify signed third party modules. These third party keys are stored in moduledb object in the Platform KeyStore(PKS). Load third party code signing keys onto .secondary_trusted_keys keyring. Signed-off-by: Nayna Jain --- Jarkko, this patch is based on Linus master tree branch, which does not contain the following commits yet: c9d004712300 integrity: Enforce digitalSignature usage in the ima and evm keyrings 59b656eb58fe KEYS: DigitalSignature link restriction certs/system_keyring.c| 22 +++ include/keys/system_keyring.h | 8 +++ security/integrity/integrity.h| 1 + .../platform_certs/keyring_handler.c | 8 +++ .../platform_certs/keyring_handler.h | 5 + .../integrity/platform_certs/load_powerpc.c | 18 ++- 6 files changed, 61 insertions(+), 1 deletion(-) diff --git a/certs/system_keyring.c b/certs/system_keyring.c index a7a49b17ceb1..b0235732c1d4 100644 --- a/certs/system_keyring.c +++ b/certs/system_keyring.c @@ -347,3 +347,25 @@ void __init set_platform_trusted_keys(struct key *keyring) platform_trusted_keys = keyring; } #endif + +void __init add_to_secondary_keyring(const char *source, const void *data, +size_t len) +{ + key_ref_t key; + key_perm_t perm; + int rc = 0; + + perm = (KEY_POS_ALL & ~KEY_POS_SETATTR) | KEY_USR_VIEW; + + key = key_create_or_update(make_key_ref(secondary_trusted_keys, 1), "asymmetric", + NULL, data, len, perm, + KEY_ALLOC_NOT_IN_QUOTA); + if (IS_ERR(key)) { + rc = PTR_ERR(key); + pr_err("Problem loading X.509 certificate %d\n", rc); + } else { + pr_notice("Loaded X.509 cert '%s'\n", + key_ref_to_ptr(key)->description); + key_ref_put(key); + } +} diff --git a/include/keys/system_keyring.h b/include/keys/system_keyring.h index 91e080efb918..a57a77ccf003 100644 --- a/include/keys/system_keyring.h +++ b/include/keys/system_keyring.h @@ -41,8 +41,16 @@ extern int restrict_link_by_builtin_and_secondary_trusted( const struct key_type *type, const union key_payload *payload, struct key *restriction_key); + +void __init add_to_secondary_keyring(const char *source, const void *data, +size_t len); + #else #define restrict_link_by_builtin_and_secondary_trusted restrict_link_by_builtin_trusted +void __init add_to_secondary_keyring(const char *source, const void *data, +size_t len) +{ +} #endif #ifdef CONFIG_INTEGRITY_MACHINE_KEYRING diff --git a/security/integrity/integrity.h b/security/integrity/integrity.h index d7553c93f5c0..efaa2eb789ad 100644 --- a/security/integrity/integrity.h +++ b/security/integrity/integrity.h @@ -228,6 +228,7 @@ static inline int __init integrity_load_cert(const unsigned int id, { return 0; } + #endif /* CONFIG_INTEGRITY_SIGNATURE */ #ifdef CONFIG_INTEGRITY_ASYMMETRIC_KEYS diff --git a/security/integrity/platform_certs/keyring_handler.c b/security/integrity/platform_certs/keyring_handler.c index b3e5df136e50..6095df043498 100644 --- a/security/integrity/platform_certs/keyring_handler.c +++ b/security/integrity/platform_certs/keyring_handler.c @@ -77,6 +77,14 @@ __init efi_element_handler_t get_handler_for_ca_keys(const efi_guid_t *sig_type) return NULL; } +__init efi_element_handler_t get_handler_for_code_signing_keys(const efi_guid_t *sig_type) +{ + if (efi_guidcmp(*sig_type, efi_cert_x509_guid) == 0) + return add_to_secondary_keyring; + + return NULL; +} + /* * Return the appropriate handler for particular signature list types found in * the UEFI dbx and MokListXRT tables. diff --git a/security/integrity/platform_certs/keyring_handler.h b/security/integrity/platform_certs/keyring_handler.h index 6f15bb4cc8dc..f92895cc50f6 100644 --- a/security/integrity/platform_certs/keyring_handler.h +++ b/security/integrity/platform_certs/keyring_handler.h @@ -34,6 +34,11 @@ efi_element_handler_t get_handler_for_mok(const efi_guid_t *sig_type); */ efi_element_handler_t get_handler_for_ca_keys(const efi_guid_t *sig_type); +/* + * Return the handler for particular signature list types for code signing keys. + */ +efi_element_handler_t get_handler_for_code_signing_keys(const efi_guid_t *sig_type); + /* * Return the handler for particular signature list types found in the dbx. */ diff --git a/security/integrity/platform_certs/load_powerpc.c b/security/integrity/platform_certs/load_powerpc.c index 6263ce3b3f1e..32c4e5fbf0fb 100644 --- a/security/integrity/platform_certs/load_powerpc.c +++ b/security/integrity/platform_certs/load_powerpc.c @@
[PATCH 5/6] integrity: PowerVM machine keyring enablement.
Update Kconfig to enable machine keyring and limit to CA certificates on PowerVM. Signed-off-by: Nayna Jain --- security/integrity/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/security/integrity/Kconfig b/security/integrity/Kconfig index ec6e0d789da1..03c40ade0214 100644 --- a/security/integrity/Kconfig +++ b/security/integrity/Kconfig @@ -67,7 +67,8 @@ config INTEGRITY_MACHINE_KEYRING depends on SECONDARY_TRUSTED_KEYRING depends on INTEGRITY_ASYMMETRIC_KEYS depends on SYSTEM_BLACKLIST_KEYRING - depends on LOAD_UEFI_KEYS + depends on LOAD_UEFI_KEYS || LOAD_PPC_KEYS + select INTEGRITY_CA_MACHINE_KEYRING if LOAD_PPC_KEYS help If set, provide a keyring to which Machine Owner Keys (MOK) may be added. This keyring shall contain just MOK keys. Unlike keys -- 2.31.1
[PATCH 4/6] integrity: check whether imputed trust is enabled
trust_moklist() is specific to UEFI enabled systems. Other platforms rely only on the Kconfig. Define a generic wrapper named imputed_trust_enabled(). Signed-off-by: Nayna Jain --- security/integrity/digsig.c | 2 +- security/integrity/integrity.h| 5 +++-- .../integrity/platform_certs/keyring_handler.c| 2 +- .../integrity/platform_certs/machine_keyring.c| 15 ++- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c index 6f31ffe23c48..48d505cacd81 100644 --- a/security/integrity/digsig.c +++ b/security/integrity/digsig.c @@ -113,7 +113,7 @@ static int __init __integrity_init_keyring(const unsigned int id, } else { if (id == INTEGRITY_KEYRING_PLATFORM) set_platform_trusted_keys(keyring[id]); - if (id == INTEGRITY_KEYRING_MACHINE && trust_moklist()) + if (id == INTEGRITY_KEYRING_MACHINE && imputed_trust_enabled()) set_machine_trusted_keys(keyring[id]); if (id == INTEGRITY_KEYRING_IMA) load_module_cert(keyring[id]); diff --git a/security/integrity/integrity.h b/security/integrity/integrity.h index 7167a6e99bdc..d7553c93f5c0 100644 --- a/security/integrity/integrity.h +++ b/security/integrity/integrity.h @@ -320,13 +320,14 @@ static inline void __init add_to_platform_keyring(const char *source, #ifdef CONFIG_INTEGRITY_MACHINE_KEYRING void __init add_to_machine_keyring(const char *source, const void *data, size_t len); -bool __init trust_moklist(void); +bool __init imputed_trust_enabled(void); #else static inline void __init add_to_machine_keyring(const char *source, const void *data, size_t len) { } -static inline bool __init trust_moklist(void) + +static inline bool __init imputed_trust_enabled(void) { return false; } diff --git a/security/integrity/platform_certs/keyring_handler.c b/security/integrity/platform_certs/keyring_handler.c index 1649d047e3b8..b3e5df136e50 100644 --- a/security/integrity/platform_certs/keyring_handler.c +++ b/security/integrity/platform_certs/keyring_handler.c @@ -61,7 +61,7 @@ __init efi_element_handler_t get_handler_for_db(const efi_guid_t *sig_type) __init efi_element_handler_t get_handler_for_mok(const efi_guid_t *sig_type) { if (efi_guidcmp(*sig_type, efi_cert_x509_guid) == 0) { - if (IS_ENABLED(CONFIG_INTEGRITY_MACHINE_KEYRING) && trust_moklist()) + if (IS_ENABLED(CONFIG_INTEGRITY_MACHINE_KEYRING) && imputed_trust_enabled()) return add_to_machine_keyring; else return add_to_platform_keyring; diff --git a/security/integrity/platform_certs/machine_keyring.c b/security/integrity/platform_certs/machine_keyring.c index 9482e16cb2ca..58cd72b193e6 100644 --- a/security/integrity/platform_certs/machine_keyring.c +++ b/security/integrity/platform_certs/machine_keyring.c @@ -60,7 +60,7 @@ static __init bool uefi_check_trust_mok_keys(void) return false; } -bool __init trust_moklist(void) +static bool __init trust_moklist(void) { static bool initialized; static bool trust_mok; @@ -75,3 +75,16 @@ bool __init trust_moklist(void) return trust_mok; } + +/* + * Provides platform specific check for trusting imputed keys before loading + * on .machine keyring. UEFI systems enable this trust based on a variable, + * and for other platforms, it is always enabled. + */ +bool __init imputed_trust_enabled(void) +{ + if (efi_enabled(EFI_BOOT)) + return trust_moklist(); + + return true; +} -- 2.31.1
[PATCH 3/6] integrity: remove global variable from machine_keyring.c
trust_mok variable is accessed within a single function locally. Change trust_mok from global to local static variable. Signed-off-by: Nayna Jain --- security/integrity/platform_certs/machine_keyring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/integrity/platform_certs/machine_keyring.c b/security/integrity/platform_certs/machine_keyring.c index 389a6e7c9245..9482e16cb2ca 100644 --- a/security/integrity/platform_certs/machine_keyring.c +++ b/security/integrity/platform_certs/machine_keyring.c @@ -8,8 +8,6 @@ #include #include "../integrity.h" -static bool trust_mok; - static __init int machine_keyring_init(void) { int rc; @@ -65,9 +63,11 @@ static __init bool uefi_check_trust_mok_keys(void) bool __init trust_moklist(void) { static bool initialized; + static bool trust_mok; if (!initialized) { initialized = true; + trust_mok = false; if (uefi_check_trust_mok_keys()) trust_mok = true; -- 2.31.1
[PATCH 1/6] integrity: PowerVM support for loading CA keys on machine keyring
Keys that derive their trust from an entity such as a security officer, administrator, system owner, or machine owner are said to have "imputed trust". CA keys with imputed trust can be loaded onto the machine keyring. The mechanism for loading these keys onto the machine keyring is platform dependent. Load keys stored in the variable trustedcadb onto the .machine keyring on PowerVM platform. Signed-off-by: Nayna Jain --- .../integrity/platform_certs/keyring_handler.c | 8 .../integrity/platform_certs/keyring_handler.h | 5 + .../integrity/platform_certs/load_powerpc.c | 17 + 3 files changed, 30 insertions(+) diff --git a/security/integrity/platform_certs/keyring_handler.c b/security/integrity/platform_certs/keyring_handler.c index 8a1124e4d769..1649d047e3b8 100644 --- a/security/integrity/platform_certs/keyring_handler.c +++ b/security/integrity/platform_certs/keyring_handler.c @@ -69,6 +69,14 @@ __init efi_element_handler_t get_handler_for_mok(const efi_guid_t *sig_type) return NULL; } +__init efi_element_handler_t get_handler_for_ca_keys(const efi_guid_t *sig_type) +{ + if (efi_guidcmp(*sig_type, efi_cert_x509_guid) == 0) + return add_to_machine_keyring; + + return NULL; +} + /* * Return the appropriate handler for particular signature list types found in * the UEFI dbx and MokListXRT tables. diff --git a/security/integrity/platform_certs/keyring_handler.h b/security/integrity/platform_certs/keyring_handler.h index 212d894a8c0c..6f15bb4cc8dc 100644 --- a/security/integrity/platform_certs/keyring_handler.h +++ b/security/integrity/platform_certs/keyring_handler.h @@ -29,6 +29,11 @@ efi_element_handler_t get_handler_for_db(const efi_guid_t *sig_type); */ efi_element_handler_t get_handler_for_mok(const efi_guid_t *sig_type); +/* + * Return the handler for particular signature list types for CA keys. + */ +efi_element_handler_t get_handler_for_ca_keys(const efi_guid_t *sig_type); + /* * Return the handler for particular signature list types found in the dbx. */ diff --git a/security/integrity/platform_certs/load_powerpc.c b/security/integrity/platform_certs/load_powerpc.c index 170789dc63d2..6263ce3b3f1e 100644 --- a/security/integrity/platform_certs/load_powerpc.c +++ b/security/integrity/platform_certs/load_powerpc.c @@ -59,6 +59,7 @@ static __init void *get_cert_list(u8 *key, unsigned long keylen, u64 *size) static int __init load_powerpc_certs(void) { void *db = NULL, *dbx = NULL, *data = NULL; + void *trustedca = NULL; u64 dsize = 0; u64 offset = 0; int rc = 0; @@ -120,6 +121,22 @@ static int __init load_powerpc_certs(void) kfree(data); } + data = get_cert_list("trustedcadb", 12, ); + if (!data) { + pr_info("Couldn't get trustedcadb list from firmware\n"); + } else if (IS_ERR(data)) { + rc = PTR_ERR(data); + pr_err("Error reading trustedcadb from firmware: %d\n", rc); + } else { + extract_esl(trustedca, data, dsize, offset); + + rc = parse_efi_signature_list("powerpc:trustedca", trustedca, dsize, + get_handler_for_ca_keys); + if (rc) + pr_err("Couldn't parse trustedcadb signatures: %d\n", rc); + kfree(data); + } + return rc; } late_initcall(load_powerpc_certs); -- 2.31.1
[PATCH 2/6] integrity: ignore keys failing CA restrictions on non-UEFI platform
On non-UEFI platforms, handle restrict_link_by_ca failures differently. Certificates which do not satisfy CA restrictions on non-UEFI platforms are ignored. Signed-off-by: Nayna Jain --- security/integrity/platform_certs/machine_keyring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/integrity/platform_certs/machine_keyring.c b/security/integrity/platform_certs/machine_keyring.c index 7aaed7950b6e..389a6e7c9245 100644 --- a/security/integrity/platform_certs/machine_keyring.c +++ b/security/integrity/platform_certs/machine_keyring.c @@ -36,7 +36,7 @@ void __init add_to_machine_keyring(const char *source, const void *data, size_t * If the restriction check does not pass and the platform keyring * is configured, try to add it into that keyring instead. */ - if (rc && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) + if (rc && efi_enabled(EFI_BOOT) && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) rc = integrity_load_cert(INTEGRITY_KEYRING_PLATFORM, source, data, len, perm); -- 2.31.1
[PATCH 0/6] Enable loading local and third party keys on PowerVM guest
On a secure boot enabled PowerVM guest, local and third party code signing keys are needed to verify signed applications, configuration files, and kernel modules. Loading these keys onto either the .secondary_trusted_keys or .ima keyrings requires the certificates be signed by keys on the .builtin_trusted_keys, .machine or .secondary_trusted_keys keyrings. Keys on the .builtin_trusted_keys keyring are trusted because of the chain of trust from secure boot up to and including the linux kernel. Keys on the .machine keyring that derive their trust from an entity such as a security officer, administrator, system owner, or machine owner are said to have "imputed trust." The type of certificates and the mechanism for loading them onto the .machine keyring is platform dependent. Userspace may load certificates onto the .secondary_trusted_keys or .ima keyrings. However, keys may also need to be loaded by the kernel if they are needed for verification in early boot time. On PowerVM guest, third party code signing keys are loaded from the moduledb variable in the Platform KeyStore(PKS) onto the .secondary_trusted_keys. The purpose of this patch set is to allow loading of local and third party code signing keys on PowerVM. Nayna Jain (6): integrity: PowerVM support for loading CA keys on machine keyring integrity: ignore keys failing CA restrictions on non-UEFI platform integrity: remove global variable from machine_keyring.c integrity: check whether imputed trust is enabled integrity: PowerVM machine keyring enablement. integrity: PowerVM support for loading third party code signing keys certs/system_keyring.c| 22 + include/keys/system_keyring.h | 8 + security/integrity/Kconfig| 3 +- security/integrity/digsig.c | 2 +- security/integrity/integrity.h| 6 ++-- .../platform_certs/keyring_handler.c | 18 +- .../platform_certs/keyring_handler.h | 10 ++ .../integrity/platform_certs/load_powerpc.c | 33 +++ .../platform_certs/machine_keyring.c | 21 +--- 9 files changed, 114 insertions(+), 9 deletions(-) base-commit: 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 -- 2.31.1
Re: [RFC][PATCH] sched: Rename DIE domain
On 7/12/23 8:32 PM, Valentin Schneider wrote: > On 12/07/23 16:10, Peter Zijlstra wrote: >> Hi >> >> Thomas just tripped over the x86 topology setup creating a 'DIE' domain >> for the package mask :-) >> >> Since these names are SCHED_DEBUG only, rename them. >> I don't think anybody *should* be relying on this, but who knows. >> > > FWIW I don't care much about the actual name. > > There are some stray references to DIE in comments - see below. Bit funny > to see: > - * - Package (DIE) > + * - Package (PKG) > > With that: > Acked-by: Valentin Schneider > > --- > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index a80a73909dc2a..190a647534984 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -9439,7 +9439,7 @@ static bool sched_use_asym_prio(struct sched_domain > *sd, int cpu) > * can only do it if @group is an SMT group and has exactly on busy CPU. > Larger > * imbalances in the number of CPUS are dealt with in find_busiest_group(). > * > - * If we are balancing load within an SMT core, or at DIE domain level, > always > + * If we are balancing load within an SMT core, or at PKG domain level, > always > * proceed. > * > * Return: true if @env::dst_cpu can do with asym_packing load balance. False > diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c > index e9d9cf776b7ab..2cdcfec1d1c89 100644 > --- a/kernel/sched/topology.c > +++ b/kernel/sched/topology.c > @@ -1118,7 +1118,7 @@ build_overlap_sched_groups(struct sched_domain *sd, int > cpu) > * > * - Simultaneous multithreading (SMT) > * - Multi-Core Cache (MC) > - * - Package (DIE) > + * - Package (PKG) > * > * Where the last one more or less denotes everything up to a NUMA node. > * > @@ -1140,13 +1140,13 @@ build_overlap_sched_groups(struct sched_domain *sd, > int cpu) > * > * CPU 0 1 2 3 4 5 6 7 > * > - * DIE [ ] > + * PKG [ ] > * MC [ ] [ ] > * SMT [ ] [ ] [ ] [ ] > * > * - or - > * > - * DIE 0-7 0-7 0-7 0-7 0-7 0-7 0-7 0-7 > + * PKG 0-7 0-7 0-7 0-7 0-7 0-7 0-7 0-7 > * MC0-3 0-3 0-3 0-3 4-7 4-7 4-7 4-7 > * SMT 0-1 0-1 2-3 2-3 4-5 4-5 6-7 6-7 > * > A couple of comments missing the change still? Not sure if it taken care already. --- arch/powerpc/kernel/smp.c | 2 +- arch/x86/kernel/smpboot.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index fbbb695bae3d..9b1853bf6b1d 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -1588,7 +1588,7 @@ static void add_cpu_to_masks(int cpu) /* Skip all CPUs already part of current CPU core mask */ cpumask_andnot(mask, cpu_online_mask, cpu_core_mask(cpu)); - /* If chip_id is -1; limit the cpu_core_mask to within DIE*/ + /* If chip_id is -1; limit the cpu_core_mask to within PKG*/ if (chip_id == -1) cpumask_and(mask, mask, cpu_cpu_mask(cpu)); diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index e1aa2cd7734b..3f175e70eb7a 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -647,7 +647,7 @@ static void __init build_sched_topology(void) }; #endif /* -* When there is NUMA topology inside the package skip the DIE domain +* When there is NUMA topology inside the package skip the PKG domain * since the NUMA domains will auto-magically create the right spanning * domains based on the SLIT. */
Re: [RFC][PATCH] sched: Rename DIE domain
On Wed, Jul 12, 2023 at 04:10:56PM +0200, Peter Zijlstra wrote: > Hi > > Thomas just tripped over the x86 topology setup creating a 'DIE' domain > for the package mask :-) > > Since these names are SCHED_DEBUG only, rename them. > I don't think anybody *should* be relying on this, but who knows. > > Signed-off-by: Peter Zijlstra (Intel) > --- > arch/powerpc/kernel/smp.c | 2 +- > arch/s390/kernel/topology.c | 2 +- > arch/x86/kernel/smpboot.c | 2 +- > kernel/sched/topology.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) For s390: Acked-by: Heiko Carstens
Re: [PATCH v3 00/18] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags
Hi Am 14.07.23 um 12:29 schrieb Dan Carpenter: On Fri, Jul 14, 2023 at 12:24:05PM +0200, Thomas Zimmermann wrote: fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers I wasn't happy about this either. But I could not come up with a description that fits into the 74-char limit for each commit. They only differ in the method of memory allocation. Do you have any ideas? fbdev: Remove FBINFO_DEFAULT from static structs fbdev: Remove FBINFO_DEFAULT from kzalloc() structs fbdev: Remove FBINFO_DEFAULT from devm_kzalloc() structs Sounds good, I'll use that. Thanks! Best regards Thomas regards, dan carpenter -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg) OpenPGP_signature Description: OpenPGP digital signature
Re: [PATCH v3 00/18] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags
On Fri, Jul 14, 2023 at 12:24:05PM +0200, Thomas Zimmermann wrote: > > > > >fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers > > >fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers > > >fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers > > >fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers > > > I wasn't happy about this either. But I could not come up with a description > that fits into the 74-char limit for each commit. They only differ in the > method of memory allocation. Do you have any ideas? fbdev: Remove FBINFO_DEFAULT from static structs fbdev: Remove FBINFO_DEFAULT from kzalloc() structs fbdev: Remove FBINFO_DEFAULT from devm_kzalloc() structs regards, dan carpenter
Re: [PATCH v3 00/18] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags
Hi Am 14.07.23 um 12:04 schrieb Geert Uytterhoeven: Hi Thomas, On Fri, Jul 14, 2023 at 9:53 AM Thomas Zimmermann wrote: Remove the unused flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT from fbdev and drivers, as briefly discussed at [1]. Both flags were maybe useful when fbdev had special handling for driver modules. With commit 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE"), they are both 0 and have no further effect. Patches 1 to 7 remove FBINFO_DEFAULT from drivers. Patches 2 to 5 split this by the way the fb_info struct is being allocated. All flags are cleared to zero during the allocation. Patches 8 to 16 do the same for FBINFO_FLAG_DEFAULT. Patch 8 fixes an actual bug in how arch/sh uses the token for struct fb_videomode, which is unrelated. Patch 17 removes both flag constants from and patch 18 documents the zero'ed memory returned by framebuffer_alloc(). v3: * sh: include board name in commit message (Adrian) * docs: reword text (Miguel) Thanks for the update! fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers I wasn't happy about this either. But I could not come up with a description that fits into the 74-char limit for each commit. They only differ in the method of memory allocation. Do you have any ideas? Four patches with the exact same one-line summary. Please make them unique. fbdev: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers fbdev: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers Two patches with the exact same one-line summary. Please make them unique. Same problem here. Best regards Thomas Gr{oetje,eeting}s, Geert -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg) OpenPGP_signature Description: OpenPGP digital signature
Re: [PATCH v3 00/18] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags
Hi Thomas, On Fri, Jul 14, 2023 at 9:53 AM Thomas Zimmermann wrote: > Remove the unused flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT from > fbdev and drivers, as briefly discussed at [1]. Both flags were maybe > useful when fbdev had special handling for driver modules. With > commit 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE"), they are both 0 > and have no further effect. > > Patches 1 to 7 remove FBINFO_DEFAULT from drivers. Patches 2 to 5 > split this by the way the fb_info struct is being allocated. All flags > are cleared to zero during the allocation. > > Patches 8 to 16 do the same for FBINFO_FLAG_DEFAULT. Patch 8 fixes > an actual bug in how arch/sh uses the token for struct fb_videomode, > which is unrelated. > > Patch 17 removes both flag constants from and patch 18 > documents the zero'ed memory returned by framebuffer_alloc(). > > v3: > * sh: include board name in commit message (Adrian) > * docs: reword text (Miguel) Thanks for the update! > fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers > fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers > fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers > fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers Four patches with the exact same one-line summary. Please make them unique. > fbdev: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers > fbdev: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers Two patches with the exact same one-line summary. Please make them unique. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
[PATCH 2/2] ASoC: fsl_rpmsg: Add support for i.MX93 platform
Add compatible string and specific soc data to support rpmsg sound card on i.MX93 platform. Signed-off-by: Chancel Liu --- sound/soc/fsl/fsl_rpmsg.c | 8 1 file changed, 8 insertions(+) diff --git a/sound/soc/fsl/fsl_rpmsg.c b/sound/soc/fsl/fsl_rpmsg.c index 15b48b5ea856..abe19a8a7aa7 100644 --- a/sound/soc/fsl/fsl_rpmsg.c +++ b/sound/soc/fsl/fsl_rpmsg.c @@ -170,12 +170,20 @@ static const struct fsl_rpmsg_soc_data imx8mp_data = { SNDRV_PCM_FMTBIT_S32_LE, }; +static const struct fsl_rpmsg_soc_data imx93_data = { + .rates = SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_32000 | +SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000, + .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S32_LE, +}; + static const struct of_device_id fsl_rpmsg_ids[] = { { .compatible = "fsl,imx7ulp-rpmsg-audio", .data = _data}, { .compatible = "fsl,imx8mm-rpmsg-audio", .data = _data}, { .compatible = "fsl,imx8mn-rpmsg-audio", .data = _data}, { .compatible = "fsl,imx8mp-rpmsg-audio", .data = _data}, { .compatible = "fsl,imx8ulp-rpmsg-audio", .data = _data}, + { .compatible = "fsl,imx93-rpmsg-audio", .data = _data}, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, fsl_rpmsg_ids); -- 2.25.1
[PATCH 1/2] ASoC: dt-bindings: fsl_rpmsg: Add compatible string for i.MX93
Add compatible string for i.MX93 platform which supports audio function through rpmsg channel between Cortex-A and Cortex-M core. Signed-off-by: Chancel Liu --- Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml index e847611a85f7..6df0e03a1d4b 100644 --- a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml +++ b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml @@ -25,6 +25,7 @@ properties: - fsl,imx8mm-rpmsg-audio - fsl,imx8mp-rpmsg-audio - fsl,imx8ulp-rpmsg-audio + - fsl,imx93-rpmsg-audio model: $ref: /schemas/types.yaml#/definitions/string -- 2.25.1
[PATCH 0/2] Add support for rpmsg sound card on i.MX93 platform
Support rpmsg sound card on i.MX93 platform. Chancel Liu (2): ASoC: dt-bindings: fsl_rpmsg: Add compatible string for i.MX93 ASoC: fsl_rpmsg: Add support for i.MX93 platform Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml | 1 + sound/soc/fsl/fsl_rpmsg.c | 8 2 files changed, 9 insertions(+) -- 2.25.1
Re: [RFC][PATCH] sched: Rename DIE domain
On Wed, Jul 12, 2023 at 04:02:38PM +0100, Valentin Schneider wrote: > On 12/07/23 16:10, Peter Zijlstra wrote: > > Hi > > > > Thomas just tripped over the x86 topology setup creating a 'DIE' domain > > for the package mask :-) > > > > Since these names are SCHED_DEBUG only, rename them. > > I don't think anybody *should* be relying on this, but who knows. > > > > FWIW I don't care much about the actual name. > > There are some stray references to DIE in comments - see below. Bit funny > to see: > - * - Package (DIE) > + * - Package (PKG) > > With that: > Acked-by: Valentin Schneider > No objection either, PKG is less ambiguous than DIE Acked-by: Mel Gorman -- Mel Gorman SUSE Labs
Re: [PATCH v2 0/5] crypto: Accelerated Chacha20/Poly1305 implementation
On Wed, Apr 26, 2023 at 03:11:42PM -0400, Danny Tsen wrote: > This patch series provide an accelerated/optimized Chacha20 and Poly1305 > implementation for Power10 or later CPU (ppc64le). This module > implements algorithm specified in RFC7539. The implementation > provides 3.5X better performance than the baseline for Chacha20 and > Poly1305 individually and 1.5X improvement for Chacha20/Poly1305 > operation. > > This patch has been tested with the kernel crypto module tcrypt.ko and > has passed the selftest. The patch is also tested with > CONFIG_CRYPTO_MANAGER_EXTRA_TESTS enabled. > > > Danny Tsen (5): > An optimized Chacha20 implementation with 8-way unrolling for ppc64le. > Glue code for optmized Chacha20 implementation for ppc64le. > An optimized Poly1305 implementation with 4-way unrolling for ppc64le. > Glue code for optmized Poly1305 implementation for ppc64le. > Update Kconfig and Makefile. > > arch/powerpc/crypto/Kconfig | 26 + > arch/powerpc/crypto/Makefile|4 + > arch/powerpc/crypto/chacha-p10-glue.c | 221 + > arch/powerpc/crypto/chacha-p10le-8x.S | 842 ++ > arch/powerpc/crypto/poly1305-p10-glue.c | 186 > arch/powerpc/crypto/poly1305-p10le_64.S | 1075 +++ > 6 files changed, 2354 insertions(+) > create mode 100644 arch/powerpc/crypto/chacha-p10-glue.c > create mode 100644 arch/powerpc/crypto/chacha-p10le-8x.S > create mode 100644 arch/powerpc/crypto/poly1305-p10-glue.c > create mode 100644 arch/powerpc/crypto/poly1305-p10le_64.S > > -- > 2.31.1 All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Re: [PATCH v6 2/3] PCI/AER: Disable AER interrupt on suspend
On Fri, May 12, 2023 at 8:01 AM Kai-Heng Feng wrote: > > PCIe services that share an IRQ with PME, such as AER or DPC, may cause a > spurious wakeup on system suspend. To prevent this, disable the AER interrupt > notification during the system suspend process. > > As Per PCIe Base Spec 5.0, section 5.2, titled "Link State Power Management", > TLP and DLLP transmission are disabled for a Link in L2/L3 Ready (D3hot), L2 > (D3cold with aux power) and L3 (D3cold) states. So disabling the AER > notification during suspend and re-enabling them during the resume process > should not affect the basic functionality. > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=216295 > Reviewed-by: Mika Westerberg > Signed-off-by: Kai-Heng Feng A gentle ping... > --- > v6: > v5: > - Wording. > > v4: > v3: > - No change. > > v2: > - Only disable AER IRQ. > - No more check on PME IRQ#. > - Use helper. > > drivers/pci/pcie/aer.c | 22 ++ > 1 file changed, 22 insertions(+) > > diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c > index 1420e1f27105..9c07fdbeb52d 100644 > --- a/drivers/pci/pcie/aer.c > +++ b/drivers/pci/pcie/aer.c > @@ -1356,6 +1356,26 @@ static int aer_probe(struct pcie_device *dev) > return 0; > } > > +static int aer_suspend(struct pcie_device *dev) > +{ > + struct aer_rpc *rpc = get_service_data(dev); > + struct pci_dev *pdev = rpc->rpd; > + > + aer_disable_irq(pdev); > + > + return 0; > +} > + > +static int aer_resume(struct pcie_device *dev) > +{ > + struct aer_rpc *rpc = get_service_data(dev); > + struct pci_dev *pdev = rpc->rpd; > + > + aer_enable_irq(pdev); > + > + return 0; > +} > + > /** > * aer_root_reset - reset Root Port hierarchy, RCEC, or RCiEP > * @dev: pointer to Root Port, RCEC, or RCiEP > @@ -1420,6 +1440,8 @@ static struct pcie_port_service_driver aerdriver = { > .service= PCIE_PORT_SERVICE_AER, > > .probe = aer_probe, > + .suspend= aer_suspend, > + .resume = aer_resume, > .remove = aer_remove, > }; > > -- > 2.34.1 >
[PATCH v3 18/18] fbdev: Document that framebuffer_alloc() returns zero'ed data
Most fbdev drivers depend on framebuffer_alloc() to initialize the allocated memory to 0. Document this guarantee. v3: * slightly reword the sentence (Miguel) Suggested-by: Miguel Ojeda Signed-off-by: Thomas Zimmermann Reviewed-by: Miguel Ojeda Cc: Helge Deller --- drivers/video/fbdev/core/fb_info.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/core/fb_info.c b/drivers/video/fbdev/core/fb_info.c index 8bdbefdd4b70..4847ebe50d7d 100644 --- a/drivers/video/fbdev/core/fb_info.c +++ b/drivers/video/fbdev/core/fb_info.c @@ -13,7 +13,8 @@ * * Creates a new frame buffer info structure. Also reserves @size bytes * for driver private data (info->par). info->par (if any) will be - * aligned to sizeof(long). + * aligned to sizeof(long). The new instances of struct fb_info and + * the driver private data are both cleared to zero. * * Returns the new structure, or NULL if an error occurred. * -- 2.41.0
[PATCH v3 17/18] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT
Remove the unused flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT. No functional changes. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Helge Deller --- include/linux/fb.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/fb.h b/include/linux/fb.h index 1d5c13f34b09..43458f582f35 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -383,7 +383,6 @@ struct fb_tile_ops { #endif /* CONFIG_FB_TILEBLITTING */ /* FBINFO_* = fb_info.flags bit flags */ -#define FBINFO_DEFAULT 0 #define FBINFO_HWACCEL_DISABLED0x0002 /* When FBINFO_HWACCEL_DISABLED is set: * Hardware acceleration is turned off. Software implementations @@ -504,8 +503,6 @@ struct fb_info { bool skip_vt_switch; /* no VT switch on suspend/resume required */ }; -#define FBINFO_FLAG_DEFAULTFBINFO_DEFAULT - /* This will go away * fbset currently hacks in FB_ACCELF_TEXT into var.accel_flags * when it wants to turn the acceleration engine on. This is -- 2.41.0
[PATCH v3 16/18] fbdev/pxafb: Remove flag FBINFO_FLAG_DEFAULT
The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by devm_kzalloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Helge Deller --- drivers/video/fbdev/pxafb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index c8c4677d06b4..beffb0602a2c 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -888,7 +888,6 @@ static void init_pxafb_overlay(struct pxafb_info *fbi, struct pxafb_layer *ofb, ofb->fb.var.vmode = FB_VMODE_NONINTERLACED; ofb->fb.fbops = _fb_ops; - ofb->fb.flags = FBINFO_FLAG_DEFAULT; ofb->fb.node= -1; ofb->fb.pseudo_palette = NULL; -- 2.41.0
[PATCH v3 12/18] staging: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by framebuffer_alloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Greg Kroah-Hartman Cc: Sudip Mukherjee Cc: Teddy Wang --- drivers/staging/fbtft/fbtft-core.c | 2 +- drivers/staging/sm750fb/sm750.c| 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index 3a4abf3bae40..eac1d570f437 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -684,7 +684,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display, info->var.transp.offset = 0; info->var.transp.length = 0; - info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB; + info->flags = FBINFO_VIRTFB; par = info->par; par->info = info; diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index c260f73cf570..79bcd5bd4938 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -807,7 +807,6 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) info->screen_base = crtc->v_screen; pr_debug("screen_base vaddr = %p\n", info->screen_base); info->screen_size = line_length * var->yres_virtual; - info->flags = FBINFO_FLAG_DEFAULT | 0; /* set info->fix */ fix->type = FB_TYPE_PACKED_PIXELS; -- 2.41.0
[PATCH v3 15/18] fbdev/atafb: Remove flag FBINFO_FLAG_DEFAULT
The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by a static declaration. So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Helge Deller --- drivers/video/fbdev/atafb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index 2bc4089865e6..c4a420b791b9 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -3112,7 +3112,6 @@ static int __init atafb_probe(struct platform_device *pdev) #ifdef ATAFB_FALCON fb_info.pseudo_palette = current_par.hw.falcon.pseudo_palette; #endif - fb_info.flags = FBINFO_FLAG_DEFAULT; if (!fb_find_mode(_info.var, _info, mode_option, atafb_modedb, NUM_TOTAL_MODES, _modedb[defmode], -- 2.41.0
[PATCH v3 14/18] fbdev: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by framebuffer_alloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Jaya Kumar Cc: Helge Deller Cc: Peter Jones Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Shawn Guo Cc: Fabio Estevam Cc: NXP Linux Team Cc: Maik Broemme Cc: Jingoo Han Cc: Sudip Mukherjee Cc: Teddy Wang Cc: Michal Januszewski --- drivers/video/fbdev/arcfb.c| 1 - drivers/video/fbdev/aty/aty128fb.c | 1 - drivers/video/fbdev/broadsheetfb.c | 2 +- drivers/video/fbdev/da8xx-fb.c | 1 - drivers/video/fbdev/efifb.c| 1 - drivers/video/fbdev/goldfishfb.c | 1 - drivers/video/fbdev/gxt4500.c | 3 +-- drivers/video/fbdev/hecubafb.c | 2 +- drivers/video/fbdev/imxfb.c| 3 +-- drivers/video/fbdev/intelfb/intelfbdrv.c | 1 - drivers/video/fbdev/metronomefb.c | 2 +- drivers/video/fbdev/mx3fb.c| 1 - drivers/video/fbdev/omap/omapfb_main.c | 1 - drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 1 - drivers/video/fbdev/s3c-fb.c | 1 - drivers/video/fbdev/sh_mobile_lcdcfb.c | 2 -- drivers/video/fbdev/sis/sis_main.c | 2 -- drivers/video/fbdev/sm501fb.c | 2 +- drivers/video/fbdev/sm712fb.c | 1 - drivers/video/fbdev/uvesafb.c | 3 +-- drivers/video/fbdev/vesafb.c | 2 +- drivers/video/fbdev/vfb.c | 1 - drivers/video/fbdev/vga16fb.c | 2 +- drivers/video/fbdev/xen-fbfront.c | 2 +- 24 files changed, 10 insertions(+), 29 deletions(-) diff --git a/drivers/video/fbdev/arcfb.c b/drivers/video/fbdev/arcfb.c index 9aaea3be8281..cff11cb04a55 100644 --- a/drivers/video/fbdev/arcfb.c +++ b/drivers/video/fbdev/arcfb.c @@ -546,7 +546,6 @@ static int arcfb_probe(struct platform_device *dev) par->c2io_addr = c2io_addr; par->cslut[0] = 0x00; par->cslut[1] = 0x06; - info->flags = FBINFO_FLAG_DEFAULT; spin_lock_init(>lock); if (irq) { par->irq = irq; diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c index 2d9320a52e51..b44fc78ccd4f 100644 --- a/drivers/video/fbdev/aty/aty128fb.c +++ b/drivers/video/fbdev/aty/aty128fb.c @@ -1927,7 +1927,6 @@ static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent) /* fill in info */ info->fbops = _ops; - info->flags = FBINFO_FLAG_DEFAULT; par->lcd_on = default_lcd_on; par->crt_on = default_crt_on; diff --git a/drivers/video/fbdev/broadsheetfb.c b/drivers/video/fbdev/broadsheetfb.c index cb725a91b6bb..e51e14c29c55 100644 --- a/drivers/video/fbdev/broadsheetfb.c +++ b/drivers/video/fbdev/broadsheetfb.c @@ -1069,7 +1069,7 @@ static int broadsheetfb_probe(struct platform_device *dev) mutex_init(>io_lock); - info->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB; + info->flags = FBINFO_VIRTFB; info->fbdefio = _defio; fb_deferred_io_init(info); diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c index 60cd1286370f..988dedcf6be8 100644 --- a/drivers/video/fbdev/da8xx-fb.c +++ b/drivers/video/fbdev/da8xx-fb.c @@ -1463,7 +1463,6 @@ static int fb_probe(struct platform_device *device) da8xx_fb_var.bits_per_pixel = lcd_cfg->bpp; /* Initialize fbinfo */ - da8xx_fb_info->flags = FBINFO_FLAG_DEFAULT; da8xx_fb_info->fix = da8xx_fb_fix; da8xx_fb_info->var = da8xx_fb_var; da8xx_fb_info->fbops = _fb_ops; diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c index 3d7be69ab593..3391c8e84210 100644 --- a/drivers/video/fbdev/efifb.c +++ b/drivers/video/fbdev/efifb.c @@ -555,7 +555,6 @@ static int efifb_probe(struct platform_device *dev) info->fbops = _ops; info->var = efifb_defined; info->fix = efifb_fix; - info->flags = FBINFO_FLAG_DEFAULT; orientation = drm_get_panel_orientation_quirk(efifb_defined.xres, efifb_defined.yres); diff --git a/drivers/video/fbdev/goldfishfb.c b/drivers/video/fbdev/goldfishfb.c index 6fa2108fd912..ef2528c3faa9 100644 --- a/drivers/video/fbdev/goldfishfb.c +++ b/drivers/video/fbdev/goldfishfb.c @@ -212,7 +212,6 @@ static int goldfish_fb_probe(struct platform_device *pdev) height = readl(fb->reg_base + FB_GET_HEIGHT); fb->fb.fbops= _fb_ops; - fb->fb.flags= FBINFO_FLAG_DEFAULT; fb->fb.pseudo_palette = fb->cmap;
[PATCH v3 13/18] fbdev: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by kzalloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Helge Deller --- drivers/video/fbdev/amba-clcd.c | 1 - drivers/video/fbdev/matrox/matroxfb_crtc2.c | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c index e45338227be6..24d89e6fb780 100644 --- a/drivers/video/fbdev/amba-clcd.c +++ b/drivers/video/fbdev/amba-clcd.c @@ -461,7 +461,6 @@ static int clcdfb_register(struct clcd_fb *fb) } fb->fb.fbops= _ops; - fb->fb.flags= FBINFO_FLAG_DEFAULT; fb->fb.pseudo_palette = fb->cmap; strncpy(fb->fb.fix.id, clcd_name, sizeof(fb->fb.fix.id)); diff --git a/drivers/video/fbdev/matrox/matroxfb_crtc2.c b/drivers/video/fbdev/matrox/matroxfb_crtc2.c index 7655afa3fd50..372197c124de 100644 --- a/drivers/video/fbdev/matrox/matroxfb_crtc2.c +++ b/drivers/video/fbdev/matrox/matroxfb_crtc2.c @@ -603,9 +603,8 @@ static int matroxfb_dh_regit(const struct matrox_fb_info *minfo, void* oldcrtc2; m2info->fbcon.fbops = _dh_ops; - m2info->fbcon.flags = FBINFO_FLAG_DEFAULT; - m2info->fbcon.flags |= FBINFO_HWACCEL_XPAN | - FBINFO_HWACCEL_YPAN; + m2info->fbcon.flags = FBINFO_HWACCEL_XPAN | + FBINFO_HWACCEL_YPAN; m2info->fbcon.pseudo_palette = m2info->cmap; fb_alloc_cmap(>fbcon.cmap, 256, 1); -- 2.41.0
[PATCH v3 10/18] hid/picolcd: Remove flag FBINFO_FLAG_DEFAULT from fbdev driver
The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by framebuffer_alloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Acked-by: Benjamin Tissoires Acked-by: Bruno Prémont Cc: "Bruno Prémont" Cc: Jiri Kosina Cc: Benjamin Tissoires --- drivers/hid/hid-picolcd_fb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/hid/hid-picolcd_fb.c b/drivers/hid/hid-picolcd_fb.c index dabcd054dad9..d726aaafb146 100644 --- a/drivers/hid/hid-picolcd_fb.c +++ b/drivers/hid/hid-picolcd_fb.c @@ -527,7 +527,6 @@ int picolcd_init_framebuffer(struct picolcd_data *data) info->var = picolcdfb_var; info->fix = picolcdfb_fix; info->fix.smem_len = PICOLCDFB_SIZE*8; - info->flags = FBINFO_FLAG_DEFAULT; fbdata = info->par; spin_lock_init(>lock); -- 2.41.0
[PATCH v3 11/18] media: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by kzalloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Andy Walls Cc: Mauro Carvalho Chehab Cc: Hans Verkuil --- drivers/media/pci/ivtv/ivtvfb.c | 1 - drivers/media/test-drivers/vivid/vivid-osd.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/media/pci/ivtv/ivtvfb.c b/drivers/media/pci/ivtv/ivtvfb.c index 0aeb9daaee4c..23c8c094e791 100644 --- a/drivers/media/pci/ivtv/ivtvfb.c +++ b/drivers/media/pci/ivtv/ivtvfb.c @@ -1048,7 +1048,6 @@ static int ivtvfb_init_vidmode(struct ivtv *itv) /* Generate valid fb_info */ oi->ivtvfb_info.node = -1; - oi->ivtvfb_info.flags = FBINFO_FLAG_DEFAULT; oi->ivtvfb_info.par = itv; oi->ivtvfb_info.var = oi->ivtvfb_defined; oi->ivtvfb_info.fix = oi->ivtvfb_fix; diff --git a/drivers/media/test-drivers/vivid/vivid-osd.c b/drivers/media/test-drivers/vivid/vivid-osd.c index ec25edc679b3..051f1805a16d 100644 --- a/drivers/media/test-drivers/vivid/vivid-osd.c +++ b/drivers/media/test-drivers/vivid/vivid-osd.c @@ -310,7 +310,6 @@ static int vivid_fb_init_vidmode(struct vivid_dev *dev) /* Generate valid fb_info */ dev->fb_info.node = -1; - dev->fb_info.flags = FBINFO_FLAG_DEFAULT; dev->fb_info.par = dev; dev->fb_info.var = dev->fb_defined; dev->fb_info.fix = dev->fb_fix; -- 2.41.0
[PATCH v3 09/18] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers
The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by framebuffer_alloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Acked-by: Miguel Ojeda Cc: Miguel Ojeda Cc: Robin van der Gracht --- drivers/auxdisplay/cfag12864bfb.c | 1 - drivers/auxdisplay/ht16k33.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c index c2cab7e2b126..729845bcc803 100644 --- a/drivers/auxdisplay/cfag12864bfb.c +++ b/drivers/auxdisplay/cfag12864bfb.c @@ -79,7 +79,6 @@ static int cfag12864bfb_probe(struct platform_device *device) info->var = cfag12864bfb_var; info->pseudo_palette = NULL; info->par = NULL; - info->flags = FBINFO_FLAG_DEFAULT; if (register_framebuffer(info) < 0) goto fballoced; diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c index edaf92b7ea77..df3f37651e45 100644 --- a/drivers/auxdisplay/ht16k33.c +++ b/drivers/auxdisplay/ht16k33.c @@ -646,7 +646,6 @@ static int ht16k33_fbdev_probe(struct device *dev, struct ht16k33_priv *priv, fbdev->info->var = ht16k33_fb_var; fbdev->info->bl_dev = bl; fbdev->info->pseudo_palette = NULL; - fbdev->info->flags = FBINFO_FLAG_DEFAULT; fbdev->info->par = priv; err = register_framebuffer(fbdev->info); -- 2.41.0
[PATCH v3 08/18] sh: mach-sh7763rdp: Assign FB_MODE_IS_UNKNOWN to struct fb_videomode.flag
Assign FB_MODE_IS_UNKNOWN to sh7763fb_videomode.flag instead of FBINFO_FLAG_DEFAULT. Both are 0, so the stored value does not change. FBINFO_FLAG_DEFAULT is a flag for a framebuffer in struct fb_info. Flags for videomodes are prefixed with FB_MODE_. v3: * include board name in commit message (Adrian) v2: * assign FB_MODE_IS_UNKNOWN (Adrian) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Acked-by: John Paul Adrian Glaubitz Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz --- arch/sh/boards/mach-sh7763rdp/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/boards/mach-sh7763rdp/setup.c b/arch/sh/boards/mach-sh7763rdp/setup.c index 97e715e4e9b3..e25193001ea0 100644 --- a/arch/sh/boards/mach-sh7763rdp/setup.c +++ b/arch/sh/boards/mach-sh7763rdp/setup.c @@ -119,7 +119,7 @@ static struct fb_videomode sh7763fb_videomode = { .vsync_len = 1, .sync = 0, .vmode = FB_VMODE_NONINTERLACED, - .flag = FBINFO_FLAG_DEFAULT, + .flag = FB_MODE_IS_UNKNOWN, }; static struct sh7760fb_platdata sh7763fb_def_pdata = { -- 2.41.0
[PATCH v3 07/18] vfio-mdev: Remove flag FBINFO_DEFAULT from fbdev sample driver
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by framebuffer_alloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Kirti Wankhede --- samples/vfio-mdev/mdpy-fb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/samples/vfio-mdev/mdpy-fb.c b/samples/vfio-mdev/mdpy-fb.c index 3c8001b9e407..cda477b28685 100644 --- a/samples/vfio-mdev/mdpy-fb.c +++ b/samples/vfio-mdev/mdpy-fb.c @@ -162,7 +162,6 @@ static int mdpy_fb_probe(struct pci_dev *pdev, } info->fbops = _fb_ops; - info->flags = FBINFO_DEFAULT; info->pseudo_palette = par->palette; ret = register_framebuffer(info); -- 2.41.0
[PATCH v3 06/18] fbdev/fsl-diu-fb: Remove flag FBINFO_DEFAULT
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by dmam_alloc_coherent(__GFP_ZERO). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Timur Tabi Cc: Helge Deller --- drivers/video/fbdev/fsl-diu-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c index 785eb8a06943..c62b48f27ba9 100644 --- a/drivers/video/fbdev/fsl-diu-fb.c +++ b/drivers/video/fbdev/fsl-diu-fb.c @@ -1476,7 +1476,7 @@ static int install_fb(struct fb_info *info) info->var.activate = FB_ACTIVATE_NOW; info->fbops = _diu_ops; - info->flags = FBINFO_DEFAULT | FBINFO_VIRTFB | FBINFO_PARTIAL_PAN_OK | + info->flags = FBINFO_VIRTFB | FBINFO_PARTIAL_PAN_OK | FBINFO_READS_FAST; info->pseudo_palette = mfbi->pseudo_palette; -- 2.41.0
[PATCH v3 05/18] fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by framebuffer_alloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Helge Deller Cc: Nicolas Ferre Cc: Benjamin Herrenschmidt Cc: Ferenc Bakonyi Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Wei Liu Cc: Dexuan Cui Cc: Antonino Daplas Cc: Maik Broemme Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Kristoffer Ericson Cc: Hans de Goede Cc: Steve Glendinning Cc: Bernie Thompson Cc: Florian Tobias Schandinat --- drivers/video/fbdev/amifb.c | 5 ++--- drivers/video/fbdev/asiliantfb.c | 1 - drivers/video/fbdev/atmel_lcdfb.c| 2 +- drivers/video/fbdev/aty/atyfb_base.c | 3 +-- drivers/video/fbdev/aty/radeon_base.c| 3 +-- drivers/video/fbdev/bw2.c| 1 - drivers/video/fbdev/carminefb.c | 1 - drivers/video/fbdev/cg14.c | 2 +- drivers/video/fbdev/cg3.c| 1 - drivers/video/fbdev/cg6.c| 2 +- drivers/video/fbdev/chipsfb.c| 1 - drivers/video/fbdev/cirrusfb.c | 3 +-- drivers/video/fbdev/clps711x-fb.c| 1 - drivers/video/fbdev/cobalt_lcdfb.c | 1 - drivers/video/fbdev/ep93xx-fb.c | 1 - drivers/video/fbdev/ffb.c| 3 +-- drivers/video/fbdev/fm2fb.c | 1 - drivers/video/fbdev/gbefb.c | 1 - drivers/video/fbdev/geode/gx1fb_core.c | 1 - drivers/video/fbdev/geode/gxfb_core.c| 1 - drivers/video/fbdev/geode/lxfb_core.c| 1 - drivers/video/fbdev/grvga.c | 2 +- drivers/video/fbdev/hgafb.c | 2 +- drivers/video/fbdev/hitfb.c | 2 +- drivers/video/fbdev/hyperv_fb.c | 2 -- drivers/video/fbdev/i740fb.c | 2 +- drivers/video/fbdev/i810/i810_main.c | 4 ++-- drivers/video/fbdev/imsttfb.c| 3 +-- drivers/video/fbdev/intelfb/intelfbdrv.c | 4 ++-- drivers/video/fbdev/kyro/fbdev.c | 1 - drivers/video/fbdev/leo.c| 1 - drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 2 +- drivers/video/fbdev/mmp/fb/mmpfb.c | 2 +- drivers/video/fbdev/neofb.c | 2 +- drivers/video/fbdev/nvidia/nvidia.c | 4 ++-- drivers/video/fbdev/offb.c | 2 +- drivers/video/fbdev/p9100.c | 1 - drivers/video/fbdev/platinumfb.c | 1 - drivers/video/fbdev/pm2fb.c | 3 +-- drivers/video/fbdev/pm3fb.c | 3 +-- drivers/video/fbdev/pmag-aa-fb.c | 1 - drivers/video/fbdev/pmag-ba-fb.c | 1 - drivers/video/fbdev/pmagb-b-fb.c | 1 - drivers/video/fbdev/ps3fb.c | 2 +- drivers/video/fbdev/pvr2fb.c | 2 +- drivers/video/fbdev/pxa168fb.c | 2 +- drivers/video/fbdev/q40fb.c | 1 - drivers/video/fbdev/riva/fbdev.c | 3 +-- drivers/video/fbdev/s1d13xxxfb.c | 4 ++-- drivers/video/fbdev/savage/savagefb_driver.c | 3 +-- drivers/video/fbdev/simplefb.c | 1 - drivers/video/fbdev/sis/sis_main.c | 3 +-- drivers/video/fbdev/skeletonfb.c | 2 +- drivers/video/fbdev/smscufx.c| 2 +- drivers/video/fbdev/sstfb.c | 1 - drivers/video/fbdev/sunxvr1000.c | 1 - drivers/video/fbdev/sunxvr2500.c | 1 - drivers/video/fbdev/sunxvr500.c | 1 - drivers/video/fbdev/tcx.c| 1 - drivers/video/fbdev/tdfxfb.c | 2 +- drivers/video/fbdev/tgafb.c | 2 +- drivers/video/fbdev/tridentfb.c | 2 +- drivers/video/fbdev/udlfb.c | 2 +- drivers/video/fbdev/via/viafbdev.c | 2 +- 64 files changed, 41 insertions(+), 81 deletions(-) diff --git a/drivers/video/fbdev/amifb.c b/drivers/video/fbdev/amifb.c index d88265dbebf4..cea782283b9c 100644 --- a/drivers/video/fbdev/amifb.c +++ b/drivers/video/fbdev/amifb.c @@ -2427,7 +2427,7 @@ static int amifb_set_par(struct fb_info *info) info->fix.ywrapstep = 1; info->fix.xpanstep = 0; info->fix.ypanstep = 0; - info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YWRAP | + info->flags = FBINFO_HWACCEL_YWRAP | FBINFO_READS_FAST; /* override SCROLL_REDRAW */ } else { info->fix.ywrapstep = 0; @@ -2436,7 +2436,7 @@ static int amifb_set_par(struct fb_info *info) else info->fix.xpanstep = 16 << maxfmode;
[PATCH v3 03/18] fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by kzalloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Helge Deller Cc: Russell King --- drivers/video/fbdev/controlfb.c | 2 +- drivers/video/fbdev/cyber2000fb.c | 2 +- drivers/video/fbdev/valkyriefb.c | 1 - drivers/video/fbdev/vermilion/vermilion.c | 2 +- drivers/video/fbdev/vt8500lcdfb.c | 3 +-- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/controlfb.c b/drivers/video/fbdev/controlfb.c index 82eeb139c4eb..717134c141ff 100644 --- a/drivers/video/fbdev/controlfb.c +++ b/drivers/video/fbdev/controlfb.c @@ -775,7 +775,7 @@ static void __init control_init_info(struct fb_info *info, struct fb_info_contro info->par = >par; info->fbops = _ops; info->pseudo_palette = p->pseudo_palette; -info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; + info->flags = FBINFO_HWACCEL_YPAN; info->screen_base = p->frame_buffer + CTRLFB_OFF; fb_alloc_cmap(>cmap, 256, 0); diff --git a/drivers/video/fbdev/cyber2000fb.c b/drivers/video/fbdev/cyber2000fb.c index 38c0a6866d76..98ea56a9abf1 100644 --- a/drivers/video/fbdev/cyber2000fb.c +++ b/drivers/video/fbdev/cyber2000fb.c @@ -1459,7 +1459,7 @@ static struct cfb_info *cyberpro_alloc_fb_info(unsigned int id, char *name) cfb->fb.var.accel_flags = FB_ACCELF_TEXT; cfb->fb.fbops = _ops; - cfb->fb.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; + cfb->fb.flags = FBINFO_HWACCEL_YPAN; cfb->fb.pseudo_palette = cfb->pseudo_palette; spin_lock_init(>reg_b0_lock); diff --git a/drivers/video/fbdev/valkyriefb.c b/drivers/video/fbdev/valkyriefb.c index b166b7cfe0e5..fd4488777032 100644 --- a/drivers/video/fbdev/valkyriefb.c +++ b/drivers/video/fbdev/valkyriefb.c @@ -535,7 +535,6 @@ static int __init valkyrie_init_info(struct fb_info *info, { info->fbops = _ops; info->screen_base = p->frame_buffer + 0x1000; - info->flags = FBINFO_DEFAULT; info->pseudo_palette = p->pseudo_palette; info->par = >par; return fb_alloc_cmap(>cmap, 256, 0); diff --git a/drivers/video/fbdev/vermilion/vermilion.c b/drivers/video/fbdev/vermilion/vermilion.c index 32e74e02a02f..71584c775efd 100644 --- a/drivers/video/fbdev/vermilion/vermilion.c +++ b/drivers/video/fbdev/vermilion/vermilion.c @@ -477,7 +477,7 @@ static int vml_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) } info = >info; - info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK; + info->flags = FBINFO_PARTIAL_PAN_OK; err = vmlfb_enable_mmio(par); if (err) diff --git a/drivers/video/fbdev/vt8500lcdfb.c b/drivers/video/fbdev/vt8500lcdfb.c index 31d4e85b220c..42d39a9d5130 100644 --- a/drivers/video/fbdev/vt8500lcdfb.c +++ b/drivers/video/fbdev/vt8500lcdfb.c @@ -300,8 +300,7 @@ static int vt8500lcd_probe(struct platform_device *pdev) fbi->fb.var.vmode = FB_VMODE_NONINTERLACED; fbi->fb.fbops = _ops; - fbi->fb.flags = FBINFO_DEFAULT - | FBINFO_HWACCEL_COPYAREA + fbi->fb.flags = FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_YPAN | FBINFO_VIRTFB -- 2.41.0
[PATCH v3 01/18] drm: Remove flag FBINFO_DEFAULT from fbdev emulation
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by framebuffer_alloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Patrik Jakobsson Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" --- drivers/gpu/drm/drm_fbdev_dma.c | 1 - drivers/gpu/drm/drm_fbdev_generic.c | 1 - drivers/gpu/drm/gma500/fbdev.c| 2 +- drivers/gpu/drm/radeon/radeon_fbdev.c | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_fbdev_dma.c b/drivers/gpu/drm/drm_fbdev_dma.c index f9b1f7cd31b7..ee7c265b0585 100644 --- a/drivers/gpu/drm/drm_fbdev_dma.c +++ b/drivers/gpu/drm/drm_fbdev_dma.c @@ -123,7 +123,6 @@ static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper, drm_fb_helper_fill_info(info, fb_helper, sizes); info->fbops = _fbdev_dma_fb_ops; - info->flags = FBINFO_DEFAULT; /* screen */ info->flags |= FBINFO_VIRTFB; /* system memory */ diff --git a/drivers/gpu/drm/drm_fbdev_generic.c b/drivers/gpu/drm/drm_fbdev_generic.c index b9343fb6cf13..a0ea042b1526 100644 --- a/drivers/gpu/drm/drm_fbdev_generic.c +++ b/drivers/gpu/drm/drm_fbdev_generic.c @@ -109,7 +109,6 @@ static int drm_fbdev_generic_helper_fb_probe(struct drm_fb_helper *fb_helper, drm_fb_helper_fill_info(info, fb_helper, sizes); info->fbops = _fbdev_generic_fb_ops; - info->flags = FBINFO_DEFAULT; /* screen */ info->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST; diff --git a/drivers/gpu/drm/gma500/fbdev.c b/drivers/gpu/drm/gma500/fbdev.c index 054426549fc6..be8f5fbd5260 100644 --- a/drivers/gpu/drm/gma500/fbdev.c +++ b/drivers/gpu/drm/gma500/fbdev.c @@ -215,7 +215,7 @@ static int psb_fbdev_fb_probe(struct drm_fb_helper *fb_helper, } info->fbops = _fbdev_fb_ops; - info->flags = FBINFO_DEFAULT; + /* Accessed stolen memory directly */ info->screen_base = dev_priv->vram_addr + backing->offset; info->screen_size = size; diff --git a/drivers/gpu/drm/radeon/radeon_fbdev.c b/drivers/gpu/drm/radeon/radeon_fbdev.c index f941e2e7cae6..68c06ac9acce 100644 --- a/drivers/gpu/drm/radeon/radeon_fbdev.c +++ b/drivers/gpu/drm/radeon/radeon_fbdev.c @@ -253,7 +253,7 @@ static int radeon_fbdev_fb_helper_fb_probe(struct drm_fb_helper *fb_helper, } info->fbops = _fbdev_fb_ops; - info->flags = FBINFO_DEFAULT; + /* radeon resume is fragile and needs a vt switch to help it along */ info->skip_vt_switch = false; -- 2.41.0
[PATCH v3 04/18] fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by devm_kzalloc(). So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Helge Deller --- drivers/video/fbdev/pxafb.c| 1 - drivers/video/fbdev/sa1100fb.c | 1 - drivers/video/fbdev/wm8505fb.c | 3 +-- drivers/video/fbdev/xilinxfb.c | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index 2a8b1dea3a67..c8c4677d06b4 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -1826,7 +1826,6 @@ static struct pxafb_info *pxafb_init_fbinfo(struct device *dev, fbi->fb.var.vmode = FB_VMODE_NONINTERLACED; fbi->fb.fbops = _ops; - fbi->fb.flags = FBINFO_DEFAULT; fbi->fb.node= -1; addr = fbi; diff --git a/drivers/video/fbdev/sa1100fb.c b/drivers/video/fbdev/sa1100fb.c index a2408bf00ca0..3d76ce111488 100644 --- a/drivers/video/fbdev/sa1100fb.c +++ b/drivers/video/fbdev/sa1100fb.c @@ -1089,7 +1089,6 @@ static struct sa1100fb_info *sa1100fb_init_fbinfo(struct device *dev) fbi->fb.var.vmode = FB_VMODE_NONINTERLACED; fbi->fb.fbops = _ops; - fbi->fb.flags = FBINFO_DEFAULT; fbi->fb.monspecs= monspecs; fbi->fb.pseudo_palette = fbi->pseudo_palette; diff --git a/drivers/video/fbdev/wm8505fb.c b/drivers/video/fbdev/wm8505fb.c index 10a8b1250103..5833147aa43d 100644 --- a/drivers/video/fbdev/wm8505fb.c +++ b/drivers/video/fbdev/wm8505fb.c @@ -285,8 +285,7 @@ static int wm8505fb_probe(struct platform_device *pdev) fbi->fb.fix.accel = FB_ACCEL_NONE; fbi->fb.fbops = _ops; - fbi->fb.flags = FBINFO_DEFAULT - | FBINFO_HWACCEL_COPYAREA + fbi->fb.flags = FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_XPAN | FBINFO_HWACCEL_YPAN diff --git a/drivers/video/fbdev/xilinxfb.c b/drivers/video/fbdev/xilinxfb.c index 2aa3a528277f..768a281a8d2c 100644 --- a/drivers/video/fbdev/xilinxfb.c +++ b/drivers/video/fbdev/xilinxfb.c @@ -324,7 +324,6 @@ static int xilinxfb_assign(struct platform_device *pdev, drvdata->info.fix.line_length = pdata->xvirt * BYTES_PER_PIXEL; drvdata->info.pseudo_palette = drvdata->pseudo_palette; - drvdata->info.flags = FBINFO_DEFAULT; drvdata->info.var = xilinx_fb_var; drvdata->info.var.height = pdata->screen_height_mm; drvdata->info.var.width = pdata->screen_width_mm; -- 2.41.0
[PATCH v3 00/18] fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags
Remove the unused flags FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT from fbdev and drivers, as briefly discussed at [1]. Both flags were maybe useful when fbdev had special handling for driver modules. With commit 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE"), they are both 0 and have no further effect. Patches 1 to 7 remove FBINFO_DEFAULT from drivers. Patches 2 to 5 split this by the way the fb_info struct is being allocated. All flags are cleared to zero during the allocation. Patches 8 to 16 do the same for FBINFO_FLAG_DEFAULT. Patch 8 fixes an actual bug in how arch/sh uses the token for struct fb_videomode, which is unrelated. Patch 17 removes both flag constants from and patch 18 documents the zero'ed memory returned by framebuffer_alloc(). v3: * sh: include board name in commit message (Adrian) * docs: reword text (Miguel) v2: * sh: use FB_MODE_IS_UNKNOWN (Adrian) * fix commit messages (Miguel) * document framebuffer_alloc()'s zero'ed memory (Miguel) [1] https://lore.kernel.org/dri-devel/877crer8fm@minerva.mail-host-address-is-not-set/ Thomas Zimmermann (18): drm: Remove flag FBINFO_DEFAULT from fbdev emulation fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers fbdev/fsl-diu-fb: Remove flag FBINFO_DEFAULT vfio-mdev: Remove flag FBINFO_DEFAULT from fbdev sample driver sh: mach-sh7763rdp: Assign FB_MODE_IS_UNKNOWN to struct fb_videomode.flag auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers hid/picolcd: Remove flag FBINFO_FLAG_DEFAULT from fbdev driver media: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers staging: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers fbdev: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers fbdev: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers fbdev/atafb: Remove flag FBINFO_FLAG_DEFAULT fbdev/pxafb: Remove flag FBINFO_FLAG_DEFAULT fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT fbdev: Document that framebuffer_alloc() returns zero'ed data arch/sh/boards/mach-sh7763rdp/setup.c | 2 +- drivers/auxdisplay/cfag12864bfb.c | 1 - drivers/auxdisplay/ht16k33.c | 1 - drivers/gpu/drm/drm_fbdev_dma.c| 1 - drivers/gpu/drm/drm_fbdev_generic.c| 1 - drivers/gpu/drm/gma500/fbdev.c | 2 +- drivers/gpu/drm/radeon/radeon_fbdev.c | 2 +- drivers/hid/hid-picolcd_fb.c | 1 - drivers/media/pci/ivtv/ivtvfb.c| 1 - drivers/media/test-drivers/vivid/vivid-osd.c | 1 - drivers/staging/fbtft/fbtft-core.c | 2 +- drivers/staging/sm750fb/sm750.c| 1 - drivers/video/fbdev/68328fb.c | 2 +- drivers/video/fbdev/acornfb.c | 2 +- drivers/video/fbdev/amba-clcd.c| 1 - drivers/video/fbdev/amifb.c| 5 ++--- drivers/video/fbdev/arcfb.c| 1 - drivers/video/fbdev/asiliantfb.c | 1 - drivers/video/fbdev/atafb.c| 1 - drivers/video/fbdev/atmel_lcdfb.c | 2 +- drivers/video/fbdev/aty/aty128fb.c | 1 - drivers/video/fbdev/aty/atyfb_base.c | 3 +-- drivers/video/fbdev/aty/radeon_base.c | 3 +-- drivers/video/fbdev/broadsheetfb.c | 2 +- drivers/video/fbdev/bw2.c | 1 - drivers/video/fbdev/carminefb.c| 1 - drivers/video/fbdev/cg14.c | 2 +- drivers/video/fbdev/cg3.c | 1 - drivers/video/fbdev/cg6.c | 2 +- drivers/video/fbdev/chipsfb.c | 1 - drivers/video/fbdev/cirrusfb.c | 3 +-- drivers/video/fbdev/clps711x-fb.c | 1 - drivers/video/fbdev/cobalt_lcdfb.c | 1 - drivers/video/fbdev/controlfb.c| 2 +- drivers/video/fbdev/core/fb_info.c | 3 ++- drivers/video/fbdev/cyber2000fb.c | 2 +- drivers/video/fbdev/da8xx-fb.c | 1 - drivers/video/fbdev/efifb.c| 1 - drivers/video/fbdev/ep93xx-fb.c| 1 - drivers/video/fbdev/ffb.c | 3 +-- drivers/video/fbdev/fm2fb.c| 1 - drivers/video/fbdev/fsl-diu-fb.c | 2 +- drivers/video/fbdev/g364fb.c | 2 +- drivers/video/fbdev/gbefb.c| 1 - drivers/video/fbdev/geode/gx1fb_core.c | 1 - drivers/video/fbdev/geode/gxfb_core.c | 1 - drivers/video/fbdev/geode/lxfb_core.c | 1 - drivers/video/fbdev/goldfishfb.c | 1 - drivers/video/fbdev/grvga.c| 2 +- drivers/video/fbdev/gxt4500.c | 3 +-- drivers/video/fbdev/hecubafb.c | 2 +- drivers/video/fbdev/hgafb.c
[PATCH v3 02/18] fbdev: Remove flag FBINFO_DEFAULT from fbdev drivers
The flag FBINFO_DEFAULT is 0 and has no effect, as struct fbinfo.flags has been allocated to zero by a static declaration. So do not set it. Flags should signal differences from the default values. After cleaning up all occurrences of FBINFO_DEFAULT, the token will be removed. v2: * fix commit message (Miguel) Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Helge Deller --- drivers/video/fbdev/68328fb.c | 2 +- drivers/video/fbdev/acornfb.c | 2 +- drivers/video/fbdev/g364fb.c | 2 +- drivers/video/fbdev/hpfb.c | 1 - drivers/video/fbdev/macfb.c| 1 - drivers/video/fbdev/maxinefb.c | 1 - 6 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/68328fb.c b/drivers/video/fbdev/68328fb.c index 07d6e8dc686b..956dd2399cc0 100644 --- a/drivers/video/fbdev/68328fb.c +++ b/drivers/video/fbdev/68328fb.c @@ -448,7 +448,7 @@ static int __init mc68x328fb_init(void) fb_info.var.red.offset = fb_info.var.green.offset = fb_info.var.blue.offset = 0; } fb_info.pseudo_palette = _pseudo_palette; - fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; + fb_info.flags = FBINFO_HWACCEL_YPAN; if (fb_alloc_cmap(_info.cmap, 256, 0)) return -ENOMEM; diff --git a/drivers/video/fbdev/acornfb.c b/drivers/video/fbdev/acornfb.c index 1b72edc01cfb..8fec21dfca09 100644 --- a/drivers/video/fbdev/acornfb.c +++ b/drivers/video/fbdev/acornfb.c @@ -694,7 +694,7 @@ static void acornfb_init_fbinfo(void) first = 0; fb_info.fbops = _ops; - fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; + fb_info.flags = FBINFO_HWACCEL_YPAN; fb_info.pseudo_palette = current_par.pseudo_palette; strcpy(fb_info.fix.id, "Acorn"); diff --git a/drivers/video/fbdev/g364fb.c b/drivers/video/fbdev/g364fb.c index c5b7673ddc6c..0825cbde116e 100644 --- a/drivers/video/fbdev/g364fb.c +++ b/drivers/video/fbdev/g364fb.c @@ -219,7 +219,7 @@ int __init g364fb_init(void) fb_info.screen_base = (char *) G364_MEM_BASE; /* virtual kernel address */ fb_info.var = fb_var; fb_info.fix = fb_fix; - fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; + fb_info.flags = FBINFO_HWACCEL_YPAN; fb_alloc_cmap(_info.cmap, 255, 0); diff --git a/drivers/video/fbdev/hpfb.c b/drivers/video/fbdev/hpfb.c index 77fbff47b1a8..406c1383cbda 100644 --- a/drivers/video/fbdev/hpfb.c +++ b/drivers/video/fbdev/hpfb.c @@ -287,7 +287,6 @@ static int hpfb_init_one(unsigned long phys_base, unsigned long virt_base) else strcat(fb_info.fix.id, "Catseye"); fb_info.fbops = _ops; - fb_info.flags = FBINFO_DEFAULT; fb_info.var = hpfb_defined; fb_info.screen_base = (char *)fb_start; diff --git a/drivers/video/fbdev/macfb.c b/drivers/video/fbdev/macfb.c index 44ff860a3f37..5ca208d992cc 100644 --- a/drivers/video/fbdev/macfb.c +++ b/drivers/video/fbdev/macfb.c @@ -876,7 +876,6 @@ static int __init macfb_init(void) fb_info.var = macfb_defined; fb_info.fix = macfb_fix; fb_info.pseudo_palette = pseudo_palette; - fb_info.flags = FBINFO_DEFAULT; err = fb_alloc_cmap(_info.cmap, video_cmap_len, 0); if (err) diff --git a/drivers/video/fbdev/maxinefb.c b/drivers/video/fbdev/maxinefb.c index 4e6b05232ae2..0ac1873b2acb 100644 --- a/drivers/video/fbdev/maxinefb.c +++ b/drivers/video/fbdev/maxinefb.c @@ -155,7 +155,6 @@ int __init maxinefb_init(void) fb_info.screen_base = (char *)maxinefb_fix.smem_start; fb_info.var = maxinefb_defined; fb_info.fix = maxinefb_fix; - fb_info.flags = FBINFO_DEFAULT; fb_alloc_cmap(_info.cmap, 256, 0); -- 2.41.0
Re: [PATCH v2 02/10] docs: ABI: sysfs-bus-event_source-devices-hv_gpci: Document processor_bus_topology sysfs interface file
Thanks Randy for the review comments, I will do these updates for all documentation patches in my next version of patchset. Thanks, Kajol Jain On 7/12/23 02:22, Randy Dunlap wrote: > Hi-- > > On 7/10/23 02:27, Kajol Jain wrote: >> Add details of the new hv-gpci interface file called >> "processor_bus_topology" in the ABI documentation. >> >> Signed-off-by: Kajol Jain >> --- >> .../sysfs-bus-event_source-devices-hv_gpci| 32 +++ >> 1 file changed, 32 insertions(+) >> >> diff --git >> a/Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_gpci >> b/Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_gpci >> index 12e2bf92783f..2eeeab9a20fa 100644 >> --- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_gpci >> +++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-hv_gpci >> @@ -80,3 +80,35 @@ Contact: Linux on PowerPC Developer List >> >> Description:read only >> This sysfs file exposes the cpumask which is designated to make >> HCALLs to retrieve hv-gpci pmu event counter data. >> + >> +What: /sys/devices/hv_gpci/interface/processor_bus_topology >> +Date: July 2023 >> +Contact:Linux on PowerPC Developer List >> +Description:admin read only >> +This sysfs file exposes the system topology information by >> making HCALL >> +H_GET_PERF_COUNTER_INFO. The HCALL is made with counter request >> value >> +PROCESSOR_BUS_TOPOLOGY(0xD0). >> + >> +* This sysfs file will be created only for power10 and above >> platforms. >> + >> +* User needs root privileges to read data from this sysfs file. >> + >> +* This sysfs file will be created, only when the HCALL returns >> "H_SUCESS", > > > H_SUCCESS > >> + "H_AUTHORITY" and "H_PARAMETER" as the return type. > > s/and/or/ > >> + >> + HCALL with return error type "H_AUTHORITY", can be resolved >> during > >Drop the comma ^ > >> + runtime by setting "Enable Performance Information >> Collection" option. >> + >> +* The end user reading this sysfs file must decode the content >> as per >> + underlying platform/firmware. >> + >> +Possible error codes while reading this sysfs file: >> + >> +* "-EPERM" : Partition is not permitted to retrieve performance >> information, >> +required to set "Enable Performance Information >> Collection" option. >> + >> +* "-EIO" : Can't retrieve system information because of invalid >> buffer length/invalid address >> + or because of some hardware error. Refer >> getPerfCountInfo documentation for > > Refer to > >> + more information. >> + >> +* "-EFBIG" : System information exceeds PAGE_SIZE. >