backports: updates for next-20130429
cover backports: updates for next-20130429
From: "Luis R. Rodriguez" <[email protected]>
Here are 3 updates for next-20130429. I believe the last fix we need is for nouveau drivers due to driver changes that throw files around to subdirectories and these not being read for some reason through backports.
Luis R. Rodriguez (3):
backports: revert remove_proc_subtree() for backport
backports: add PDE_DATA() case when CONFIG_PROC_FS is disabled
backports: add proc_set_size() and proc_set_user()
backport/backport-include/linux/proc_fs.h | 12 +++- backport/compat/backport-3.10.c | 23 ++++++- .../drm/12-revert-remove_proc_subtree/INFO | 25 ++++++++ .../drivers_gpu_drm_drm_proc.patch | 64 ++++++++++++++++++++ 4 files changed, 120 insertions(+), 4 deletions(-) create mode 100644 patches/collateral-evolutions/drm/12-revert-remove_proc_subtree/INFO create mode 100644 patches/collateral-evolutions/drm/12-revert-remove_proc_subtree/drivers_gpu_drm_drm_proc.patch
Signature · 1 line
1.7.10.4
PATCH 1/3 backports: revert remove_proc_subtree() for backport
From: "Luis R. Rodriguez" <[email protected]>
Intorduced in next-20130429 and Linus has merged it onto v3.10-rc1. We cannot backport remove_proc_subtree() modularly [0] so just go ahead and revert this change.
The alternative is to go and review each procfs usage for each driver we have issues and see if it makes sense to replace procs with debugfs upstream.
commit 8ce584c7416d8a85a6f3edc17d1cddefe331e87e
Author: Al Viro <[email protected]> Date: Sat Mar 30 20:13:46 2013 -0400
procfs: add proc_remove_subtree()
just what it sounds like; do that only to procfs subtrees you've created - doing that to something shared with another driver is not only antisocial, but might cause interesting races with proc_create() and its ilk.
[0] http://marc.info/?t=136841961600002&r=1&w=2
--- .../drm/12-revert-remove_proc_subtree/INFO | 25 ++++++++ .../drivers_gpu_drm_drm_proc.patch | 64 ++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 patches/collateral-evolutions/drm/12-revert-remove_proc_subtree/INFO create mode 100644 patches/collateral-evolutions/drm/12-revert-remove_proc_subtree/drivers_gpu_drm_drm_proc.patch
patches/collateral-evolutions/drm/12-revert-remove_proc_subtree/INFO new file +25 -0
@@ -0,0 +1,25 @@ +We cannot backport remove_proc_subtree() modularly so the +only thing we can do is revert its usage. This patch reverts +all of its usage and the commits that added them are listed +below. + +Another thing we could do is look at each driver's usage of +proc and see if its reasonable to instead covert it to use +debugfs. This needs to be dealt with on a case by case basis. + +From 8bc742e13fb2c9cd64988816749295e9ddf53101 Mon Sep 17 00:00:00 2001 +From: David Howells <[email protected]> +Date: Fri, 12 Apr 2013 16:15:07 +0100 +Subject: [PATCH] drm: proc: Use remove_proc_subtree() + +Use remove_proc_subtree() rather than remove_proc_entry() to remove a +minor-specific drm proc directory and all its children. + +Things could theoretically be improved by storing the drm_minor pointer in the +minor-specific dir proc_dir_entry struct data and then scrapping the list of +proc files - but that's shared with the debugfs interface where you can't do +that, so I don't see an easy way of doing it. + +Signed-off-by: David Howells <[email protected]> +cc: [email protected] +Signed-off-by: Al Viro <[email protected]>
patches/collateral-evolutions/drm/12-revert-remove_proc_subtree/drivers_gpu_drm_drm_proc.patch new file +64 -0
64 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH 2/3 backports: add PDE_DATA() case when CONFIG_PROC_FS is disabled
In reply to Luis R. RodriguezFrom: "Luis R. Rodriguez" <[email protected]>
This was missing.
--- backport/backport-include/linux/proc_fs.h | 3 +++ 1 file changed, 3 insertions(+)
backport/backport-include/linux/proc_fs.h +3 -0
@@ -4,6 +4,7 @@#include <linux/version.h> #if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,10 ,0 ) +#ifdef CONFIG_PROC_FS /* * backport of: * procfs: new helper - PDE_DATA(inode)
@@ -12,6 +13,8 @@ static inline void *PDE_DATA(const struct inode *inode) {return PROC_I (inode)->pde->data; } +#else +static inline void *PDE_DATA (const struct inode *inode) {BUG ();return NULL ;}#endif #endif /* __BACKPORT_PROC_FS_H */
Signature · 1 line
1.7.10.4
PATCH 3/3 backports: add proc_set_size() and proc_set_user()
In reply to Luis R. RodriguezFrom: "Luis R. Rodriguez" <[email protected]>
mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains 271a15ea v3.10-rc1~129^2~24
commit 271a15eabe094538d958dc68ccfc9c36b699247a
Author: David Howells <[email protected]> Date: Fri Apr 12 00:38:51 2013 +0100
proc: Supply PDE attribute setting accessor functions
Supply accessor functions to set attributes in proc_dir_entry structs.
The following are supplied: proc_set_size() and proc_set_user().
--- backport/backport-include/linux/proc_fs.h | 9 ++++++++- backport/compat/backport-3.10.c | 23 ++++++++++++++++++++--- 2 files changed, 28 insertions(+), 4 deletions(-)
backport/backport-include/linux/proc_fs.h +8 -1
@@ -4,6 +4,7 @@#include <linux/version.h> #if LINUX_VERSION_CODE <KERNEL_VERSION (3 ,10 ,0 ) +#ifdef CONFIG_PROC_FS /* * backport of:
@@ -13,8 +14,14 @@ static inline void *PDE_DATA(const struct inode *inode) {return PROC_I (inode)->pde->data; } +extern void proc_set_size (struct proc_dir_entry *,loff_t ); +extern void proc_set_user (struct proc_dir_entry *,kuid_t ,kgid_t );#else static inline void *PDE_DATA (const struct inode *inode) {BUG ();return NULL ;} -#endif +static inline void proc_set_size (struct proc_dir_entry *de,loff_t size) {} +static inline void proc_set_user (struct proc_dir_entry *de,kuid_t uid,kgid_t gid) {} +#endif /* CONFIG_PROC_FS */ + +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) */ #endif /* __BACKPORT_PROC_FS_H */
backport/compat/backport-3.10.c +20 -3
@@ -8,14 +8,17 @@* published by the Free Software Foundation. */ -#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,6 ,0 ))#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/err.h> +#include <linux/proc_fs.h> + +#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,6 ,0 ))#include <linux/init.h> #include <linux/debugfs.h> #include <linux/device.h> #include <linux/slab.h> #include <linux/async.h> -#include <linux/err.h> #include <linux/mutex.h> #include <linux/suspend.h> #include <linux/delay.h>
@@ -26,8 +29,9 @@#include <linux/regulator/consumer.h> #include <linux/regulator/driver.h> #include <linux/regulator/machine.h> -#include <linux/module.h> +#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) */ +#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,6 ,0 ))/** * regulator_map_voltage_ascend - map_voltage() for ascendant voltage list *
@@ -60,3 +64,16 @@ int regulator_map_voltage_ascend(struct regulator_dev *rdev,EXPORT_SYMBOL_GPL (regulator_map_voltage_ascend);#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)) */ + +void proc_set_size (struct proc_dir_entry *de,loff_t size) +{ + de->size = size; +} +EXPORT_SYMBOL_GPL (proc_set_size); + +void proc_set_user (struct proc_dir_entry *de,kuid_t uid,kgid_t gid) +{ + de->uid = uid; + de->gid = gid; +} +EXPORT_SYMBOL_GPL (proc_set_user);
Signature · 1 line
1.7.10.4
Quoted 3 lines · Luis R. Rodriguez
From: "Luis R. Rodriguez" <[email protected]>
Here are 3 updates for next-20130429.
Ignore this, I'll send a new series and I think I've fixed the nouveau compilation problems.
Luis