Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25028
b: refs/heads/master
c: 6f25f39
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller authored and David S. Miller committed Apr 1, 2006
1 parent 9594ab7 commit 3288a99
Show file tree
Hide file tree
Showing 46 changed files with 862 additions and 1,841 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bacd3add087770333bdce65cd3dd25e3b2cd67ac
refs/heads/master: 6f25f3986af0353b0bdc220f79b89c997d0ceda4
1 change: 0 additions & 1 deletion trunk/arch/powerpc/kernel/systbl.S
Original file line number Diff line number Diff line change
Expand Up @@ -322,4 +322,3 @@ SYSCALL(spu_create)
COMPAT_SYS(pselect6)
COMPAT_SYS(ppoll)
SYSCALL(unshare)
SYSCALL(splice)
9 changes: 8 additions & 1 deletion trunk/arch/sparc64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,9 +830,16 @@ void smp_call_function_client(int irq, struct pt_regs *regs)

static void tsb_sync(void *info)
{
struct trap_per_cpu *tp = &trap_block[raw_smp_processor_id()];
struct mm_struct *mm = info;

if (current->active_mm == mm)
/* It is not valid to test "currrent->active_mm == mm" here.
*
* The value of "current" is not changed atomically with
* switch_mm(). But that's OK, we just need to check the
* current cpu's trap block PGD physical address.
*/
if (tp->pgd_paddr == __pa(mm->pgd))
tsb_context_switch(mm);
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/arcnet/com90xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ static void __init com90xx_probe(void)
if (!io && !irq && !shmem && !*device && com90xx_skip_probe)
return;

shmems = kzalloc(((0x100000-0xa0000) / 0x800) * sizeof(unsigned long),
shmems = kzalloc(((0x10000-0xa0000) / 0x800) * sizeof(unsigned long),
GFP_KERNEL);
if (!shmems)
return;
iomem = kzalloc(((0x100000-0xa0000) / 0x800) * sizeof(void __iomem *),
iomem = kzalloc(((0x10000-0xa0000) / 0x800) * sizeof(void __iomem *),
GFP_KERNEL);
if (!iomem) {
kfree(shmems);
Expand Down
57 changes: 32 additions & 25 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@

#define DRV_MODULE_NAME "tg3"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "3.56"
#define DRV_MODULE_RELDATE "Apr 1, 2006"
#define DRV_MODULE_VERSION "3.55"
#define DRV_MODULE_RELDATE "Mar 27, 2006"

#define TG3_DEF_MAC_MODE 0
#define TG3_DEF_RX_MODE 0
Expand Down Expand Up @@ -497,33 +497,40 @@ static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val)
unsigned long flags;

spin_lock_irqsave(&tp->indirect_lock, flags);
pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, off);
pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val);
if (tp->write32 != tg3_write_indirect_reg32) {
tw32_f(TG3PCI_MEM_WIN_BASE_ADDR, off);
tw32_f(TG3PCI_MEM_WIN_DATA, val);

/* Always leave this as zero. */
pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0);
spin_unlock_irqrestore(&tp->indirect_lock, flags);
}
/* Always leave this as zero. */
tw32_f(TG3PCI_MEM_WIN_BASE_ADDR, 0);
} else {
pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, off);
pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val);

static void tg3_write_mem_fast(struct tg3 *tp, u32 off, u32 val)
{
/* If no workaround is needed, write to mem space directly */
if (tp->write32 != tg3_write_indirect_reg32)
tw32(NIC_SRAM_WIN_BASE + off, val);
else
tg3_write_mem(tp, off, val);
/* Always leave this as zero. */
pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0);
}
spin_unlock_irqrestore(&tp->indirect_lock, flags);
}

static void tg3_read_mem(struct tg3 *tp, u32 off, u32 *val)
{
unsigned long flags;

spin_lock_irqsave(&tp->indirect_lock, flags);
pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, off);
pci_read_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val);
if (tp->write32 != tg3_write_indirect_reg32) {
tw32_f(TG3PCI_MEM_WIN_BASE_ADDR, off);
*val = tr32(TG3PCI_MEM_WIN_DATA);

/* Always leave this as zero. */
pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0);
/* Always leave this as zero. */
tw32_f(TG3PCI_MEM_WIN_BASE_ADDR, 0);
} else {
pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, off);
pci_read_config_dword(tp->pdev, TG3PCI_MEM_WIN_DATA, val);

/* Always leave this as zero. */
pci_write_config_dword(tp->pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0);
}
spin_unlock_irqrestore(&tp->indirect_lock, flags);
}

Expand Down Expand Up @@ -1367,12 +1374,12 @@ static int tg3_set_power_state(struct tg3 *tp, pci_power_t state)
}
}

tg3_write_sig_post_reset(tp, RESET_KIND_SHUTDOWN);

/* Finally, set the new power state. */
pci_write_config_word(tp->pdev, pm + PCI_PM_CTRL, power_control);
udelay(100); /* Delay after power state change */

tg3_write_sig_post_reset(tp, RESET_KIND_SHUTDOWN);

return 0;
}

Expand Down Expand Up @@ -6540,11 +6547,11 @@ static void tg3_timer(unsigned long __opaque)
if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) {
u32 val;

tg3_write_mem_fast(tp, NIC_SRAM_FW_CMD_MBOX,
FWCMD_NICDRV_ALIVE2);
tg3_write_mem_fast(tp, NIC_SRAM_FW_CMD_LEN_MBOX, 4);
tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX,
FWCMD_NICDRV_ALIVE2);
tg3_write_mem(tp, NIC_SRAM_FW_CMD_LEN_MBOX, 4);
/* 5 seconds timeout */
tg3_write_mem_fast(tp, NIC_SRAM_FW_CMD_DATA_MBOX, 5);
tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX, 5);
val = tr32(GRC_RX_CPU_EVENT);
val |= (1 << 14);
tw32(GRC_RX_CPU_EVENT, val);
Expand Down
25 changes: 4 additions & 21 deletions trunk/fs/splice.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static struct pipe_buf_operations page_cache_pipe_buf_ops = {

static ssize_t move_to_pipe(struct inode *inode, struct page **pages,
int nr_pages, unsigned long offset,
unsigned long len, unsigned int flags)
unsigned long len)
{
struct pipe_inode_info *info;
int ret, do_wakeup, i;
Expand Down Expand Up @@ -159,12 +159,6 @@ static ssize_t move_to_pipe(struct inode *inode, struct page **pages,
break;
}

if (flags & SPLICE_F_NONBLOCK) {
if (!ret)
ret = -EAGAIN;
break;
}

if (signal_pending(current)) {
if (!ret)
ret = -ERESTARTSYS;
Expand Down Expand Up @@ -197,7 +191,7 @@ static ssize_t move_to_pipe(struct inode *inode, struct page **pages,
}

static int __generic_file_splice_read(struct file *in, struct inode *pipe,
size_t len, unsigned int flags)
size_t len)
{
struct address_space *mapping = in->f_mapping;
unsigned int offset, nr_pages;
Expand Down Expand Up @@ -285,7 +279,7 @@ static int __generic_file_splice_read(struct file *in, struct inode *pipe,
* Now we splice them into the pipe..
*/
splice_them:
return move_to_pipe(pipe, pages, i, offset, len, flags);
return move_to_pipe(pipe, pages, i, offset, len);
}

ssize_t generic_file_splice_read(struct file *in, struct inode *pipe,
Expand All @@ -297,19 +291,14 @@ ssize_t generic_file_splice_read(struct file *in, struct inode *pipe,
ret = 0;
spliced = 0;
while (len) {
ret = __generic_file_splice_read(in, pipe, len, flags);
ret = __generic_file_splice_read(in, pipe, len);

if (ret <= 0)
break;

in->f_pos += ret;
len -= ret;
spliced += ret;

if (!(flags & SPLICE_F_NONBLOCK))
continue;
ret = -EAGAIN;
break;
}

if (spliced)
Expand Down Expand Up @@ -538,12 +527,6 @@ static ssize_t move_from_pipe(struct inode *inode, struct file *out,
break;
}

if (flags & SPLICE_F_NONBLOCK) {
if (!ret)
ret = -EAGAIN;
break;
}

if (signal_pending(current)) {
if (!ret)
ret = -ERESTARTSYS;
Expand Down
67 changes: 0 additions & 67 deletions trunk/include/linux/netfilter/x_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,6 @@ struct xt_counters_info
#define ASSERT_WRITE_LOCK(x)
#include <linux/netfilter_ipv4/listhelp.h>

#ifdef CONFIG_COMPAT
#define COMPAT_TO_USER 1
#define COMPAT_FROM_USER -1
#define COMPAT_CALC_SIZE 0
#endif

struct xt_match
{
struct list_head list;
Expand Down Expand Up @@ -181,9 +175,6 @@ struct xt_match
void (*destroy)(const struct xt_match *match, void *matchinfo,
unsigned int matchinfosize);

/* Called when userspace align differs from kernel space one */
int (*compat)(void *match, void **dstptr, int *size, int convert);

/* Set this to THIS_MODULE if you are a module, otherwise NULL */
struct module *me;

Expand Down Expand Up @@ -229,9 +220,6 @@ struct xt_target
void (*destroy)(const struct xt_target *target, void *targinfo,
unsigned int targinfosize);

/* Called when userspace align differs from kernel space one */
int (*compat)(void *target, void **dstptr, int *size, int convert);

/* Set this to THIS_MODULE if you are a module, otherwise NULL */
struct module *me;

Expand Down Expand Up @@ -326,61 +314,6 @@ extern void xt_proto_fini(int af);
extern struct xt_table_info *xt_alloc_table_info(unsigned int size);
extern void xt_free_table_info(struct xt_table_info *info);

#ifdef CONFIG_COMPAT
#include <net/compat.h>

struct compat_xt_entry_match
{
union {
struct {
u_int16_t match_size;
char name[XT_FUNCTION_MAXNAMELEN - 1];
u_int8_t revision;
} user;
u_int16_t match_size;
} u;
unsigned char data[0];
};

struct compat_xt_entry_target
{
union {
struct {
u_int16_t target_size;
char name[XT_FUNCTION_MAXNAMELEN - 1];
u_int8_t revision;
} user;
u_int16_t target_size;
} u;
unsigned char data[0];
};

/* FIXME: this works only on 32 bit tasks
* need to change whole approach in order to calculate align as function of
* current task alignment */

struct compat_xt_counters
{
u_int32_t cnt[4];
};

struct compat_xt_counters_info
{
char name[XT_TABLE_MAXNAMELEN];
compat_uint_t num_counters;
struct compat_xt_counters counters[0];
};

#define COMPAT_XT_ALIGN(s) (((s) + (__alignof__(struct compat_xt_counters)-1)) \
& ~(__alignof__(struct compat_xt_counters)-1))

extern void xt_compat_lock(int af);
extern void xt_compat_unlock(int af);
extern int xt_compat_match(void *match, void **dstptr, int *size, int convert);
extern int xt_compat_target(void *target, void **dstptr, int *size,
int convert);

#endif /* CONFIG_COMPAT */
#endif /* __KERNEL__ */

#endif /* _X_TABLES_H */
14 changes: 0 additions & 14 deletions trunk/include/linux/netfilter/xt_esp.h

This file was deleted.

30 changes: 0 additions & 30 deletions trunk/include/linux/netfilter/xt_multiport.h

This file was deleted.

18 changes: 0 additions & 18 deletions trunk/include/linux/netfilter_ipv4/ip_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,23 +316,5 @@ extern unsigned int ipt_do_table(struct sk_buff **pskb,
void *userdata);

#define IPT_ALIGN(s) XT_ALIGN(s)

#ifdef CONFIG_COMPAT
#include <net/compat.h>

struct compat_ipt_entry
{
struct ipt_ip ip;
compat_uint_t nfcache;
u_int16_t target_offset;
u_int16_t next_offset;
compat_uint_t comefrom;
struct compat_xt_counters counters;
unsigned char elems[0];
};

#define COMPAT_IPT_ALIGN(s) COMPAT_XT_ALIGN(s)

#endif /* CONFIG_COMPAT */
#endif /*__KERNEL__*/
#endif /* _IPTABLES_H */
Loading

0 comments on commit 3288a99

Please sign in to comment.