Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10048
b: refs/heads/master
c: b2640b4
h: refs/heads/master
v: v3
  • Loading branch information
Matt Reimer authored and Russell King committed Oct 20, 2005
1 parent 4b300c3 commit 01b9c5a
Show file tree
Hide file tree
Showing 15 changed files with 74 additions and 50 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: cffc7b38a23960d5f83b0aec5e67f189a6ae8062
refs/heads/master: b2640b420a806c91f6b8799314ca96bb88a246d2
20 changes: 20 additions & 0 deletions trunk/arch/arm/mach-pxa/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,25 @@ void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info)
i2c_device.dev.platform_data = info;
}

static struct resource i2s_resources[] = {
{
.start = 0x40400000,
.end = 0x40400083,
.flags = IORESOURCE_MEM,
}, {
.start = IRQ_I2S,
.end = IRQ_I2S,
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device i2s_device = {
.name = "pxa2xx-i2s",
.id = -1,
.resource = i2c_resources,
.num_resources = ARRAY_SIZE(i2s_resources),
};

static struct platform_device *devices[] __initdata = {
&pxamci_device,
&udc_device,
Expand All @@ -258,6 +277,7 @@ static struct platform_device *devices[] __initdata = {
&btuart_device,
&stuart_device,
&i2c_device,
&i2s_device,
};

static int __init pxa_init(void)
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ppc64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ void div128_by_32( unsigned long dividend_high, unsigned long dividend_low,
rb = ((ra + b) - (x * divisor)) << 32;

y = (rb + c)/divisor;
rc = ((rb + c) - (y * divisor)) << 32;
rc = ((rb + b) - (y * divisor)) << 32;

z = (rc + d)/divisor;

Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/ppc64/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,8 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long ea,
if (cpus_equal(vma->vm_mm->cpu_vm_mask, tmp))
local = 1;

__hash_page(ea, 0, vsid, ptep, 0x300, local);
__hash_page(ea, pte_val(pte) & (_PAGE_USER|_PAGE_RW), vsid, ptep,
0x300, local);
local_irq_restore(flags);
}

Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/char/drm/drm_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ static __inline__ struct page *drm_do_vm_shm_nopage(struct vm_area_struct *vma,

offset = address - vma->vm_start;
i = (unsigned long)map->handle + offset;
page = (map->type == _DRM_CONSISTENT) ?
virt_to_page((void *)i) : vmalloc_to_page((void *)i);
page = vmalloc_to_page((void *)i);
if (!page)
return NOPAGE_OOM;
get_page(page);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/drm/mga_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static inline u32 _MGA_READ(u32 *addr)
#define MGA_EMIT_STATE( dev_priv, dirty ) \
do { \
if ( (dirty) & ~MGA_UPLOAD_CLIPRECTS ) { \
if ( dev_priv->chipset >= MGA_CARD_TYPE_G400 ) { \
if ( dev_priv->chipset == MGA_CARD_TYPE_G400 ) { \
mga_g400_emit_state( dev_priv ); \
} else { \
mga_g200_emit_state( dev_priv ); \
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/drm/mga_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static void mga_emit_clip_rect( drm_mga_private_t *dev_priv,

/* Force reset of DWGCTL on G400 (eliminates clip disable bit).
*/
if (dev_priv->chipset >= MGA_CARD_TYPE_G400) {
if (dev_priv->chipset == MGA_CARD_TYPE_G400) {
DMA_BLOCK(MGA_DWGCTL, ctx->dwgctl,
MGA_LEN + MGA_EXEC, 0x80000000,
MGA_DWGCTL, ctx->dwgctl,
Expand Down
12 changes: 4 additions & 8 deletions trunk/drivers/message/fusion/mptsas.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ static void mptsas_print_device_pg0(SasDevicePage0_t *pg0)
printk("SAS Address=0x%llX\n", le64_to_cpu(sas_address));
printk("Target ID=0x%X\n", pg0->TargetID);
printk("Bus=0x%X\n", pg0->Bus);
printk("Parent Phy Num=0x%X\n", pg0->PhyNum);
printk("Access Status=0x%X\n", le16_to_cpu(pg0->AccessStatus));
printk("PhyNum=0x%X\n", pg0->PhyNum);
printk("AccessStatus=0x%X\n", le16_to_cpu(pg0->AccessStatus));
printk("Device Info=0x%X\n", le32_to_cpu(pg0->DeviceInfo));
printk("Flags=0x%X\n", le16_to_cpu(pg0->Flags));
printk("Physical Port=0x%X\n", pg0->PhysicalPort);
Expand All @@ -270,7 +270,7 @@ static void mptsas_print_expander_pg1(SasExpanderPage1_t *pg1)
printk("---- SAS EXPANDER PAGE 1 ------------\n");

printk("Physical Port=0x%X\n", pg1->PhysicalPort);
printk("PHY Identifier=0x%X\n", pg1->PhyIdentifier);
printk("PHY Identifier=0x%X\n", pg1->Phy);
printk("Negotiated Link Rate=0x%X\n", pg1->NegotiatedLinkRate);
printk("Programmed Link Rate=0x%X\n", pg1->ProgrammedLinkRate);
printk("Hardware Link Rate=0x%X\n", pg1->HwLinkRate);
Expand Down Expand Up @@ -604,7 +604,7 @@ mptsas_sas_expander_pg1(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info,
mptsas_print_expander_pg1(buffer);

/* save config data */
phy_info->phy_id = buffer->PhyIdentifier;
phy_info->phy_id = buffer->Phy;
phy_info->port_id = buffer->PhysicalPort;
phy_info->negotiated_link_rate = buffer->NegotiatedLinkRate;
phy_info->programmed_link_rate = buffer->ProgrammedLinkRate;
Expand Down Expand Up @@ -825,8 +825,6 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc, int *index)
mptsas_sas_device_pg0(ioc, &port_info->phy_info[i].identify,
(MPI_SAS_DEVICE_PGAD_FORM_GET_NEXT_HANDLE <<
MPI_SAS_DEVICE_PGAD_FORM_SHIFT), handle);
port_info->phy_info[i].identify.phy_id =
port_info->phy_info[i].phy_id;
handle = port_info->phy_info[i].identify.handle;

if (port_info->phy_info[i].attached.handle) {
Expand Down Expand Up @@ -883,8 +881,6 @@ mptsas_probe_expander_phys(MPT_ADAPTER *ioc, u32 *handle, int *index)
(MPI_SAS_DEVICE_PGAD_FORM_HANDLE <<
MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
port_info->phy_info[i].identify.handle);
port_info->phy_info[i].identify.phy_id =
port_info->phy_info[i].phy_id;
}

if (port_info->phy_info[i].attached.handle) {
Expand Down
16 changes: 13 additions & 3 deletions trunk/include/linux/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ int is_hugepage_mem_enough(size_t);
unsigned long hugetlb_total_pages(void);
struct page *alloc_huge_page(void);
void free_huge_page(struct page *);
int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, int write_access);

extern unsigned long max_huge_pages;
extern const unsigned long hugetlb_zero, hugetlb_infinity;
Expand Down Expand Up @@ -101,7 +99,6 @@ static inline unsigned long hugetlb_total_pages(void)
do { } while (0)
#define alloc_huge_page() ({ NULL; })
#define free_huge_page(p) ({ (void)(p); BUG(); })
#define hugetlb_fault(mm, vma, addr, write) ({ BUG(); 0; })

#ifndef HPAGE_MASK
#define HPAGE_MASK 0 /* Keep the compiler happy */
Expand Down Expand Up @@ -158,11 +155,24 @@ static inline void set_file_hugepages(struct file *file)
{
file->f_op = &hugetlbfs_file_operations;
}

static inline int valid_hugetlb_file_off(struct vm_area_struct *vma,
unsigned long address)
{
struct inode *inode = vma->vm_file->f_dentry->d_inode;
loff_t file_off = address - vma->vm_start;

file_off += (vma->vm_pgoff << PAGE_SHIFT);

return (file_off < inode->i_size);
}

#else /* !CONFIG_HUGETLBFS */

#define is_file_hugepages(file) 0
#define set_file_hugepages(file) BUG()
#define hugetlb_zero_setup(size) ERR_PTR(-ENOSYS)
#define valid_hugetlb_file_off(vma, address) 0

#endif /* !CONFIG_HUGETLBFS */

Expand Down
22 changes: 0 additions & 22 deletions trunk/mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,28 +394,6 @@ int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma)
return ret;
}

/*
* On ia64 at least, it is possible to receive a hugetlb fault from a
* stale zero entry left in the TLB from earlier hardware prefetching.
* Low-level arch code should already have flushed the stale entry as
* part of its fault handling, but we do need to accept this minor fault
* and return successfully. Whereas the "normal" case is that this is
* an access to a hugetlb page which has been truncated off since mmap.
*/
int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, int write_access)
{
int ret = VM_FAULT_SIGBUS;
pte_t *pte;

spin_lock(&mm->page_table_lock);
pte = huge_pte_offset(mm, address);
if (pte && !pte_none(*pte))
ret = VM_FAULT_MINOR;
spin_unlock(&mm->page_table_lock);
return ret;
}

int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
struct page **pages, struct vm_area_struct **vmas,
unsigned long *position, int *length, int i)
Expand Down
14 changes: 12 additions & 2 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2045,8 +2045,18 @@ int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct * vma,

inc_page_state(pgfault);

if (unlikely(is_vm_hugetlb_page(vma)))
return hugetlb_fault(mm, vma, address, write_access);
if (unlikely(is_vm_hugetlb_page(vma))) {
if (valid_hugetlb_file_off(vma, address))
/* We get here only if there was a stale(zero) TLB entry
* (because of HW prefetching).
* Low-level arch code (if needed) should have already
* purged the stale entry as part of this fault handling.
* Here we just return.
*/
return VM_FAULT_MINOR;
else
return VM_FAULT_SIGBUS; /* mapping truncation does this. */
}

/*
* We need the page table lock to synchronize with kswapd
Expand Down
2 changes: 0 additions & 2 deletions trunk/net/dccp/ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,6 @@ static int dccp_v4_send_response(struct sock *sk, struct request_sock *req,
if (skb != NULL) {
const struct inet_request_sock *ireq = inet_rsk(req);

memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
err = ip_build_and_send_pkt(skb, sk, ireq->loc_addr,
ireq->rmt_addr,
ireq->opt);
Expand Down Expand Up @@ -648,7 +647,6 @@ int dccp_v4_send_reset(struct sock *sk, enum dccp_reset_codes code)
if (skb != NULL) {
const struct inet_sock *inet = inet_sk(sk);

memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
err = ip_build_and_send_pkt(skb, sk,
inet->saddr, inet->daddr, NULL);
if (err == NET_XMIT_CN)
Expand Down
10 changes: 5 additions & 5 deletions trunk/net/dccp/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)

skb->h.raw = skb_push(skb, dccp_header_size);
dh = dccp_hdr(skb);

if (!skb->sk)
/*
* Data packets are not cloned as they are never retransmitted
*/
if (skb_cloned(skb))
skb_set_owner_w(skb, sk);

/* Build DCCP header and checksum it. */
Expand Down Expand Up @@ -100,7 +102,6 @@ int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)

DCCP_INC_STATS(DCCP_MIB_OUTSEGS);

memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
err = ip_queue_xmit(skb, 0);
if (err <= 0)
return err;
Expand Down Expand Up @@ -242,8 +243,7 @@ int dccp_write_xmit(struct sock *sk, struct sk_buff *skb, long *timeo)

err = dccp_transmit_skb(sk, skb);
ccid_hc_tx_packet_sent(dp->dccps_hc_tx_ccid, sk, 0, len);
} else
kfree_skb(skb);
}

return err;
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/dccp/proto.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
* This bug was _quickly_ found & fixed by just looking at an OSTRA
* generated callgraph 8) -acme
*/
if (rc != 0)
goto out_discard;
out_release:
release_sock(sk);
return rc ? : len;
Expand Down
12 changes: 11 additions & 1 deletion trunk/net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,17 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
int nsize, old_factor;
u16 flags;

BUG_ON(len > skb->len);
if (unlikely(len >= skb->len)) {
if (net_ratelimit()) {
printk(KERN_DEBUG "TCP: seg_size=%u, mss=%u, seq=%u, "
"end_seq=%u, skb->len=%u.\n", len, mss_now,
TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq,
skb->len);
WARN_ON(1);
}
return 0;
}

nsize = skb_headlen(skb) - len;
if (nsize < 0)
nsize = 0;
Expand Down

0 comments on commit 01b9c5a

Please sign in to comment.