mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: rbtree: Undo augmented trees performance damage and regression x86, Calgary: Limit the max PHB number to 256
This commit is contained in:
commit
47a716cf0c
4 changed files with 88 additions and 79 deletions
|
|
@ -110,7 +110,6 @@ struct rb_node
|
|||
struct rb_root
|
||||
{
|
||||
struct rb_node *rb_node;
|
||||
void (*augment_cb)(struct rb_node *node);
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -130,9 +129,7 @@ static inline void rb_set_color(struct rb_node *rb, int color)
|
|||
rb->rb_parent_color = (rb->rb_parent_color & ~1) | color;
|
||||
}
|
||||
|
||||
#define RB_ROOT (struct rb_root) { NULL, NULL, }
|
||||
#define RB_AUGMENT_ROOT(x) (struct rb_root) { NULL, x}
|
||||
|
||||
#define RB_ROOT (struct rb_root) { NULL, }
|
||||
#define rb_entry(ptr, type, member) container_of(ptr, type, member)
|
||||
|
||||
#define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL)
|
||||
|
|
@ -142,6 +139,14 @@ static inline void rb_set_color(struct rb_node *rb, int color)
|
|||
extern void rb_insert_color(struct rb_node *, struct rb_root *);
|
||||
extern void rb_erase(struct rb_node *, struct rb_root *);
|
||||
|
||||
typedef void (*rb_augment_f)(struct rb_node *node, void *data);
|
||||
|
||||
extern void rb_augment_insert(struct rb_node *node,
|
||||
rb_augment_f func, void *data);
|
||||
extern struct rb_node *rb_augment_erase_begin(struct rb_node *node);
|
||||
extern void rb_augment_erase_end(struct rb_node *node,
|
||||
rb_augment_f func, void *data);
|
||||
|
||||
/* Find logical next and previous nodes in a tree */
|
||||
extern struct rb_node *rb_next(const struct rb_node *);
|
||||
extern struct rb_node *rb_prev(const struct rb_node *);
|
||||
|
|
|
|||
Loading…
Reference in a new issue